/// <summary> /// Used to convert the data within vehicle state to a loggable form. /// </summary> /// <returns>A string to be added to the log file. </returns> public override String ToString() { StringBuilder accum = new StringBuilder(); accum.Append(_name + ", "); accum.Append(DateTime.Now + ", "); accum.Append(_latLong[0].ToString() + ", "); accum.Append(_latLong[1].ToString() + ", "); accum.Append(_heading.ToString() + ", "); accum.Append(_depth.ToString() + ", "); accum.Append(_position.ToString() + ", "); accum.Append(_velocity.ToString() + ", "); accum.Append(_acceleration.ToString() + ", "); for (int i = 0; i < _servoStates.Count; i++) { accum.Append(_servoStates[i].ToString() + ", "); } for (int i = 0; i < _compassStates.Count; i++) { accum.Append(_compassStates[i].ToString() + ", "); } accum.Append(_mode + ", "); accum.Append(_errorState + ", "); accum.Append(_ackMsg.ToString()); return(accum.ToString()); }
public override string ToString() { return(_vector.ToString()); }