From be76a8ea006f313893c1c643f763b11864a969b0 Mon Sep 17 00:00:00 2001 From: mort5161 Date: Fri, 25 Jul 2014 14:32:46 -0700 Subject: [PATCH] Added PGRME --- src/NmeaParser.Shared/Nmea/Gps/Garmin/PGRME.cs | 2 +- src/NmeaParser.Shared/NmeaParser.Shared.projitems | 2 +- src/NmeaParser.Tests/NmeaMessages.cs | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/NmeaParser.Shared/Nmea/Gps/Garmin/PGRME.cs b/src/NmeaParser.Shared/Nmea/Gps/Garmin/PGRME.cs index 0baae9e..b0e8409 100644 --- a/src/NmeaParser.Shared/Nmea/Gps/Garmin/PGRME.cs +++ b/src/NmeaParser.Shared/Nmea/Gps/Garmin/PGRME.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace BTDevices.Nmea.Gps +namespace NmeaParser.Nmea.Gps.Garmin { /// /// Recommended Minimum diff --git a/src/NmeaParser.Shared/NmeaParser.Shared.projitems b/src/NmeaParser.Shared/NmeaParser.Shared.projitems index de02017..4cef398 100644 --- a/src/NmeaParser.Shared/NmeaParser.Shared.projitems +++ b/src/NmeaParser.Shared/NmeaParser.Shared.projitems @@ -11,6 +11,7 @@ + @@ -23,7 +24,6 @@ - \ No newline at end of file diff --git a/src/NmeaParser.Tests/NmeaMessages.cs b/src/NmeaParser.Tests/NmeaMessages.cs index ad32f0f..d268824 100644 --- a/src/NmeaParser.Tests/NmeaMessages.cs +++ b/src/NmeaParser.Tests/NmeaMessages.cs @@ -132,5 +132,20 @@ namespace NmeaParser.Tests Assert.AreEqual(2.98, ptlna.SlopeDistance); Assert.AreEqual('M', ptlna.SlopeDistanceUnits); } + + [TestMethod] + public void TestPgrme() + { + string input = "$PGRME,2.3,M,3.3,M,4.0,M*2B"; + var msg = NmeaMessage.Parse(input); + Assert.IsInstanceOfType(msg, typeof(NmeaParser.Nmea.Gps.Garmin.Pgrme)); + NmeaParser.Nmea.Gps.Garmin.Pgrme rme = (NmeaParser.Nmea.Gps.Garmin.Pgrme)msg; + Assert.AreEqual(2.3, rme.HorizontalError); + Assert.AreEqual("M", rme.HorizontalErrorUnits); + Assert.AreEqual(3.3, rme.VerticalError); + Assert.AreEqual("M", rme.VerticalErrorUnits); + Assert.AreEqual(4.0, rme.SphericalError); + Assert.AreEqual("M", rme.SphericalErrorUnits); + } } }