diff options
author | Keith Packard <keithp@keithp.com> | 2014-06-20 00:41:17 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-06-20 00:41:17 -0700 |
commit | 602d6a2424a5c16e22febf6b4e6b3816022261c7 (patch) | |
tree | ea302a4a96c0ec182e0f7fba1452203ef0c20dc3 /src/test | |
parent | 3016ee5f21ec66bf9230b90ab1420b8fad628f8d (diff) |
altos/aprs: Encode last serial number in SSID. Transmit serial in comment
This makes it a lot easier to tell which device is sending
information, and to receive data from multiple devices on the same
receiver.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/ao_aprs_test.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/test/ao_aprs_test.c b/src/test/ao_aprs_test.c index 86cf527a..573b5cb2 100644 --- a/src/test/ao_aprs_test.c +++ b/src/test/ao_aprs_test.c @@ -97,36 +97,12 @@ audio_gap(int secs) #endif } -#include <math.h> - -int -ao_aprs_encode_altitude_expensive(int meters) -{ - double feet = meters / 0.3048; - - double encode = log(feet) / log(1.002); - return floor(encode + 0.5); -} - // This is where we go after reset. int main(int argc, char **argv) { int e, x; int a; - for (a = 1; a < 100000; a++) { - e = ao_aprs_encode_altitude(a); - x = ao_aprs_encode_altitude_expensive(a); - - if (e != x) { - double back_feet, back_meters; - back_feet = pow(1.002, e); - back_meters = back_feet * 0.3048; - fprintf (stderr, "APRS altitude encoding failure: altitude %d actual %d expected %d actual meters %f\n", - a, e, x, back_meters); - } - } - audio_gap(1); ao_gps_data.latitude = (45.0 + 28.25 / 60.0) * 10000000; |