From 7a4f6d5ad55637cde97a1e2f247f92df59bc2e14 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 18 Mar 2011 21:01:15 -0700 Subject: [PATCH] altos: Write height values to log for nano/mini This is a lot more useful than the old filtered pressure data. Signed-off-by: Keith Packard --- src/ao.h | 7 +++++++ src/ao_log_tiny.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ao.h b/src/ao.h index fd8c6034..63f80678 100644 --- a/src/ao.h +++ b/src/ao.h @@ -706,6 +706,13 @@ extern __pdata int16_t ao_ground_accel; extern __pdata int16_t ao_min_pres; extern __pdata uint16_t ao_launch_time; extern __xdata uint8_t ao_flight_force_idle; +#ifdef USE_KALMAN +extern __pdata int16_t ao_ground_height; +extern __pdata int32_t ao_k_max_height; +extern __pdata int32_t ao_k_height; +extern __pdata int32_t ao_k_speed; +extern __pdata int32_t ao_k_accel; +#endif /* Flight thread */ void diff --git a/src/ao_log_tiny.c b/src/ao_log_tiny.c index 157073d4..fad2a242 100644 --- a/src/ao_log_tiny.c +++ b/src/ao_log_tiny.c @@ -69,7 +69,7 @@ ao_log(void) if (ao_log_tiny_state == ao_flight_landed) ao_log_stop(); } - ao_log_tiny_data(ao_flight_pres); // XXX change to alt + ao_log_tiny_data(ao_k_height >> 16); time += ao_log_tiny_interval; delay = time - ao_time(); if (delay > 0) -- 2.30.2