forked from Archive/PX4-Autopilot
airspeed fusion: use yaw from 312 sequence when pitch is close to 90deg
This caused bad initialization of the wind estimate on tailsitters
This commit is contained in:
parent
e57af44d71
commit
71fc1b8161
|
@ -173,7 +173,9 @@ void Ekf::get_true_airspeed(float *tas) const
|
|||
*/
|
||||
void Ekf::resetWindStates()
|
||||
{
|
||||
const float euler_yaw = getEuler321Yaw(_state.quat_nominal);
|
||||
const float euler_yaw = shouldUse321RotationSequence(_R_to_earth)
|
||||
? getEuler321Yaw(_state.quat_nominal)
|
||||
: getEuler312Yaw(_state.quat_nominal);
|
||||
|
||||
if (_tas_data_ready && (_imu_sample_delayed.time_us - _airspeed_sample_delayed.time_us < (uint64_t)5e5)) {
|
||||
// estimate wind using zero sideslip assumption and airspeed measurement if airspeed available
|
||||
|
|
Loading…
Reference in New Issue