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:
Silvan Fuhrer
2019-08-08 09:15:25 +02:00
committed by Beat Küng
parent 09f29dbb07
commit a7d9c73d4d
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -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) {