EKF: remove virtual getters from estimator_interface

This commit is contained in:
Daniel Agar
2020-11-02 09:35:47 -05:00
parent 48a8992caf
commit a21092804a
9 changed files with 195 additions and 402 deletions
+1 -6
View File
@@ -161,12 +161,7 @@ void Ekf::fuseAirspeed()
}
}
Vector2f Ekf::getWindVelocityVariance() const
{
return P.slice<2, 2>(22,22).diag();
}
void Ekf::get_true_airspeed(float *tas)
void Ekf::get_true_airspeed(float *tas) const
{
const float tempvar = sqrtf(sq(_state.vel(0) - _state.wind_vel(0)) + sq(_state.vel(1) - _state.wind_vel(1)) + sq(_state.vel(2)));
memcpy(tas, &tempvar, sizeof(float));