4 * This software is distributed under a zlib-style license.
\r
5 * See license.txt for more information.
\r
9 using System.Collections.Generic;
\r
12 namespace Yubeshi.Ubx
\r
14 public class NavPosLlh : Packet
\r
16 #region constructors
\r
18 public NavPosLlh(byte[] sentence, int length)
\r
19 : base(sentence, length)
\r
21 ID = MessageID.NavPosLlh;
\r
28 public decimal TimeOfWeek
\r
32 return BitConverter.ToUInt32(Raw, 6 + 0) * 1e-3m;
\r
36 public GeodeticCoordinate Position
\r
40 Degree lon = BitConverter.ToInt32(Raw, 6 + 4) * 1e-7;
\r
41 Degree lat = BitConverter.ToInt32(Raw, 6 + 8) * 1e-7;
\r
42 double h = BitConverter.ToUInt32(Raw, 6 + 12);
\r
43 return new GeodeticCoordinate(lon, lat, h);
\r
47 public double MslHeight
\r
51 return BitConverter.ToUInt32(Raw, 6 + 16);
\r
55 public double HorizonalAccuracy
\r
59 return BitConverter.ToUInt32(Raw, 6 + 20) * 1e-3;
\r
63 public double VerticalAccuracy
\r
67 return BitConverter.ToUInt32(Raw, 6 + 24) * 1e-3;
\r
72 #region public methods
\r
74 public static bool TryParse(byte[] sentence, out UnknownPacket packet)
\r
76 return TryParse(sentence, out packet,
\r
77 MessageID.NavPosLlh, 28, Build);
\r
82 #region private methods
\r
84 private static Packet Build(byte[] sentence, int length)
\r
86 return new NavPosLlh(sentence, length);
\r