/// <summary> /// Initializes a new instance of the <see cref="GroundStation.GpsMessage"/> class. /// </summary> /// <param name='time'> /// Timestamp /// </param> /// <param name='b'> /// Message as a byte array /// </param> public GpsMessage() : base () { this.latitude = new Field(latMin, latMax, latPrevValue, latPrevPrevValue, latMaxVar); this.longitude = new Field(lonMin, lonMax, lonPrevValue, lonPrevPrevValue, lonMaxVar); this.gndSpeed = new Field(gndSpeedMin, gndSpeedMax, gndSpeedPrevValue, gndSpeedPrevPrevValue, gndSpeedMaxVar); this.trackAngle = new Field(trackAngleMin, trackAngleMax, trackAnglePrevValue, trackAnglePrevPrevValue, trackAngleMaxVar); }
/// <summary> /// Initializes a new instance of the <see cref="GroundStation.PwmMessage"/> class. /// </summary> /// <param name='time'> /// Timestamp /// </param> /// <param name='b'> /// Message as an array of bytes /// </param> public PwmMessage() : base() { this.ch1 = new Field(ch1Min, ch1Max, ch1PrevValue, ch1PrevPrevValue, ch1MaxVar); this.ch2 = new Field(ch2Min, ch2Max, ch2PrevValue, ch2PrevPrevValue, ch2MaxVar); this.ch3 = new Field(ch3Min, ch3Max, ch3PrevValue, ch3PrevPrevValue, ch3MaxVar); this.ch4 = new Field(ch4Min, ch4Max, ch4PrevValue, ch4PrevPrevValue, ch4MaxVar); }
/// <summary> /// Creates a clone of the field f /// </summary> /// <returns> /// The copy. /// </returns> /// <param name='f'> /// The field to clone /// </param> public static Field DeepCopy(Field f) { Field ans = new Field(f.min, f.max, f.prevValue, f.prevPrevValue, f.maxVar); ans.v = f.v; ans.isFirst = f.isFirst; return ans; }