summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-12-16 13:31:45 -0800
committerKeith Packard <keithp@keithp.com>2012-12-16 13:31:45 -0800
commit4e3ac3f2038cc3a43252fc8f820a1373a637ab83 (patch)
tree4d9729a2e1dbd5ad039b0db8de185525252b0c73
parent9bc701ce1132f04ec90ef22e6a7a90c67918737b (diff)
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 <keithp@keithp.com>
-rw-r--r--src/test/ao_aprs_test.c9
1 files 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);
}