common: Rename TimeAndPos::latitude to latitude_deg.
[gps-watch.git] / test / gps_test.rs
index 7a71a76b83160de3a7d6cee91f3efd71608a270c..57c88991f5fcb6a7eb4c75900f3c75529b521d79 100644 (file)
@@ -85,8 +85,8 @@ $GPGGA,110338.000,1234.5678,N,12345.6789,E,\
 
     assert_eq!(true, has_fix);
     assert_eq!(1477998218, tap.unix_time);
-    assert_eq!(7545678, tap.latitude);
-    assert_eq!(74256789, tap.longitude);
+    assert_eq!(7545678, tap.latitude_deg);
+    assert_eq!(74256789, tap.longitude_deg);
     assert_eq!(0.21949487565883447, tap.latitude_rad.to_f32());
     assert_eq!(2.160042433347846, tap.longitude_rad.to_f32());
 }
@@ -96,8 +96,8 @@ fn distance_cm0() {
     let tap0 = gps::TimeAndPos {
         system_time: 0,
         unix_time: 0,
-        latitude: 0,
-        longitude: 0,
+        latitude_deg: 0,
+        longitude_deg: 0,
         latitude_rad: Fixed::from_f32(49.02541333).to_radians(),
         longitude_rad: Fixed::from_f32(8.79440167).to_radians(),
     };
@@ -105,8 +105,8 @@ fn distance_cm0() {
     let tap1 = gps::TimeAndPos {
         system_time: 1,
         unix_time: 1,
-        latitude: 0,
-        longitude: 0,
+        latitude_deg: 0,
+        longitude_deg: 0,
         latitude_rad: Fixed::from_f32(49.02541000).to_radians(),
         longitude_rad: Fixed::from_f32(8.79443667).to_radians(),
     };