From: Keith Packard Date: Sun, 16 Dec 2012 21:31:45 +0000 (-0800) Subject: altos: Test APRS rounding by using coordinates near the boundary X-Git-Tag: 1.1.9.3~10^2~9 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=4e3ac3f2038cc3a43252fc8f820a1373a637ab83 altos: Test APRS rounding by using coordinates near the boundary 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 --- diff --git a/src/test/ao_aprs_test.c b/src/test/ao_aprs_test.c index f16c94e8..3b31f2d3 100644 --- a/src/test/ao_aprs_test.c +++ b/src/test/ao_aprs_test.c @@ -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); }