AP_NavEKF: fixed static const bug

This commit is contained in:
Andrew Tridgell 2015-12-19 16:08:58 +11:00
parent 02d7867d79
commit d24f6f4050
1 changed files with 2 additions and 2 deletions

View File

@ -4058,8 +4058,8 @@ void NavEKF_core::readHgtData()
// filtered baro data used to provide a reference for takeoff
// it is is reset to last height measurement on disarming in performArmingChecks()
if (!getTakeoffExpected()) {
static const float gndHgtFiltTC = 0.5f;
static const float dtBaro = msecHgtAvg*1.0e-3f;
const float gndHgtFiltTC = 0.5f;
const float dtBaro = msecHgtAvg*1.0e-3f;
float alpha = constrain_float(dtBaro / (dtBaro+gndHgtFiltTC),0.0f,1.0f);
meaHgtAtTakeOff += (hgtMea-meaHgtAtTakeOff)*alpha;
} else if (vehicleArmed && getTakeoffExpected()) {