summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-13 11:19:13 -0700
committerKeith Packard <keithp@keithp.com>2009-05-13 11:19:13 -0700
commit055331d5f7d5adc40c348c3efd331a562dcda82a (patch)
treec47bf1a167ff1e4926417af9629e460b316d2fbf
parentd91208fbf5fc7797b93087ef8619454c4bed0130 (diff)
Make ao_flight_test show AGL altitude and positive acceleration under boost
This makes the output more readable Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--ao_flight_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ao_flight_test.c b/ao_flight_test.c
index a94fc740..0b03eb1f 100644
--- a/ao_flight_test.c
+++ b/ao_flight_test.c
@@ -240,10 +240,10 @@ ao_dump_state(void)
return;
printf ("\t\t\t\t\t%s accel %g vel %g alt %d main %d\n",
ao_state_names[ao_flight_state],
- (ao_flight_accel - ao_ground_accel) / COUNTS_PER_G * GRAVITY,
+ (ao_ground_accel - ao_flight_accel) / COUNTS_PER_G * GRAVITY,
(double) ao_flight_vel / 100 / COUNTS_PER_G * GRAVITY,
- ao_pres_to_altitude(ao_flight_pres),
- ao_pres_to_altitude(ao_main_pres));
+ ao_pres_to_altitude(ao_flight_pres) - ao_pres_to_altitude(ao_ground_pres),
+ ao_pres_to_altitude(ao_main_pres) - ao_pres_to_altitude(ao_ground_pres));
if (ao_flight_state == ao_flight_landed)
exit(0);
}