mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-01-07 01:00:48 +01:00
Fix sample issues + minor property rename
This commit is contained in:
parent
a7dd92d432
commit
d7451c89bd
|
|
@ -46,7 +46,7 @@ namespace NmeaParser.Nmea
|
|||
Altitude = NmeaMessage.StringToDouble(message[8]);
|
||||
AltitudeUnits = message[9];
|
||||
GeoidalSeparation = NmeaMessage.StringToDouble(message[10]);
|
||||
HeightOfGeoidUnits = message[11];
|
||||
GeoidalSeparationUnits = message[11];
|
||||
var timeInSeconds = StringToDouble(message[12]);
|
||||
if (!double.IsNaN(timeInSeconds))
|
||||
TimeSinceLastDgpsUpdate = TimeSpan.FromSeconds(timeInSeconds);
|
||||
|
|
@ -105,12 +105,13 @@ namespace NmeaParser.Nmea
|
|||
/// <remarks>
|
||||
/// A negative value means mean-sea-level surface is below the WGS-84 ellipsoid surface.
|
||||
/// </remarks>
|
||||
/// <seealso cref="GeoidalSeparationUnits"/>
|
||||
public double GeoidalSeparation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Altitude units ('M' for Meters)
|
||||
/// </summary>
|
||||
public string HeightOfGeoidUnits { get; }
|
||||
public string GeoidalSeparationUnits { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Time since last DGPS update (ie age of the differential GPS data)
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
<local:KeyValuePairControl Header="Height of Geoid: ">
|
||||
<local:KeyValuePairControl.Value>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding HeightOfGeoid}" />
|
||||
<TextBlock Text="{Binding HeightOfGeoidUnits}" />
|
||||
<TextBlock Text="{Binding GeoidalSeparation}" />
|
||||
<TextBlock Text="{Binding GeoidalSeparationUnits}" />
|
||||
</StackPanel>
|
||||
</local:KeyValuePairControl.Value>
|
||||
</local:KeyValuePairControl>
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
<Border Background="CornflowerBlue" Padding="10" Margin="-10,-10,-10,5">
|
||||
<TextBlock Text="GPGSA" FontSize="20" FontWeight="Bold" Foreground="White" />
|
||||
</Border>
|
||||
<local:KeyValuePairControl Header="GPS Mode: " Value="{Binding GpsMode}"/>
|
||||
<local:KeyValuePairControl Header="Fix Mode: " Value="{Binding FixMode, Mode=OneTime}" />
|
||||
<local:KeyValuePairControl Header="Satellite vehicles: " Value="{Binding SVs, Mode=OneTime}" />
|
||||
<local:KeyValuePairControl Header="GPS Mode: " Value="{Binding Mode}"/>
|
||||
<local:KeyValuePairControl Header="Fix Mode: " Value="{Binding Fix, Mode=OneTime}" />
|
||||
<local:KeyValuePairControl Header="Satellite vehicles: " Value="{Binding SatelliteIDs, Mode=OneTime}" />
|
||||
<local:KeyValuePairControl Header="HDOP: " Value="{Binding Hdop, Mode=OneTime}" />
|
||||
<local:KeyValuePairControl Header="VDOP: " Value="{Binding Vdop, Mode=OneTime}" />
|
||||
<local:KeyValuePairControl Header="PDOP: " Value="{Binding Pdop, Mode=OneTime}" />
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ namespace NmeaParser.Tests
|
|||
Assert.AreEqual(1378, gga.Altitude);
|
||||
Assert.AreEqual("M", gga.AltitudeUnits);
|
||||
Assert.AreEqual(-22.1, gga.GeoidalSeparation);
|
||||
Assert.AreEqual("M", gga.HeightOfGeoidUnits);
|
||||
Assert.AreEqual("M", gga.GeoidalSeparationUnits);
|
||||
Assert.AreEqual(-1, gga.DgpsStationId);
|
||||
Assert.AreEqual(TimeSpan.MaxValue, gga.TimeSinceLastDgpsUpdate);
|
||||
}
|
||||
|
|
@ -220,7 +220,7 @@ namespace NmeaParser.Tests
|
|||
Assert.AreEqual(403.641, gga.Altitude);
|
||||
Assert.AreEqual("M", gga.AltitudeUnits);
|
||||
Assert.AreEqual(-32.133, gga.GeoidalSeparation);
|
||||
Assert.AreEqual("M", gga.HeightOfGeoidUnits);
|
||||
Assert.AreEqual("M", gga.GeoidalSeparationUnits);
|
||||
Assert.AreEqual(0, gga.DgpsStationId);
|
||||
Assert.AreEqual(TimeSpan.FromSeconds(1), gga.TimeSinceLastDgpsUpdate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue