mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
fix(ekf2): fuse airspeed in both transition if above EKF2_ARSP_THR
This commit is contained in:
parent
2c337b77ab
commit
e5071beaa3
@ -94,7 +94,7 @@ void Ekf::controlAirDataFusion(const imuSample &imu_delayed)
|
||||
updateAirspeed(airspeed_sample, _aid_src_airspeed);
|
||||
|
||||
const bool continuing_conditions_passing = _control_status.flags.in_air && (_control_status.flags.fixed_wing
|
||||
|| _control_status.flags.in_transition_to_fw)
|
||||
|| _control_status.flags.in_transition)
|
||||
&& !_control_status.flags.fake_pos;
|
||||
|
||||
const bool is_airspeed_significant = airspeed_sample.true_airspeed > _params.ekf2_arsp_thr;
|
||||
|
||||
@ -268,7 +268,7 @@ struct systemFlagUpdate {
|
||||
bool is_fixed_wing{false};
|
||||
bool gnd_effect{false};
|
||||
bool constant_pos{false};
|
||||
bool in_transition_to_fw{false};
|
||||
bool in_transition{false};
|
||||
};
|
||||
|
||||
struct parameters {
|
||||
@ -593,7 +593,7 @@ uint64_t gnss_fault :
|
||||
uint64_t yaw_manual : 1; ///< 46 - true if yaw has been reset manually
|
||||
uint64_t gnss_hgt_fault :
|
||||
1; ///< 47 - true if GNSS measurements (alt) have been declared faulty and are no longer used
|
||||
uint64_t in_transition_to_fw : 1; ///< 48 - true if the vehicle is in transition to fw
|
||||
uint64_t in_transition : 1; ///< 48 - true if the vehicle is in vtol transition
|
||||
|
||||
} flags;
|
||||
uint64_t value;
|
||||
|
||||
@ -58,7 +58,7 @@ void Ekf::controlFusionModes(const imuSample &imu_delayed)
|
||||
set_in_air_status(system_flags_delayed.in_air);
|
||||
|
||||
set_is_fixed_wing(system_flags_delayed.is_fixed_wing);
|
||||
set_in_transition_to_fw(system_flags_delayed.in_transition_to_fw);
|
||||
set_in_transition(system_flags_delayed.in_transition);
|
||||
|
||||
if (system_flags_delayed.gnd_effect) {
|
||||
set_gnd_effect();
|
||||
|
||||
@ -197,7 +197,7 @@ public:
|
||||
// set vehicle is fixed wing status
|
||||
void set_is_fixed_wing(bool is_fixed_wing) { _control_status.flags.fixed_wing = is_fixed_wing; }
|
||||
|
||||
void set_in_transition_to_fw(bool in_transition) { _control_status.flags.in_transition_to_fw = in_transition; }
|
||||
void set_in_transition(bool in_transition) { _control_status.flags.in_transition = in_transition; }
|
||||
|
||||
// set flag if static pressure rise due to ground effect is expected
|
||||
// use _params.ekf2_gnd_eff_dz to adjust for expected rise in static pressure
|
||||
|
||||
@ -2608,7 +2608,7 @@ void EKF2::UpdateSystemFlagsSample(ekf2_timestamps_s &ekf2_timestamps)
|
||||
|
||||
// let the EKF know if the vehicle motion is that of a fixed wing (forward flight only relative to wind)
|
||||
flags.is_fixed_wing = (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING);
|
||||
flags.in_transition_to_fw = vehicle_status.in_transition_to_fw;
|
||||
flags.in_transition = vehicle_status.in_transition_mode;
|
||||
|
||||
#if defined(CONFIG_EKF2_SIDESLIP)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user