diff options
author | Keith Packard <keithp@keithp.com> | 2012-12-18 23:15:20 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-12-18 23:15:20 -0800 |
commit | 57487e78b90465a21c87cf30deb0aeaba0887332 (patch) | |
tree | 59f8627886140d300a0d45b790e9c6d4f2a65b14 /src/core/ao_sample.c | |
parent | 244415c515f21328cffe88d1369949a4af49a177 (diff) |
altos: Actually record ground averages for 6dof sensor
This gets the long-term averages for the 6dof sensors recorded into
the first flight log record.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_sample.c')
-rw-r--r-- | src/core/ao_sample.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/ao_sample.c b/src/core/ao_sample.c index 7a1eff8e..dec44f9f 100644 --- a/src/core/ao_sample.c +++ b/src/core/ao_sample.c @@ -172,8 +172,8 @@ ao_sample_preflight_update(void) ao_sample_preflight_set(); } +#if 0 #if HAS_GYRO - static int32_t p_filt; static int32_t y_filt; @@ -189,6 +189,7 @@ static gyro_t inline ao_gyro(void) { return ao_sqrt(p*p + y*y); } #endif +#endif uint8_t ao_sample(void) @@ -217,6 +218,8 @@ ao_sample(void) #endif #if HAS_GYRO ao_sample_accel_along = ao_data_along(ao_data); + ao_sample_accel_across = ao_data_across(ao_data); + ao_sample_accel_through = ao_data_through(ao_data); ao_sample_pitch = ao_data_pitch(ao_data); ao_sample_yaw = ao_data_yaw(ao_data); ao_sample_roll = ao_data_roll(ao_data); @@ -229,8 +232,7 @@ ao_sample(void) ao_sample_preflight_update(); ao_kalman(); #if HAS_GYRO - ao_sample_angle += ao_gyro(); - ao_sample_roll_angle += (ao_sample_roll - ao_ground_roll); + /* do quaternion stuff here... */ #endif } ao_sample_data = ao_data_ring_next(ao_sample_data); |