diff --git a/flight/modules/StateEstimation/filtercf.c b/flight/modules/StateEstimation/filtercf.c index 2e20b51e4..fae8d1f8c 100644 --- a/flight/modules/StateEstimation/filtercf.c +++ b/flight/modules/StateEstimation/filtercf.c @@ -296,7 +296,7 @@ static filterResult complementaryFilter(struct data *this, float gyro[3], float float const gyrovary = pseudo_windowed_variance_get(&this->gyro_var[1]); float const gyrovarz = pseudo_windowed_variance_get(&this->gyro_var[2]); - if ((fabsf(gyrovarx) + fabsf(gyrovary) + fabsf(gyrovarz)) > 1.0f) { + if ((fabsf(gyrovarx) + fabsf(gyrovary) + fabsf(gyrovarz)) > this->attitudeSettings.BoardSteadyMaxVariance) { this->starttime = xTaskGetTickCount(); this->first_run = 1; return FILTERRESULT_WARNING; diff --git a/shared/uavobjectdefinition/attitudesettings.xml b/shared/uavobjectdefinition/attitudesettings.xml index e4a5e7a4a..73acb4bd0 100644 --- a/shared/uavobjectdefinition/attitudesettings.xml +++ b/shared/uavobjectdefinition/attitudesettings.xml @@ -12,6 +12,7 @@ +