added getter function for wind states

This commit is contained in:
Youssef Demitri 2016-07-12 11:40:41 +02:00 committed by Julian Oes
parent 73b8ac954d
commit 168d9add76
3 changed files with 11 additions and 0 deletions

View File

@ -202,3 +202,9 @@ void Ekf::fuseAirspeed()
}
}
}
void Ekf::get_wind_velocity(float *wind)
{
wind[0] = _state.wind_vel(0);
wind[1] = _state.wind_vel(1);
}

View File

@ -97,6 +97,9 @@ public:
// get the state vector at the delayed time horizon
void get_state_delayed(float *state);
// get the wind velocity in m/s
void get_wind_velocity(float *wind);
// get the diagonal elements of the covariance matrix
void get_covariances(float *covariances);

View File

@ -84,6 +84,8 @@ public:
virtual void get_state_delayed(float *state) = 0;
virtual void get_wind_velocity(float *wind) = 0;
virtual void get_covariances(float *covariances) = 0;
// get the ekf WGS-84 origin position and height and the system time it was last set