OSDN Git Service

LLH座標系に加えECEF座標系を追加
[yubeshi/yubeshi.git] / Yubeshi / Nmea / GpDtm.cs
index 0c345d0..f3a09ef 100755 (executable)
@@ -11,10 +11,24 @@ using System.Text;
 \r
 namespace Yubeshi.Nmea\r
 {\r
+    /// <summary>\r
+    ///     Datum Reference\r
+    /// </summary>\r
     public class GpDtm : Packet\r
     {\r
-        #region fields\r
+        #region type definitions\r
+        public enum Code\r
+        { \r
+            Unknown = 0,\r
+            Wgs84 = 84,\r
+            Wgs72 = 72,\r
+            UserDefined = 999,\r
+        }\r
 \r
+        #endregion\r
+\r
+        #region fields\r
+        private static Dictionary<string, Code> codes;\r
         private static readonly byte[] header;\r
         private const int elementNum = 8;\r
 \r
@@ -25,6 +39,10 @@ namespace Yubeshi.Nmea
         static GpDtm()\r
         {\r
             header = Encoding.ASCII.GetBytes("$GPDTM,");\r
+            codes = new Dictionary<string,Code>();\r
+            codes["W84"] = Code.Wgs84;\r
+            codes["W72"] = Code.Wgs72;\r
+            codes["999"] = Code.UserDefined;\r
         }\r
         \r
         public GpDtm()\r
@@ -44,7 +62,23 @@ namespace Yubeshi.Nmea
         #endregion\r
 \r
         #region properties\r
+        public Code LocalDatumCode\r
+        {\r
+            get;\r
+            private set;\r
+        }\r
+\r
+        public GeodeticCoordinate Offset\r
+        {\r
+            get;\r
+            private set;\r
+        }\r
 \r
+        public Code ReferenceDetumCode\r
+        {\r
+            get;\r
+            private set;\r
+        }\r
         #endregion\r
 \r
         #region public method\r