mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 01:53:48 +08:00
[ahrs] float_cmpl: set weight to 1.0 if heuristic is disabled
This commit is contained in:
@@ -270,6 +270,9 @@ void ahrs_update_accel(void) {
|
|||||||
ahrs_impl.weight = 1.0 - ahrs_impl.gravity_heuristic_factor * fabs(1.0 - g_meas_norm) / 10.0;
|
ahrs_impl.weight = 1.0 - ahrs_impl.gravity_heuristic_factor * fabs(1.0 - g_meas_norm) / 10.0;
|
||||||
Bound(ahrs_impl.weight, 0.15, 1.0);
|
Bound(ahrs_impl.weight, 0.15, 1.0);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
ahrs_impl.weight = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Complementary filter proportional gain.
|
/* Complementary filter proportional gain.
|
||||||
* Kp = 2 * zeta * omega * weight * AHRS_PROPAGATE_FREQUENCY / AHRS_CORRECT_FREQUENCY
|
* Kp = 2 * zeta * omega * weight * AHRS_PROPAGATE_FREQUENCY / AHRS_CORRECT_FREQUENCY
|
||||||
|
|||||||
Reference in New Issue
Block a user