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 NavPosEcef : Packet
\r
16 #region constructors
\r
18 public NavPosEcef(byte[] sentence, int length)
\r
20 Raw = new byte[length + 8];
\r
21 Array.Copy(sentence, Raw, Raw.Length);
\r
23 uint tow = BitConverter.ToUInt32(sentence, 6 + 0);
\r
24 X = 0.01m * BitConverter.ToInt32(sentence, 6 + 4);
\r
25 Y = 0.01m * BitConverter.ToInt32(sentence, 6 + 8);
\r
26 Z = 0.01m * BitConverter.ToInt32(sentence, 6 + 12);
\r
33 public TimeSpan TimeOfWeek
\r
58 #region public methods
\r
60 public static bool TryParse(byte[] sentence, out Packet packet)
\r
62 return TryParse(sentence, out packet,
\r
63 MessageID.NavPosEcef, 20, Build);
\r
68 #region private methods
\r
70 private static Packet Build(byte[] sentence, int length)
\r
72 return new NavPosEcef(sentence, length);
\r