OSDN Git Service

無効な入力に対する例外発生を抑制
[yubeshi/yubeshi.git] / Yubeshi / Nmea / GpGga.cs
index 9be7955..7754ddb 100755 (executable)
@@ -61,10 +61,16 @@ namespace Yubeshi.Nmea
                                     Degree.FromNmeaFormat(v[3], v[4]));\r
             FixQuality = (FixQualityClass)Int32.Parse(v[5]);\r
             TrackedSatellites = Int32.Parse(v[6]);\r
-            Dilution = Decimal.Parse(v[7]);\r
-            MslAltitude = GetLength(v[8], v[9]);\r
-            GeoidSeparation = GetLength(v[10], v[11]);\r
+            HorizontalDop = ParseDouble(v[7]);\r
+            MslAltitude = new Height(GetLength(v[8], v[9]), \r
+                                                    Height.Base.MeanSeaLevel);\r
+            GeoidSeparation = new Height(GetLength(v[10], v[11]),\r
+                                                Height.Base.Wgs84Ellipsoid);\r
+            double age = ParseDouble(v[12]);\r
             \r
+            AgeOfDgpsCorrections = Double.IsNaN(age)?\r
+                                TimeSpan.MinValue :TimeSpan.FromSeconds(age);\r
+            DgpsStation = ParseInt(v[13], -1);\r
             CheckSum = elements.CheckSum;\r
         }\r
 \r
@@ -96,25 +102,31 @@ namespace Yubeshi.Nmea
             private set;\r
         }\r
 \r
-        public decimal Dilution\r
+        public double HorizontalDop\r
         {\r
             get;\r
             private set;\r
         }\r
 \r
-        public decimal MslAltitude\r
+        public Height MslAltitude\r
         {\r
             get;\r
             private set;\r
         }\r
 \r
-        public decimal GeoidSeparation\r
+        public Height GeoidSeparation\r
         {\r
             get;\r
             private set;\r
         }\r
 \r
-        public int StationID\r
+        public TimeSpan AgeOfDgpsCorrections\r
+        {\r
+            get;\r
+            private set;\r
+        }\r
+\r
+        public int DgpsStation\r
         {\r
             get;\r
             private set;\r