public override bool Parse(Sentence sentence) { /* ** AAM - Waypoint Arrival Alarm ** ** 1 2 3 4 5 6 ** | | | | | | ** $--AAM,A,A,x.x,N,c--c*hh<CR><LF> ** ** 1) Status, A = Arrival circle entered ** 2) Status, A = perpendicular passed at waypoint ** 3) Arrival circle radius ** 4) Units of radius, nautical miles ** 5) Waypoint ID ** 6) Checksum */ /* ** First we check the checksum... */ if (sentence.IsChecksumBad() == Boolean.True) { Empty(); return(false); } IsArrivalCircleEntered = sentence.Boolean(1); IsPerpendicular = sentence.Boolean(2); CircleRadius = sentence.Double(3); WaypointID = sentence.Field(5); return(true); }
/// <summary> /// Returns the object to an initial state /// </summary> public override void Empty() { base.Empty(); IsArrivalCircleEntered = NMEA.Boolean.Unknown; IsPerpendicular = NMEA.Boolean.Unknown; CircleRadius = 0.0D; WaypointID = string.Empty; }
public override bool Parse(Sentence sentence) { /* ** RMA - Recommended Minimum Navigation Information ** 12 ** 1 2 3 4 5 6 7 8 9 10 11| ** | | | | | | | | | | | | ** $--RMA,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,x.x,x.x,x.x,a*hh<CR><LF> ** ** Field Number: ** 1) Blink Warning ** 2) Latitude ** 3) N or S ** 4) Longitude ** 5) E or W ** 6) Time Difference A, uS ** 7) Time Difference B, uS ** 8) Speed Over Ground, Knots ** 9) Track Made Good, degrees true ** 10) Magnetic Variation, degrees ** 11) E or W ** 12) Checksum */ /* ** First we check the checksum... */ if (sentence.IsChecksumBad() == Boolean.True) { Empty(); return(false); } IsDataValid = sentence.Boolean(1); Position.Parse(2, 3, 4, 5, sentence); TimeDifferenceA = sentence.Double(6); TimeDifferenceB = sentence.Double(7); SpeedOverGroundKnots = sentence.Double(8); TrackMadeGoodDegreesTrue = sentence.Double(9); MagneticVariation = sentence.Double(10); MagneticVariationDirection = sentence.EastOrWest(11); int checksum_field_number = sentence.ChecksumFieldNumber(); if (checksum_field_number == 13) { Mode = sentence.FAAMode(12); } else { Mode = FAAModeIndicator.Unknown; } return(true); }
public override void Empty() { base.Empty(); IsDataValid = Boolean.Unknown; Position.Empty(); TimeDifferenceA = 0.0D; TimeDifferenceB = 0.0D; SpeedOverGroundKnots = 0.0D; TrackMadeGoodDegreesTrue = 0.0D; MagneticVariation = 0.0D; MagneticVariationDirection = EastOrWest.Unknown; Mode = NMEA.FAAModeIndicator.Unknown; }
public override void Empty() { base.Empty(); DeccaChainID = 0; Red.Empty(); Green.Empty(); Purple.Empty(); RedLineNavigationUse = Boolean.Unknown; GreenLineNavigationUse = Boolean.Unknown; PurpleLineNavigationUse = Boolean.Unknown; PositionUncertaintyNauticalMiles = 0.0D; Basis = FixDataBasis.Unknown; }
public override void Empty() { base.Empty(); IsLoranBlinkOK = NMEA.Boolean.Unknown; IsLoranCCycleLockOK = NMEA.Boolean.Unknown; CrossTrackErrorMagnitude = 0.0D; DirectionToSteer = NMEA.LeftOrRight.Unknown; CrossTrackUnits = string.Empty; IsArrivalCircleEntered = NMEA.Boolean.Unknown; IsPerpendicular = NMEA.Boolean.Unknown; BearingOriginToDestination = 0.0D; BearingOriginToDestinationUnits = string.Empty; To = string.Empty; BearingPresentPositionToDestination = 0.0D; BearingPresentPositionToDestinationUnits = string.Empty; HeadingToSteer = 0.0D; HeadingToSteerUnits = string.Empty; FAAMode = NMEA.FAAModeIndicator.Unknown; }
public override bool Parse(Sentence sentence) { /* ** APB - Autopilot Sentence "B" ** 13 15 ** 1 2 3 4 5 6 7 8 9 10 11 12| 14| ** | | | | | | | | | | | | | | | ** $--APB,A,A,x.x,a,N,A,A,x.x,a,c--c,x.x,a,x.x,a*hh<CR><LF> ** ** 1) Status ** V = LORAN-C Blink or SNR warning ** V = general warning flag or other navigation systems when a reliable ** fix is not available ** 2) Status ** V = Loran-C Cycle Lock warning flag ** A = OK or not used ** 3) Cross Track Error Magnitude ** 4) Direction to steer, L or R ** 5) Cross Track Units, N = Nautical Miles ** 6) Status ** A = Arrival Circle Entered ** 7) Status ** A = Perpendicular passed at waypoint ** 8) Bearing origin to destination ** 9) M = Magnetic, T = True ** 10) Destination Waypoint ID ** 11) Bearing, present position to Destination ** 12) M = Magnetic, T = True ** 13) Heading to steer to destination waypoint ** 14) M = Magnetic, T = True ** 15) Checksum or FAA Mode Indicator ** 16) Checksum if FAA Mode Indicator is present */ // 2005-02-24, according to http://gpsd.berlios.de/NMEA.txt, NMEA added another field to the sentence /* ** First we check the checksum... */ if (sentence.IsChecksumBad() == Boolean.True) { Empty(); return(false); } IsLoranBlinkOK = sentence.Boolean(1); IsLoranCCycleLockOK = sentence.Boolean(2); CrossTrackErrorMagnitude = sentence.Double(3); DirectionToSteer = sentence.LeftOrRight(4); CrossTrackUnits = sentence.Field(5); IsArrivalCircleEntered = sentence.Boolean(6); IsPerpendicular = sentence.Boolean(7); BearingOriginToDestination = sentence.Double(8); BearingOriginToDestinationUnits = sentence.Field(9); To = sentence.Field(10); BearingPresentPositionToDestination = sentence.Double(11); BearingPresentPositionToDestinationUnits = sentence.Field(12); HeadingToSteer = sentence.Double(13); HeadingToSteerUnits = sentence.Field(14); if (sentence.GetNumberOfDataFields() == 16) { // Parse here... FAAMode = sentence.FAAMode(15); } else { FAAMode = FAAModeIndicator.Unknown; } return(true); }
public override bool Parse(Sentence sentence) { /* ** DCN - Decca Position ** 11 13 16 ** 1 2 3 4 5 6 7 8 9 10| 12| 14 15| 17 ** | | | | | | | | | | | | | | | | | ** $--DCN,xx,cc,x.x,A,cc,x.x,A,cc,x.x,A,A,A,A,x.x,N,x*hh<CR><LF> ** ** 1) Decca chain identifier ** 2) Red Zone Identifier ** 3) Red Line Of Position ** 4) Red Master Line Status ** 5) Green Zone Identifier ** 6) Green Line Of Position ** 7) Green Master Line Status ** 8) Purple Zone Identifier ** 9) Purple Line Of Position ** 10) Purple Master Line Status ** 11) Red Line Navigation Use ** 12) Green Line Navigation Use ** 13) Purple Line Navigation Use ** 14) Position Uncertainity ** 15) N = Nautical Miles ** 16) Fix Data Basis ** 1 = Normal Pattern ** 2 = Lane Identification Pattern ** 3 = Lane Identification Transmissions ** 17) Checksum */ /* ** First we check the checksum... */ if (sentence.IsChecksumBad() == Boolean.True) { Empty(); return(false); } DeccaChainID = sentence.Integer(1); Red.Parse(2, sentence); Green.Parse(5, sentence); Purple.Parse(8, sentence); RedLineNavigationUse = sentence.Boolean(11); GreenLineNavigationUse = sentence.Boolean(12); PurpleLineNavigationUse = sentence.Boolean(13); PositionUncertaintyNauticalMiles = sentence.Double(14); int temp_integer = sentence.Integer(16); switch (temp_integer) { case 1: Basis = FixDataBasis.NormalPattern; break; case 2: Basis = FixDataBasis.LaneIdentificationPattern; break; case 3: Basis = FixDataBasis.LaneIdentificationTransmissions; break; default: Basis = FixDataBasis.Unknown; break; } return(true); }
public void Parse(int first_field_number, Sentence sentence) { ZoneId = sentence.Field(first_field_number); Position = sentence.Double(first_field_number + 1); MasterLine = sentence.Boolean(first_field_number + 2); }
public void Empty() { ZoneId = ""; Position = 0.0D; MasterLine = NMEA.Boolean.Unknown; }