From 4e3ac3f2038cc3a43252fc8f820a1373a637ab83 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 16 Dec 2012 13:31:45 -0800 Subject: [PATCH] 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 --- src/test/ao_aprs_test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); } -- 2.30.2