With the fixed kalman filter, transitions across mach don't cause
bumps in the merged filter.
And, with working kalman bits, the signal for broken baro detection is
stronger and so we can allow for baro apogee detection in cases where
noise occurs close to apogee.
Bump the kalman filter to trust the baro less so that the model tracks
across mach.
Signed-off-by: Keith Packard <keithp@keithp.com>
* but the barometer is being ignored as
* it may be unreliable.
*/
- if (ao_speed < AO_MS_TO_SPEED(AO_MAX_BARO_SPEED) &&
- (ao_raw_alt >= AO_MAX_BARO_HEIGHT || ao_error_h_sq_avg < 30))
+ if (ao_speed < AO_MS_TO_SPEED(AO_MAX_BARO_SPEED))
{
ao_flight_state = ao_flight_coast;
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
*/
if (ao_speed < 0
#if !HAS_ACCEL
- && (ao_raw_alt >= AO_MAX_BARO_HEIGHT || ao_error_h_sq_avg < 30)
+ && (ao_raw_alt >= AO_MAX_BARO_HEIGHT || ao_error_h_sq_avg < 100)
#endif
)
{
cd ../kalman
-SIGMA_BOTH="-M 2 -H 4 -A 4"
-SIGMA_BARO="-M 2 -H 4 -A 4"
+SIGMA_BOTH="-M 2 -H 6 -A 2"
+SIGMA_BARO="-M 2 -H 6 -A 2"
SIGMA_ACCEL="-M 2 -H 4 -A 4"
nickle kalman.5c -p AO_BOTH -c both -t 0.01 $SIGMA_BOTH