mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 08:36:08 +08:00
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:
@@ -173,7 +173,9 @@ void Ekf::get_true_airspeed(float *tas) const
|
|||||||
*/
|
*/
|
||||||
void Ekf::resetWindStates()
|
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)) {
|
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
|
// estimate wind using zero sideslip assumption and airspeed measurement if airspeed available
|
||||||
|
|||||||
Reference in New Issue
Block a user