diff --git a/src/NmeaParser/Nmea/Bod.cs b/src/NmeaParser/Nmea/Bod.cs
index ef906c1..043bb73 100644
--- a/src/NmeaParser/Nmea/Bod.cs
+++ b/src/NmeaParser/Nmea/Bod.cs
@@ -18,7 +18,7 @@ using System.Globalization;
namespace NmeaParser.Nmea
{
///
- /// Bearing Origin to Destination
+ /// Bearing - Origin to Destination
///
///
/// Bearing angle of the line, calculated at the origin waypoint, extending to the destination waypoint from
@@ -51,22 +51,22 @@ namespace NmeaParser.Nmea
OriginId = message[5];
}
///
- /// True Bearing from start to destination
+ /// True Bearing in degrees from start to destination
///
public double TrueBearing { get; }
///
- /// Magnetic Bearing from start to destination
+ /// Magnetic Bearing in degrees from start to destination
///
public double MagneticBearing { get; }
///
- /// Name of origin
+ /// Name of origin waypoint ID
///
public string? OriginId { get; }
///
- /// Name of destination
+ /// Name of destination waypoint ID
///
public string? DestinationId { get; }
}
diff --git a/src/NmeaParser/Nmea/Gga.cs b/src/NmeaParser/Nmea/Gga.cs
index 1a1e441..3fe98eb 100644
--- a/src/NmeaParser/Nmea/Gga.cs
+++ b/src/NmeaParser/Nmea/Gga.cs
@@ -18,8 +18,12 @@ using System.Globalization;
namespace NmeaParser.Nmea
{
///
- /// Global Positioning System Fix Data
+ /// Global Positioning System Fix Data
///
+ ///
+ /// This sentence is designed for use only with the GP Talker ID for U.S. Global Positioning System. All Global Satellite System receivers,
+ /// invcluding GPS, should use the sentence in new equipment designs.
+ ///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpgga")]
[NmeaMessageType("--GGA")]
public class Gga : NmeaMessage
@@ -41,7 +45,7 @@ namespace NmeaParser.Nmea
Hdop = NmeaMessage.StringToDouble(message[7]);
Altitude = NmeaMessage.StringToDouble(message[8]);
AltitudeUnits = message[9];
- HeightOfGeoid = NmeaMessage.StringToDouble(message[10]);
+ GeoidalSeparation = NmeaMessage.StringToDouble(message[10]);
HeightOfGeoidUnits = message[11];
var timeInSeconds = StringToDouble(message[12]);
if (!double.IsNaN(timeInSeconds))
@@ -96,9 +100,12 @@ namespace NmeaParser.Nmea
public string AltitudeUnits { get; }
///
- /// Height of geoid (mean sea level) above WGS84
+ /// Geoidal separation: the difference between the WGS-84 earth ellipsoid surface and mean-sea-level (geoid) surface.
///
- public double HeightOfGeoid { get; }
+ ///
+ /// A negative value means mean-sea-level surface is below the WGS-84 ellipsoid surface.
+ ///
+ public double GeoidalSeparation { get; }
///
/// Altitude units ('M' for Meters)
@@ -106,41 +113,41 @@ namespace NmeaParser.Nmea
public string HeightOfGeoidUnits { get; }
///
- /// Time since last DGPS update
+ /// Time since last DGPS update (ie age of the differential GPS data)
///
public TimeSpan TimeSinceLastDgpsUpdate { get; }
///
- /// DGPS Station ID Number
+ /// Differential Reference Station ID
///
public int DgpsStationId { get; }
///
- /// Fix quality
+ /// Fix quality indicater
///
public enum FixQuality : int
{
- /// Invalid
+ /// Fix not available or invalid
Invalid = 0,
- /// GPS
+ /// GPS SPS Mode, fix valid
GpsFix = 1,
- /// Differential GPS
+ /// Differential GPS, SPS Mode, or Satellite Based Augmentation System (SBAS), fix valid
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dgps")]
DgpsFix = 2,
- /// Precise Positioning Service
+ /// GPS PPS (Precise Positioning Service) mode, fix valid
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pps")]
PpsFix = 3,
- /// Real Time Kinematic (Fixed)
+ /// Real Time Kinematic (Fixed). System used in RTK mode with fixed integers
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Rtk")]
Rtk = 4,
- /// Real Time Kinematic (Floating)
+ /// Real Time Kinematic (Floating). Satellite system used in RTK mode, floating integers
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Rtk")]
FloatRtk = 5,
- /// Estimated
+ /// Estimated (dead reckoning) mode
Estimated = 6,
- /// Manual input
+ /// Manual input mode
ManualInput = 7,
- /// Simulation
+ /// Simulator mode
Simulation = 8
}
}
diff --git a/src/NmeaParser/Nmea/Gll.cs b/src/NmeaParser/Nmea/Gll.cs
index 60086f1..6782820 100644
--- a/src/NmeaParser/Nmea/Gll.cs
+++ b/src/NmeaParser/Nmea/Gll.cs
@@ -17,8 +17,11 @@ using System;
namespace NmeaParser.Nmea
{
///
- /// Geographic position, latitude / longitude
+ /// Geographic position, latitude / longitude.
///
+ ///
+ /// Latitude and Longitude of vessel position, time of position fix and status.
+ ///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gll")]
[NmeaMessageType("--GLL")]
public class Gll : NmeaMessage
diff --git a/src/NmeaParser/Nmea/Gns.cs b/src/NmeaParser/Nmea/Gns.cs
index 3a5e31e..c69c53d 100644
--- a/src/NmeaParser/Nmea/Gns.cs
+++ b/src/NmeaParser/Nmea/Gns.cs
@@ -21,6 +21,21 @@ namespace NmeaParser.Nmea
///
/// Fixes data for single or combined (GPS, GLONASS, possible future satellite systems, and systems combining these) satellite navigation systems
///
+ ///
+ /// This sentence provides fix data for GPS, GLONASS, BDS, QZSS, NavIC (IRNSS) and possible fiture satellite systems, and systems combining these.
+ /// This sentence could be used with the talker identification of for GPS, for GLONASS,
+ /// for Galileo, for BDS, for QZSS,
+ /// for NavIC (IRNSS), and for GNSS combined systems, as well as future identifiers.
+ ///
+ ///
+ /// If a GNSS receiver is capable simultanously of producing a position using combined satellite systems, as well as a position using only one of the satellite systems, then separate GNS sentences
+ /// with different may be used to report the data calculated from the individual systems.
+ ///
+ ///
+ /// If a GNSS receiver is set up to use more than one satellite system, but for some reason one or more of the systems are not available, then it may continue to report the positions
+ /// using GNGNS, and use the to show which satellit esystems are being used.
+ ///
+ ///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gns")]
[NmeaMessageType("--GNS")]
public class Gns : NmeaMessage
@@ -81,19 +96,23 @@ namespace NmeaParser.Nmea
public enum NavigationalStatus
{
///
- /// Not valid for navigation
+ /// Navigational status not valid, equipment is not providing navigational status indication.
///
NotValid,
///
- /// Safe
+ /// Safe: When the estimated positioning accuracy (95% confidence) is within the selected accuracy level corresponding
+ /// to the actual navigation mode, and integrity is available and within the requirements for the actual navigation mode,
+ /// and a new valid position has been calculated within 1s for a conventional craft, and 0.5s for a high speed craft.
///
Safe,
///
- /// Caution
+ /// Caution: When integrity is not available
///
Caution,
///
- /// Unsafe
+ /// UnsafeL When the estimated positioning accuracy (95% confidence) is less than the selected accuracy level corresponding
+ /// to the actual navigation mode, and integrity is available and within the requirements for the actual navigation mode,
+ /// and/or a new valid position has not been calculated within 1s for a conventional craft, and 0.5s for a high speed craft.
///
Unsafe
}
@@ -127,16 +146,7 @@ namespace NmeaParser.Nmea
FixTime = StringToTimeSpan(message[0]);
Latitude = NmeaMessage.StringToLatitude(message[1], message[2]);
Longitude = NmeaMessage.StringToLongitude(message[3], message[4]);
- if (message[5].Length > 0)
- GpsModeIndicator = ParseModeIndicator(message[5][0]);
- if (message[5].Length > 1)
- GlonassModeIndicator = ParseModeIndicator(message[5][1]);
- if (message[5].Length > 2)
- {
- FutureModeIndicator = message[5].Skip(2).Select(t => ParseModeIndicator(t)).ToArray();
- }
- else
- FutureModeIndicator = new Mode[] { };
+ ModeIndicators = message[5].Select(t => ParseModeIndicator(t)).ToArray();
NumberOfSatellites = int.Parse(message[6], CultureInfo.InvariantCulture);
Hdop = NmeaMessage.StringToDouble(message[7]);
OrhometricHeight = NmeaMessage.StringToDouble(message[8]);
@@ -180,23 +190,37 @@ namespace NmeaParser.Nmea
///
/// Mode indicator for GPS
///
- ///
- ///
- public Mode GpsModeIndicator { get; }
+ public Mode GpsModeIndicator => ModeIndicators.Length > 0 ? ModeIndicators[0] : Mode.NoFix;
///
/// Mode indicator for GLONASS
///
- ///
- ///
- public Mode GlonassModeIndicator { get; }
+ public Mode GlonassModeIndicator => ModeIndicators.Length > 1 ? ModeIndicators[1] : Mode.NoFix;
+
+ ///
+ /// Mode indicator for Galileo
+ ///
+ public Mode GalileoModeIndicator => ModeIndicators.Length > 2 ? ModeIndicators[2] : Mode.NoFix;
+
+ ///
+ /// Mode indicator for Beidou (BDS)
+ ///
+ public Mode BDSModeIndicator => ModeIndicators.Length > 3 ? ModeIndicators[3] : Mode.NoFix;
+
+ ///
+ /// Mode indicator for QZSS
+ ///
+ public Mode QZSSModeIndicator => ModeIndicators.Length > 4 ? ModeIndicators[4] : Mode.NoFix;
+
+ ///
+ /// Mode indicator for NavIC (IRNSS)
+ ///
+ public Mode NavICModeIndicator => ModeIndicators.Length > 5 ? ModeIndicators[5] : Mode.NoFix;
///
/// Mode indicator for future constallations
///
- ///
- ///
- public Mode[] FutureModeIndicator { get; }
+ public Mode[] ModeIndicators { get; }
///
/// Number of satellites (SVs) in use
diff --git a/src/NmeaParser/Nmea/Gsa.cs b/src/NmeaParser/Nmea/Gsa.cs
index 6faad25..b8359a9 100644
--- a/src/NmeaParser/Nmea/Gsa.cs
+++ b/src/NmeaParser/Nmea/Gsa.cs
@@ -35,8 +35,8 @@ namespace NmeaParser.Nmea
if (message == null || message.Length < 17)
throw new ArgumentException("Invalid GPGSA", "message");
- GpsMode = message[0] == "A" ? Gsa.ModeSelection.Auto : Gsa.ModeSelection.Manual;
- FixMode = (Gsa.Mode)int.Parse(message[1], CultureInfo.InvariantCulture);
+ Mode = message[0] == "A" ? Gsa.ModeSelection.Auto : Gsa.ModeSelection.Manual;
+ Fix = (Gsa.FixType)int.Parse(message[1], CultureInfo.InvariantCulture);
List svs = new List();
for (int i = 2; i < 14; i++)
@@ -45,7 +45,7 @@ namespace NmeaParser.Nmea
if (message[i].Length > 0 && int.TryParse(message[i], out id))
svs.Add(id);
}
- SVs = svs.ToArray();
+ SatelliteIDs = svs.ToArray();
double tmp;
if (double.TryParse(message[14], NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
@@ -67,17 +67,23 @@ namespace NmeaParser.Nmea
///
/// Mode
///
- public ModeSelection GpsMode { get; }
+ public ModeSelection Mode { get; }
///
/// Mode
///
- public Mode FixMode { get; }
+ public FixType Fix { get; }
///
- /// IDs of SVs used in position fix
+ /// ID numbers of satellite vehicles used in the solution.
///
- public IReadOnlyList SVs { get; }
+ ///
+ /// - GPS satellites are identified by their PRN numbers, which range from 1 to 32.
+ /// - The numbers 33-64 are reserved for SBAS satellites. The SBAS system PRN numbers are 120-138. The offset from NMEA SBAS SB ID to SBAS PRN number is 87.
+ /// A SBAS PRN number of 120 minus 87 yields the SV ID of 33. The addition of87 to the SVID yields the SBAS PRN number.
+ /// - The numbers 65-96 are reserved for GLONASS satellites. GLONASS satellites are identified by 64+satellite slot number.
+ ///
+ public IReadOnlyList SatelliteIDs { get; }
///
/// Dilution of precision
@@ -103,7 +109,7 @@ namespace NmeaParser.Nmea
public enum ModeSelection
{
///
- /// Auto
+ /// Automatic, allowed to automatically switch 2D/3D
///
Auto,
///
@@ -111,11 +117,12 @@ namespace NmeaParser.Nmea
///
Manual,
}
+
///
/// Fix Mode
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Justification = "Enum values matches NMEA spec")]
- public enum Mode : int
+ public enum FixType : int
{
///
/// Not available
diff --git a/src/NmeaParser/Nmea/Gst.cs b/src/NmeaParser/Nmea/Gst.cs
index f022c76..73cd896 100644
--- a/src/NmeaParser/Nmea/Gst.cs
+++ b/src/NmeaParser/Nmea/Gst.cs
@@ -17,7 +17,7 @@ using System;
namespace NmeaParser.Nmea
{
///
- /// Position error statistics
+ /// Pseudorange error statistics
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpgst")]
[NmeaMessageType("--GST")]
@@ -48,48 +48,39 @@ namespace NmeaParser.Nmea
public TimeSpan FixTime { get; }
///
- /// RMS value of the pseudorange residuals; includes carrier phase residuals during periods of RTK (float) and RTK (fixed) processing
+ /// RMS value of the standard deviation of the range inputs in the navigation process. Range inputs include pseudoranges and DGNSS corrections.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Rms")]
public double Rms { get; }
///
- /// Error ellipse semi-major axis 1 sigma error, in meters
+ /// Standard deviation of semi-major axis of error ellipse in meters.
///
public double SemiMajorError { get; }
///
- /// Error ellipse semi-minor axis 1 sigma error, in meters
+ /// Standard deviation of semi-minor axis of error ellipse in meters.
///
public double SemiMinorError { get; }
///
- /// Error ellipse orientation, degrees from true north
+ /// Orientation of semi-major axis of error ellipse (degrees from true north).
///
public double ErrorOrientation { get; }
///
- /// Latitude 1 sigma error, in meters
+ /// Standard deviation of latitude error in meters.
///
- ///
- /// The error expressed as one standard deviation.
- ///
public double SigmaLatitudeError { get; }
- ///
- /// Longitude 1 sigma error, in meters
+ ///
+ /// Standard deviation of longitude error in meters.
///
- ///
- /// The error expressed as one standard deviation.
- ///
public double SigmaLongitudeError { get; }
- ///
- /// Height 1 sigma error, in meters
+ ///
+ /// Standard deviation of altitude error in meters.
///
- ///
- /// The error expressed as one standard deviation.
- ///
public double SigmaHeightError { get; }
}
}
diff --git a/src/NmeaParser/Nmea/Gsv.cs b/src/NmeaParser/Nmea/Gsv.cs
index db1d5ec..a9a8fa0 100644
--- a/src/NmeaParser/Nmea/Gsv.cs
+++ b/src/NmeaParser/Nmea/Gsv.cs
@@ -19,8 +19,11 @@ using System.Globalization;
namespace NmeaParser.Nmea
{
///
- /// GPS Satellites in view
+ /// GNSS Satellites in view
///
+ ///
+ /// The GSV sentence provides the number of satellites (SV) in view, satellite ID numbers, elevation, azimuth, and SNR value.
+ ///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gsv")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[NmeaMessageType("--GSV")]
@@ -50,9 +53,9 @@ namespace NmeaParser.Nmea
{
var satellites = int.Parse(message[2], CultureInfo.InvariantCulture);
- if (SVsInView == -1)
- SVsInView = satellites;
- else if ( satellites != SVsInView)
+ if (SatellitesInView == -1)
+ SatellitesInView = satellites;
+ else if ( satellites != SatellitesInView)
return false; // Messages do not match
for (int i = 3; i < message.Length - 3; i += 4)
@@ -66,9 +69,10 @@ namespace NmeaParser.Nmea
}
///
- /// Total number of SVs in view
+ /// Total number of satellite vehicles (SV) in view
///
- public int SVsInView { get; private set; } = -1;
+ ///
+ public int SatellitesInView { get; private set; } = -1;
///
/// Satellite vehicles in this message part.
@@ -101,7 +105,7 @@ namespace NmeaParser.Nmea
{
internal SatelliteVehicle(Talker talker, string[] message, int startIndex)
{
- PrnNumber = int.Parse(message[startIndex], CultureInfo.InvariantCulture);
+ Id = int.Parse(message[startIndex], CultureInfo.InvariantCulture);
if (double.TryParse(message[startIndex + 1], NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out double e))
Elevation = e;
if (double.TryParse(message[startIndex + 2], NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out double a))
@@ -118,9 +122,9 @@ namespace NmeaParser.Nmea
public Talker TalkerId { get; }
///
- /// SV PRN number
+ /// Satellite ID number
///
- public int PrnNumber { get; }
+ public int Id { get; }
///
/// Elevation in degrees, 90 maximum
@@ -144,11 +148,11 @@ namespace NmeaParser.Nmea
{
get
{
- if (PrnNumber >= 1 && PrnNumber <= 32)
+ if (Id >= 1 && Id <= 32)
return SatelliteSystem.Gps;
- if (PrnNumber >= 33 && PrnNumber <= 64)
+ if (Id >= 33 && Id <= 64)
return SatelliteSystem.Waas;
- if (PrnNumber >= 65 && PrnNumber <= 96)
+ if (Id >= 65 && Id <= 96)
return SatelliteSystem.Glonass;
return SatelliteSystem.Unknown;
}
diff --git a/src/NmeaParser/Nmea/Rmb.cs b/src/NmeaParser/Nmea/Rmb.cs
index d4877db..b4ae375 100644
--- a/src/NmeaParser/Nmea/Rmb.cs
+++ b/src/NmeaParser/Nmea/Rmb.cs
@@ -20,6 +20,14 @@ namespace NmeaParser.Nmea
///
/// Recommended minimum navigation information
///
+ ///
+ /// Navigation data from present position to a destination waypoint provided by a Loran-C, GNSS, DECCA, navigatin computer
+ /// or other integrated navigation system.
+ ///
+ /// This sentence always accompanies and sentences when a destination is active when provided by a Loran-C or GNSS receiver,
+ /// other systems may transmit without or .
+ ///
+ ///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprmb")]
[NmeaMessageType("--RMB")]
public class Rmb : NmeaMessage
diff --git a/src/NmeaParser/Nmea/Rmc.cs b/src/NmeaParser/Nmea/Rmc.cs
index 1cfdd1e..1a0c2b5 100644
--- a/src/NmeaParser/Nmea/Rmc.cs
+++ b/src/NmeaParser/Nmea/Rmc.cs
@@ -18,8 +18,14 @@ using System.Globalization;
namespace NmeaParser.Nmea
{
///
- /// Recommended Minimum
+ /// Recommended Minimum specific GNSS data
///
+ ///
+ /// Time, date, position, course and speed data provided by a GNSS navigation receiver. This sentence is
+ /// transmitted at intervals not exceeding 2-seconds and is always accompanied by when a destination waypoint
+ /// is active.
+ /// and are the recommended minimum data to be provided by a GNSS receiver.
+ ///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gprmc")]
[NmeaMessageType("--RMC")]
public class Rmc : NmeaMessage
@@ -36,12 +42,12 @@ namespace NmeaParser.Nmea
if (message[8].Length == 6 && message[0].Length >= 6)
{
- FixTime = new DateTime(int.Parse(message[8].Substring(4, 2), CultureInfo.InvariantCulture) + 2000,
+ FixTime = new DateTimeOffset(int.Parse(message[8].Substring(4, 2), CultureInfo.InvariantCulture) + 2000,
int.Parse(message[8].Substring(2, 2), CultureInfo.InvariantCulture),
int.Parse(message[8].Substring(0, 2), CultureInfo.InvariantCulture),
int.Parse(message[0].Substring(0, 2), CultureInfo.InvariantCulture),
int.Parse(message[0].Substring(2, 2), CultureInfo.InvariantCulture),
- 0, DateTimeKind.Utc).AddSeconds(double.Parse(message[0].Substring(4), CultureInfo.InvariantCulture));
+ 0, TimeSpan.Zero).AddSeconds(double.Parse(message[0].Substring(4), CultureInfo.InvariantCulture));
}
Active = (message[1] == "A");
Latitude = NmeaMessage.StringToLatitude(message[2], message[3]);
@@ -56,7 +62,7 @@ namespace NmeaParser.Nmea
///
/// Fix Time
///
- public DateTime FixTime { get; }
+ public DateTimeOffset FixTime { get; }
///
/// Gets a value whether the device is active
diff --git a/src/NmeaParser/Nmea/Talker.cs b/src/NmeaParser/Nmea/Talker.cs
index 48e99e7..7a18166 100644
--- a/src/NmeaParser/Nmea/Talker.cs
+++ b/src/NmeaParser/Nmea/Talker.cs
@@ -60,9 +60,12 @@ namespace NmeaParser.Nmea
{"FR", Talker.FireDetectionPoint },
{"FS", Talker.FireSprinklerSystem },
{"GA", Talker.GalileoPositioningSystem },
+ {"GB", Talker.BeiDouNavigationSatelliteSystem },
{"GL", Talker.GlonassReceiver },
{"GN", Talker.GlobalNavigationSatelliteSystem },
{"GP", Talker.GlobalPositioningSystem },
+ {"GI", Talker.IndianRegionalNavigationSatelliteSystem },
+ {"GQ", Talker.QuasiZenithSatelliteSystem },
{"HC", Talker.CompassMagnetic },
{"HE", Talker.GyroNorthSeeking },
{"HF", Talker.Fluxgate },
@@ -142,6 +145,8 @@ namespace NmeaParser.Nmea
AISTransmittingStation, // = AT
/// AIS Simplex Repeater Station
AISSimplexRepeaterStation, // = AX
+ /// BeiDou Navigation Satellite System
+ BeiDouNavigationSatelliteSystem, // == GB
/// Bilge Systems
BilgeSystems, // = BI
///
@@ -182,7 +187,7 @@ namespace NmeaParser.Nmea
GalileoPositioningSystem, // = GA
/// GLONASS Receiver
GlonassReceiver, // = GL
- /// Global Navigation Satellite System (GNSS
+ /// Global Navigation Satellite System (GNSS)
GlobalNavigationSatelliteSystem, // = GN
/// Global Positioning System (GPS)
GlobalPositioningSystem, // = GPS
@@ -198,6 +203,8 @@ namespace NmeaParser.Nmea
HullDoorControllerMonitoringPanel, // = HD
/// Hull Stress Monitoring
HullStressMonitoring, // = HS
+ /// Indian Regional Navigation Satellite System (IRNSS)
+ IndianRegionalNavigationSatelliteSystem, // = GI
/// Integrated Instrumentation
IntegratedInstrumentation, // = II
/// Integrated Navigation
@@ -266,6 +273,8 @@ namespace NmeaParser.Nmea
Chronometer, // = ZC
/// Time keeper - Quartz
Quartz, // = ZQ
+ /// Quasi-Zenith Satellite System (QZSS)
+ QuasiZenithSatelliteSystem,
/// Time keeper - Radio Update
RadioUpdate, // = ZV
diff --git a/src/NmeaParser/Nmea/Vtg.cs b/src/NmeaParser/Nmea/Vtg.cs
index 3c84dbf..bd3a776 100644
--- a/src/NmeaParser/Nmea/Vtg.cs
+++ b/src/NmeaParser/Nmea/Vtg.cs
@@ -35,30 +35,30 @@ namespace NmeaParser.Nmea
{
if (message == null || message.Length < 7)
throw new ArgumentException("Invalid Gpvtg", "message");
- TrueCourseOverGround = NmeaMessage.StringToDouble(message[0]);
- MagneticCourseOverGround = NmeaMessage.StringToDouble(message[2]);
- SpeedInKnots = NmeaMessage.StringToDouble(message[4]);
- SpeedInKph = NmeaMessage.StringToDouble(message[6]);
+ CourseTrue = NmeaMessage.StringToDouble(message[0]);
+ CourseMagnetic = NmeaMessage.StringToDouble(message[2]);
+ SpeedKnots = NmeaMessage.StringToDouble(message[4]);
+ SpeedKph = NmeaMessage.StringToDouble(message[6]);
}
///
/// Course over ground relative to true north
///
- public double TrueCourseOverGround { get; }
+ public double CourseTrue { get; }
///
/// Course over ground relative to magnetic north
///
- public double MagneticCourseOverGround { get; }
+ public double CourseMagnetic { get; }
///
/// Speed over ground in knots
///
- public double SpeedInKnots { get; }
+ public double SpeedKnots { get; }
///
/// Speed over ground in kilometers/hour
///
- public double SpeedInKph { get; }
+ public double SpeedKph { get; }
}
}
\ No newline at end of file
diff --git a/src/NmeaParser/Nmea/Zda.cs b/src/NmeaParser/Nmea/Zda.cs
index dd22ee2..89c9d0a 100644
--- a/src/NmeaParser/Nmea/Zda.cs
+++ b/src/NmeaParser/Nmea/Zda.cs
@@ -41,8 +41,8 @@ namespace NmeaParser.Nmea
var month = int.Parse(message[2], CultureInfo.InvariantCulture);
var year = int.Parse(message[3], CultureInfo.InvariantCulture);
- FixDateTime = new DateTime(year, month, day, time.Hours, time.Minutes,
- time.Seconds, DateTimeKind.Utc);
+ FixDateTime = new DateTimeOffset(year, month, day, time.Hours, time.Minutes,
+ time.Seconds, TimeSpan.Zero);
// Index 4 and 5 is used to specify a local time zone.
// However I haven't come across any receiver that actually
@@ -52,6 +52,6 @@ namespace NmeaParser.Nmea
///
/// Gets the time of fix
///
- public DateTime FixDateTime { get; }
+ public DateTimeOffset FixDateTime { get; }
}
}
diff --git a/src/UnitTests/NmeaParser.Tests/DeviceTests.cs b/src/UnitTests/NmeaParser.Tests/DeviceTests.cs
index d20ea1b..40df7cc 100644
--- a/src/UnitTests/NmeaParser.Tests/DeviceTests.cs
+++ b/src/UnitTests/NmeaParser.Tests/DeviceTests.cs
@@ -28,7 +28,7 @@ namespace NmeaParser.Tests
Assert.IsInstanceOfType(e.Message, typeof(Gsv));
var msg = (NmeaParser.Nmea.Gsv)e.Message;
Assert.IsTrue(((IMultiSentenceMessage)e.Message).IsComplete);
- Assert.AreEqual(9, msg.SVsInView);
+ Assert.AreEqual(9, msg.SatellitesInView);
Assert.AreEqual(9, msg.SVs.Count);
if (count > 1)
diff --git a/src/UnitTests/NmeaParser.Tests/NmeaMessages.cs b/src/UnitTests/NmeaParser.Tests/NmeaMessages.cs
index 505e761..0d23085 100644
--- a/src/UnitTests/NmeaParser.Tests/NmeaMessages.cs
+++ b/src/UnitTests/NmeaParser.Tests/NmeaMessages.cs
@@ -97,6 +97,24 @@ namespace NmeaParser.Tests
}
}
}
+
+ [TestMethod]
+ public void TestGprma()
+ {
+ string input = "$GPRMA,A,4917.24,S,12309.57,W,1000.0,2000.0,123.4,321.0,10,E,A*38";
+ var msg = NmeaMessage.Parse(input);
+ Assert.IsInstanceOfType(msg, typeof(Rma));
+ Rma rma = (Rma)msg;
+ Assert.AreEqual(Rma.PositioningStatus.Autonomous, rma.Status);
+ Assert.AreEqual(-49.287333333333333333, rma.Latitude);
+ Assert.AreEqual(-123.1595, rma.Longitude);
+ Assert.AreEqual(TimeSpan.FromMilliseconds(1), rma.TimeDifferenceA);
+ Assert.AreEqual(TimeSpan.FromMilliseconds(2), rma.TimeDifferenceB);
+ Assert.AreEqual(123.4, rma.Speed);
+ Assert.AreEqual(321, rma.Course);
+ Assert.AreEqual(-10, rma.MagneticVariation);
+ Assert.AreEqual(Rma.PositioningMode.Autonomous, rma.Mode);
+ }
[TestMethod]
public void TestGprmb_Empty()
@@ -143,7 +161,7 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Rmc));
Rmc rmc = (Rmc)msg;
- Assert.AreEqual(new DateTime(2013, 03, 23, 12, 35, 19, DateTimeKind.Utc), rmc.FixTime);
+ Assert.AreEqual(new DateTimeOffset(2013, 03, 23, 12, 35, 19, TimeSpan.Zero), rmc.FixTime);
Assert.AreEqual(-48.1173, rmc.Latitude);
Assert.AreEqual(-11.516666666666667, rmc.Longitude, 0.0000000001);
}
@@ -156,7 +174,7 @@ namespace NmeaParser.Tests
Assert.IsInstanceOfType(msg, typeof(Rmc));
Rmc rmc = (Rmc)msg;
Assert.AreEqual("GNRMC", rmc.MessageType);
- Assert.AreEqual(new DateTime(2017, 12, 20, 23, 10, 11, DateTimeKind.Utc), rmc.FixTime);
+ Assert.AreEqual(new DateTimeOffset(2017, 12, 20, 23, 10, 11, TimeSpan.Zero), rmc.FixTime);
Assert.AreEqual(34.057860634, rmc.Latitude, 0.0000000001);
Assert.AreEqual(-117.19682109916667, rmc.Longitude, 0.0000000001);
Assert.AreEqual(true, rmc.Active);
@@ -180,7 +198,7 @@ namespace NmeaParser.Tests
Assert.AreEqual(.8, gga.Hdop);
Assert.AreEqual(1378, gga.Altitude);
Assert.AreEqual("M", gga.AltitudeUnits);
- Assert.AreEqual(-22.1, gga.HeightOfGeoid);
+ Assert.AreEqual(-22.1, gga.GeoidalSeparation);
Assert.AreEqual("M", gga.HeightOfGeoidUnits);
Assert.AreEqual(-1, gga.DgpsStationId);
Assert.AreEqual(TimeSpan.MaxValue, gga.TimeSinceLastDgpsUpdate);
@@ -201,7 +219,7 @@ namespace NmeaParser.Tests
Assert.AreEqual(.9, gga.Hdop);
Assert.AreEqual(403.641, gga.Altitude);
Assert.AreEqual("M", gga.AltitudeUnits);
- Assert.AreEqual(-32.133, gga.HeightOfGeoid);
+ Assert.AreEqual(-32.133, gga.GeoidalSeparation);
Assert.AreEqual("M", gga.HeightOfGeoidUnits);
Assert.AreEqual(0, gga.DgpsStationId);
Assert.AreEqual(TimeSpan.FromSeconds(1), gga.TimeSinceLastDgpsUpdate);
@@ -248,13 +266,13 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Gsa));
Gsa gsa = (Gsa)msg;
- Assert.AreEqual(Gsa.ModeSelection.Auto, gsa.GpsMode);
- Assert.AreEqual(Gsa.Mode.Fix3D, gsa.FixMode);
- Assert.AreEqual(4, gsa.SVs.Count);
- Assert.AreEqual(16, gsa.SVs[0]);
- Assert.AreEqual(18, gsa.SVs[1]);
- Assert.AreEqual(22, gsa.SVs[2]);
- Assert.AreEqual(24, gsa.SVs[3]);
+ Assert.AreEqual(Gsa.ModeSelection.Auto, gsa.Mode);
+ Assert.AreEqual(Gsa.FixType.Fix3D, gsa.Fix);
+ Assert.AreEqual(4, gsa.SatelliteIDs.Count);
+ Assert.AreEqual(16, gsa.SatelliteIDs[0]);
+ Assert.AreEqual(18, gsa.SatelliteIDs[1]);
+ Assert.AreEqual(22, gsa.SatelliteIDs[2]);
+ Assert.AreEqual(24, gsa.SatelliteIDs[3]);
Assert.AreEqual(double.NaN, gsa.Pdop);
Assert.AreEqual(double.NaN, gsa.Hdop);
Assert.AreEqual(double.NaN, gsa.Vdop);
@@ -267,21 +285,21 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Gsa));
Gsa gsa = (Gsa)msg;
- Assert.AreEqual(Gsa.ModeSelection.Manual, gsa.GpsMode);
- Assert.AreEqual(Gsa.Mode.Fix2D, gsa.FixMode);
- Assert.AreEqual(12, gsa.SVs.Count);
- Assert.AreEqual(19, gsa.SVs[0]);
- Assert.AreEqual(28, gsa.SVs[1]);
- Assert.AreEqual(14, gsa.SVs[2]);
- Assert.AreEqual(18, gsa.SVs[3]);
- Assert.AreEqual(27, gsa.SVs[4]);
- Assert.AreEqual(22, gsa.SVs[5]);
- Assert.AreEqual(31, gsa.SVs[6]);
- Assert.AreEqual(39, gsa.SVs[7]);
- Assert.AreEqual(40, gsa.SVs[8]);
- Assert.AreEqual(42, gsa.SVs[9]);
- Assert.AreEqual(43, gsa.SVs[10]);
- Assert.AreEqual(44, gsa.SVs[11]);
+ Assert.AreEqual(Gsa.ModeSelection.Manual, gsa.Mode);
+ Assert.AreEqual(Gsa.FixType.Fix2D, gsa.Fix);
+ Assert.AreEqual(12, gsa.SatelliteIDs.Count);
+ Assert.AreEqual(19, gsa.SatelliteIDs[0]);
+ Assert.AreEqual(28, gsa.SatelliteIDs[1]);
+ Assert.AreEqual(14, gsa.SatelliteIDs[2]);
+ Assert.AreEqual(18, gsa.SatelliteIDs[3]);
+ Assert.AreEqual(27, gsa.SatelliteIDs[4]);
+ Assert.AreEqual(22, gsa.SatelliteIDs[5]);
+ Assert.AreEqual(31, gsa.SatelliteIDs[6]);
+ Assert.AreEqual(39, gsa.SatelliteIDs[7]);
+ Assert.AreEqual(40, gsa.SatelliteIDs[8]);
+ Assert.AreEqual(42, gsa.SatelliteIDs[9]);
+ Assert.AreEqual(43, gsa.SatelliteIDs[10]);
+ Assert.AreEqual(44, gsa.SatelliteIDs[11]);
Assert.AreEqual(1.7, gsa.Pdop);
Assert.AreEqual(1.0, gsa.Hdop);
Assert.AreEqual(1.3, gsa.Vdop);
@@ -295,15 +313,15 @@ namespace NmeaParser.Tests
Assert.IsInstanceOfType(msg, typeof(Gsa));
Assert.AreEqual("GNGSA", msg.MessageType);
Gsa gsa = (Gsa)msg;
- Assert.AreEqual(Gsa.ModeSelection.Auto, gsa.GpsMode);
- Assert.AreEqual(Gsa.Mode.Fix3D, gsa.FixMode);
- Assert.AreEqual(6, gsa.SVs.Count);
- Assert.AreEqual(3, gsa.SVs[0]);
- Assert.AreEqual(7, gsa.SVs[1]);
- Assert.AreEqual(16, gsa.SVs[2]);
- Assert.AreEqual(23, gsa.SVs[3]);
- Assert.AreEqual(9, gsa.SVs[4]);
- Assert.AreEqual(26, gsa.SVs[5]);
+ Assert.AreEqual(Gsa.ModeSelection.Auto, gsa.Mode);
+ Assert.AreEqual(Gsa.FixType.Fix3D, gsa.Fix);
+ Assert.AreEqual(6, gsa.SatelliteIDs.Count);
+ Assert.AreEqual(3, gsa.SatelliteIDs[0]);
+ Assert.AreEqual(7, gsa.SatelliteIDs[1]);
+ Assert.AreEqual(16, gsa.SatelliteIDs[2]);
+ Assert.AreEqual(23, gsa.SatelliteIDs[3]);
+ Assert.AreEqual(9, gsa.SatelliteIDs[4]);
+ Assert.AreEqual(26, gsa.SatelliteIDs[5]);
Assert.AreEqual(3.5, gsa.Pdop);
Assert.AreEqual(1.4, gsa.Hdop);
Assert.AreEqual(3.2, gsa.Vdop);
@@ -318,25 +336,25 @@ namespace NmeaParser.Tests
Gsv gsv = (Gsv)msg;
Assert.IsInstanceOfType(msg, typeof(IMultiSentenceMessage));
Assert.IsFalse(((IMultiSentenceMessage)msg).IsComplete);
- Assert.AreEqual(11, gsv.SVsInView);
+ Assert.AreEqual(11, gsv.SatellitesInView);
Assert.IsNotNull(gsv.SVs);
Assert.AreEqual(3, gsv.SVs.Count);
var sv = gsv.SVs[0];
- Assert.AreEqual(22, sv.PrnNumber);
+ Assert.AreEqual(22, sv.Id);
Assert.AreEqual(42, sv.Elevation);
Assert.AreEqual(67, sv.Azimuth);
Assert.AreEqual(42, sv.SignalToNoiseRatio);
Assert.AreEqual(SatelliteSystem.Gps, sv.System);
sv = gsv.SVs[1];
- Assert.AreEqual(75, sv.PrnNumber);
+ Assert.AreEqual(75, sv.Id);
Assert.AreEqual(14, sv.Elevation);
Assert.AreEqual(311, sv.Azimuth);
Assert.AreEqual(43, sv.SignalToNoiseRatio);
Assert.AreEqual(SatelliteSystem.Glonass, sv.System);
sv = gsv.SVs[2];
- Assert.AreEqual(50, sv.PrnNumber);
+ Assert.AreEqual(50, sv.Id);
Assert.AreEqual(5, sv.Elevation);
Assert.AreEqual(244, sv.Azimuth);
Assert.AreEqual(00, sv.SignalToNoiseRatio);
@@ -351,7 +369,7 @@ namespace NmeaParser.Tests
Assert.IsInstanceOfType(msg, typeof(Gsv));
Gsv gsv = (Gsv)msg;
Assert.IsTrue(((IMultiSentenceMessage)gsv).IsComplete);
- Assert.AreEqual(0, gsv.SVsInView);
+ Assert.AreEqual(0, gsv.SatellitesInView);
Assert.IsNotNull(gsv.SVs);
Assert.AreEqual(0, gsv.SVs.Count);
}
@@ -372,7 +390,7 @@ namespace NmeaParser.Tests
Assert.AreSame(msg1, msg2);
Assert.AreSame(msg1, msg3);
Gsv gsv = (Gsv)msg1;
- Assert.AreEqual(9, gsv.SVsInView);
+ Assert.AreEqual(9, gsv.SatellitesInView);
Assert.IsNotNull(gsv.SVs);
Assert.AreEqual(9, gsv.SVs.Count);
}
@@ -389,11 +407,11 @@ namespace NmeaParser.Tests
Assert.IsInstanceOfType(msg2, typeof(Gsv));
Assert.AreNotSame(msg1, msg2);
Gsv gsv1 = (Gsv)msg1;
- Assert.AreEqual(9, gsv1.SVsInView);
+ Assert.AreEqual(9, gsv1.SatellitesInView);
Assert.IsNotNull(gsv1.SVs);
Assert.AreEqual(4, gsv1.SVs.Count);
Gsv gsv2 = (Gsv)msg2;
- Assert.AreEqual(8, gsv2.SVsInView);
+ Assert.AreEqual(8, gsv2.SatellitesInView);
Assert.IsNotNull(gsv2.SVs);
Assert.AreEqual(4, gsv2.SVs.Count);
}
@@ -411,11 +429,11 @@ namespace NmeaParser.Tests
Assert.IsInstanceOfType(msg2, typeof(Gsv));
Assert.AreNotSame(msg2, msg3);
Gsv gsv2 = (Gsv)msg2;
- Assert.AreEqual(9, gsv2.SVsInView);
+ Assert.AreEqual(9, gsv2.SatellitesInView);
Assert.IsNotNull(gsv2.SVs);
Assert.AreEqual(4, gsv2.SVs.Count);
Gsv gsv3 = (Gsv)msg3;
- Assert.AreEqual(9, gsv3.SVsInView);
+ Assert.AreEqual(9, gsv3.SatellitesInView);
Assert.IsNotNull(gsv3.SVs);
Assert.AreEqual(1, gsv3.SVs.Count);
}
@@ -429,10 +447,10 @@ namespace NmeaParser.Tests
Assert.IsInstanceOfType(msg, typeof(Gsv));
Gsv gsv = (Gsv)msg;
Assert.IsFalse(((IMultiSentenceMessage)gsv).IsComplete);
- Assert.AreEqual(12, gsv.SVsInView);
+ Assert.AreEqual(12, gsv.SatellitesInView);
Assert.IsNotNull(gsv.SVs);
Assert.AreEqual(4, gsv.SVs.Count);
- Assert.AreEqual(4, gsv.SVs[1].PrnNumber);
+ Assert.AreEqual(4, gsv.SVs[1].Id);
Assert.IsTrue(double.IsNaN(gsv.SVs[1].Elevation));
Assert.IsTrue(double.IsNaN(gsv.SVs[1].Azimuth));
Assert.AreEqual(40, gsv.SVs[1].SignalToNoiseRatio);
@@ -492,7 +510,10 @@ namespace NmeaParser.Tests
Assert.AreEqual(-111.889230455, gns.Longitude, .000000000001);
Assert.AreEqual(Gns.Mode.Differential, gns.GpsModeIndicator);
Assert.AreEqual(Gns.Mode.NoFix, gns.GlonassModeIndicator);
- Assert.AreEqual(0, gns.FutureModeIndicator.Length);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.GalileoModeIndicator);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.BDSModeIndicator);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.QZSSModeIndicator);
+ Assert.AreEqual(1, gns.ModeIndicators.Length);
Assert.AreEqual(19, gns.NumberOfSatellites);
Assert.AreEqual(.6, gns.Hdop);
Assert.AreEqual(406.110, gns.OrhometricHeight);
@@ -515,7 +536,10 @@ namespace NmeaParser.Tests
Assert.AreEqual(double.NaN, gns.Longitude);
Assert.AreEqual(Gns.Mode.NoFix, gns.GpsModeIndicator);
Assert.AreEqual(Gns.Mode.NoFix, gns.GlonassModeIndicator);
- Assert.AreEqual(0, gns.FutureModeIndicator.Length);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.GalileoModeIndicator);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.BDSModeIndicator);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.QZSSModeIndicator);
+ Assert.AreEqual(0, gns.ModeIndicators.Length);
Assert.AreEqual(6, gns.NumberOfSatellites);
Assert.AreEqual(double.NaN, gns.Hdop);
Assert.AreEqual(double.NaN, gns.OrhometricHeight);
@@ -537,16 +561,47 @@ namespace NmeaParser.Tests
Assert.AreEqual(-117.196825025667, gns.Longitude, .00000000001);
Assert.AreEqual(Gns.Mode.Differential, gns.GpsModeIndicator);
Assert.AreEqual(Gns.Mode.Differential, gns.GlonassModeIndicator);
- Assert.AreEqual(3, gns.FutureModeIndicator.Length);
- Assert.AreEqual(Gns.Mode.NoFix, gns.FutureModeIndicator[0]);
- Assert.AreEqual(Gns.Mode.NoFix, gns.FutureModeIndicator[1]);
- Assert.AreEqual(Gns.Mode.NoFix, gns.FutureModeIndicator[2]);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.GalileoModeIndicator);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.BDSModeIndicator);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.QZSSModeIndicator);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.NavICModeIndicator);
+ Assert.AreEqual(5, gns.ModeIndicators.Length);
+ Assert.AreEqual(Gns.Mode.Differential, gns.ModeIndicators[0]);
+ Assert.AreEqual(Gns.Mode.Differential, gns.ModeIndicators[1]);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.ModeIndicators[2]);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.ModeIndicators[3]);
+ Assert.AreEqual(Gns.Mode.NoFix, gns.ModeIndicators[4]);
Assert.AreEqual(10, gns.NumberOfSatellites);
Assert.AreEqual(1.4, gns.Hdop);
Assert.AreEqual(402.411, gns.OrhometricHeight);
Assert.AreEqual(-32.133, gns.GeoidalSeparation);
Assert.AreEqual(TimeSpan.MaxValue, gns.TimeSinceLastDgpsUpdate);
Assert.AreEqual(null, gns.DgpsStationId);
+ Assert.AreEqual(Gns.NavigationalStatus.NotValid, gns.Status);
+ }
+
+ [TestMethod]
+ public void TestGngnsModeIndicators()
+ {
+ string input = "$GNGNS,122310.2,3722.425671,N,12258.856215,W,DAAAAA,14,0.9,1005.543,6.5,,,S*0E";
+ var msg = NmeaMessage.Parse(input);
+ Assert.IsInstanceOfType(msg, typeof(Gns));
+ Gns gns = (Gns)msg;
+ Assert.AreEqual(Gns.Mode.Differential, gns.GpsModeIndicator);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.GlonassModeIndicator);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.GalileoModeIndicator);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.BDSModeIndicator);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.QZSSModeIndicator);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.NavICModeIndicator);
+ Assert.AreEqual(6, gns.ModeIndicators.Length);
+ Assert.AreEqual(Gns.Mode.Differential, gns.ModeIndicators[0]);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.ModeIndicators[1]);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.ModeIndicators[2]);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.ModeIndicators[3]);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.ModeIndicators[4]);
+ Assert.AreEqual(Gns.Mode.Autonomous, gns.ModeIndicators[5]);
+ Assert.AreEqual(null, gns.DgpsStationId);
+ Assert.AreEqual(Gns.NavigationalStatus.Safe, gns.Status);
}
@@ -563,7 +618,7 @@ namespace NmeaParser.Tests
Assert.AreEqual(double.NaN, gns.Longitude);
Assert.AreEqual(Gns.Mode.NoFix, gns.GpsModeIndicator);
Assert.AreEqual(Gns.Mode.NoFix, gns.GlonassModeIndicator);
- Assert.AreEqual(0, gns.FutureModeIndicator.Length);
+ Assert.AreEqual(0, gns.ModeIndicators.Length);
Assert.AreEqual(4, gns.NumberOfSatellites);
Assert.AreEqual(double.NaN, gns.Hdop);
Assert.AreEqual(double.NaN, gns.OrhometricHeight);
@@ -708,10 +763,10 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Vtg));
Vtg vtg = (Vtg)msg;
- Assert.AreEqual(103.85, vtg.TrueCourseOverGround);
- Assert.AreEqual(92.79, vtg.MagneticCourseOverGround);
- Assert.AreEqual(0.14, vtg.SpeedInKnots);
- Assert.AreEqual(0.25, vtg.SpeedInKph);
+ Assert.AreEqual(103.85, vtg.CourseTrue);
+ Assert.AreEqual(92.79, vtg.CourseMagnetic);
+ Assert.AreEqual(0.14, vtg.SpeedKnots);
+ Assert.AreEqual(0.25, vtg.SpeedKph);
}
[TestMethod]
@@ -721,10 +776,10 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Vtg));
Vtg vtg = (Vtg)msg;
- Assert.IsTrue(double.IsNaN(vtg.TrueCourseOverGround));
- Assert.IsTrue(double.IsNaN(vtg.MagneticCourseOverGround));
- Assert.AreEqual(0.0, vtg.SpeedInKnots);
- Assert.AreEqual(0.0, vtg.SpeedInKph);
+ Assert.IsTrue(double.IsNaN(vtg.CourseTrue));
+ Assert.IsTrue(double.IsNaN(vtg.CourseMagnetic));
+ Assert.AreEqual(0.0, vtg.SpeedKnots);
+ Assert.AreEqual(0.0, vtg.SpeedKph);
}
[TestMethod]
@@ -734,7 +789,7 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Zda));
var zda = (Zda)msg;
- Assert.AreEqual(new DateTime(2018, 10, 02, 07, 54, 51, 00, DateTimeKind.Utc), zda.FixDateTime);
+ Assert.AreEqual(new DateTimeOffset(2018, 10, 02, 07, 54, 51, 00, TimeSpan.Zero), zda.FixDateTime);
}
[TestMethod]
@@ -744,7 +799,7 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Zda));
var zda = (Zda)msg;
- Assert.AreEqual(new DateTime(2005, 08, 25, 14, 30, 42, 00, DateTimeKind.Utc), zda.FixDateTime);
+ Assert.AreEqual(new DateTimeOffset(2005, 08, 25, 14, 30, 42, 00, TimeSpan.Zero), zda.FixDateTime);
}
[TestMethod]
@@ -754,7 +809,7 @@ namespace NmeaParser.Tests
var msg = NmeaMessage.Parse(input);
Assert.IsInstanceOfType(msg, typeof(Zda));
var zda = (Zda)msg;
- Assert.AreEqual(new DateTime(2015, 09, 21, 22, 56, 27, 00, DateTimeKind.Utc), zda.FixDateTime);
+ Assert.AreEqual(new DateTimeOffset(2015, 09, 21, 22, 56, 27, 00, TimeSpan.Zero), zda.FixDateTime);
}
}
}