OSDN Git Service

IS-GPS-200のWordへの対応準備
authorkimikage <kimikage_ceo@hotmail.com>
Fri, 4 Feb 2011 16:50:12 +0000 (01:50 +0900)
committerkimikage <kimikage_ceo@hotmail.com>
Fri, 4 Feb 2011 16:50:12 +0000 (01:50 +0900)
Yubeshi/Gps/Word.cs [new file with mode: 0755]
Yubeshi/Yubeshi.csproj

diff --git a/Yubeshi/Gps/Word.cs b/Yubeshi/Gps/Word.cs
new file mode 100755 (executable)
index 0000000..6faf224
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ *     Yubeshi GPS Parser\r
+ *\r
+ *     This software is distributed under a zlib-style license.\r
+ *     See license.txt for more information.\r
+ */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+\r
+namespace Yubeshi.Gps\r
+{\r
+    public class Word\r
+    {\r
+        #region fields\r
+        protected uint value;\r
+\r
+        #endregion\r
+\r
+        #region constructor\r
+\r
+        public Word(uint source)\r
+        {\r
+            value = source;\r
+        }\r
+        #endregion\r
+\r
+        #region operator\r
+        public static implicit operator uint(Word word)\r
+        {\r
+            return (uint)word.value;\r
+        }\r
+        #endregion\r
+\r
+        #region properties\r
+        public uint Parity\r
+        {\r
+            get\r
+            {\r
+                return value >> 24;\r
+            }\r
+        }\r
+\r
+        #endregion\r
+    }\r
+}\r
index db6ec84..0a43c69 100755 (executable)
@@ -43,6 +43,7 @@
     <Compile Include="GeodeticCoordinate.cs" />\r
     <Compile Include="EcefCoordinate.cs" />\r
     <Compile Include="EcefVelocity.cs" />\r
+    <Compile Include="Gps\Word.cs" />\r
     <Compile Include="Nmea\Parser.cs" />\r
     <Compile Include="OctetString.cs" />\r
     <Compile Include="Parser.cs" />\r