summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-10-12 14:02:29 -0700
committerKeith Packard <keithp@keithp.com>2012-10-12 14:02:29 -0700
commit7751c9cbc630f7251b8988f8da68be9a54ff552c (patch)
treee0166a82b9eda9843b86dbf44e549fad54f992e5 /src
parent866d10b3faa96f6c5a2c495a2c12a0d2bc8259ef (diff)
altos: Clean up types in Pa conversion testing code. Only test to 40km
A couple of missing 'int' declarations. Only test to 40km as above that there aren't enough data points to do anything reasonable Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/ao_convert_pa_test.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/ao_convert_pa_test.c b/src/core/ao_convert_pa_test.c
index 143ce958..7d5b1922 100644
--- a/src/core/ao_convert_pa_test.c
+++ b/src/core/ao_convert_pa_test.c
@@ -24,9 +24,10 @@ typedef int32_t alt_t;
#define STEP_P 1
#define STEP_A 1
-static inline i_abs(int i) { return i < 0 ? -i : i; }
+static inline int i_abs(int i) { return i < 0 ? -i : i; }
-main ()
+int
+main (int argc, char **argv)
{
int i;
int32_t p_to_a, p_to_a_to_p;
@@ -50,9 +51,7 @@ main ()
// printf ("pa %d alt %d pa %d\n",
// i, p_to_a, p_to_a_to_p);
}
- for (i = -1450; i < 74250 + STEP_A; i += STEP_A) {
- if (i > 74250)
- i = 74250;
+ for (i = -1450; i < 40000 + STEP_A; i += STEP_A) {
a_to_p = ao_altitude_to_pa(i);
a_to_p_to_a = ao_pa_to_altitude(a_to_p);
a_error = i_abs(a_to_p_to_a - i);