Browse Source

added getter function for wind states

master
Youssef Demitri 9 years ago committed by Julian Oes
parent
commit
168d9add76
  1. 6
      EKF/airspeed_fusion.cpp
  2. 3
      EKF/ekf.h
  3. 2
      EKF/estimator_interface.h

6
EKF/airspeed_fusion.cpp

@ -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);
}

3
EKF/ekf.h

@ -97,6 +97,9 @@ public:
// get the state vector at the delayed time horizon // get the state vector at the delayed time horizon
void get_state_delayed(float *state); 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 // get the diagonal elements of the covariance matrix
void get_covariances(float *covariances); void get_covariances(float *covariances);

2
EKF/estimator_interface.h

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

Loading…
Cancel
Save