altos: Test APRS rounding by using coordinates near the boundary
authorKeith Packard <keithp@keithp.com>
Sun, 16 Dec 2012 21:31:45 +0000 (13:31 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 16 Dec 2012 21:31:45 +0000 (13:31 -0800)
This selects lat/lon and altitude near the rounding boundary to check
that the resulting APRS data is correctly computed.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/test/ao_aprs_test.c

index f16c94e8d696b93b53f0ca21732781b979826c4a..3b31f2d35ae764ce16033129fbe5481470bab70b 100644 (file)
@@ -93,13 +93,16 @@ int main(int argc, char **argv)
 {
     audio_gap(1);
 
-    ao_gps_data.latitude = 45.4694766 * 10000000;
-    ao_gps_data.longitude = -122.7376250 * 10000000;
-    ao_gps_data.altitude = 83;
+    ao_gps_data.latitude = (45.0 + 28.25 / 60.0) * 10000000;
+    ao_gps_data.longitude = (-(122 + 44.2649 / 60.0)) * 10000000;
+    ao_gps_data.altitude = 84;
 
     /* Transmit one packet */
     ao_aprs_send();
 
+    tncBuffer[strlen((char *) tncBuffer) - 2] = '\0';
+    fprintf(stderr, "packet: %s\n", tncBuffer);
+
     exit(0);
 }