diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-18 21:26:18 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-18 21:26:18 +0200 |
commit | 2c0d192944744086905e622f445a523d6650cdc5 (patch) | |
tree | d2fcfe10e4a19be84a7f3e1a463472e80fd50ab7 /src | |
parent | cfcb76f627d164b3244e9b81b2fe2fe2e54ee045 (diff) | |
download | px4-firmware-2c0d192944744086905e622f445a523d6650cdc5.tar.gz px4-firmware-2c0d192944744086905e622f445a523d6650cdc5.tar.bz2 px4-firmware-2c0d192944744086905e622f445a523d6650cdc5.zip |
Use the wind speed estimate filtered values
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp index 6cb68fe77..c384b2566 100644 --- a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp +++ b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp @@ -1490,8 +1490,10 @@ FixedwingEstimator::task_main() if (hrt_elapsed_time(&_wind.timestamp) > 99000) { _wind.timestamp = _global_pos.timestamp; - _wind.windspeed_north = _ekf->states[14]; - _wind.windspeed_east = _ekf->states[15]; + _wind.windspeed_north = _ekf->windSpdFiltNorth; + _wind.windspeed_east = _ekf->windSpdFiltEast; + // XXX we need to do something smart about the covariance here + // but we default to the estimate covariance for now _wind.covariance_north = _ekf->P[14][14]; _wind.covariance_east = _ekf->P[15][15]; |