mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-25 23:56:37 +08:00
Wind estimator: added wind_estimator_reset state (to indicate if wind estimator was reset in last fusion-cycle)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -88,6 +88,8 @@ WindEstimator::initialise(const matrix::Vector3f &velI, const matrix::Vector2f &
|
||||
_time_rejected_tas = 0;
|
||||
_time_rejected_beta = 0;
|
||||
|
||||
_wind_estimator_reset = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -98,6 +100,9 @@ WindEstimator::update(uint64_t time_now)
|
||||
return;
|
||||
}
|
||||
|
||||
// set reset state to false (is set to true when initialise fuction is called later)
|
||||
_wind_estimator_reset = false;
|
||||
|
||||
// run covariance prediction at 1Hz
|
||||
if (time_now - _time_last_update < 1000 * 1000 || _time_last_update == 0) {
|
||||
if (_time_last_update == 0) {
|
||||
|
||||
Reference in New Issue
Block a user