disable side slip fusion for tailsitters

The attitude frame is wrong for tailsitters doing side slip fusion for wind estimation.
It doesn't take into account that the frames is 90deg tilted in FW flight.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-03-21 17:25:42 +01:00
parent 07531d29b7
commit 98d07ad1f3
6 changed files with 15 additions and 0 deletions
@@ -11,6 +11,8 @@
PX4_SIMULATOR=${PX4_SIMULATOR:=sihsim} PX4_SIMULATOR=${PX4_SIMULATOR:=sihsim}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=xvert} PX4_SIM_MODEL=${PX4_SIM_MODEL:=xvert}
param set-default EKF2_FUSE_BETA 0 # side slip fusion is currently not supported for tailsitters
param set-default SENS_EN_GPSSIM 1 param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1 param set-default SENS_EN_BAROSIM 1
param set-default SENS_EN_MAGSIM 1 param set-default SENS_EN_MAGSIM 1
@@ -9,6 +9,8 @@
param set-default MAV_TYPE 20 param set-default MAV_TYPE 20
param set-default EKF2_FUSE_BETA 0 # side slip fusion is currently not supported for tailsitters
param set-default CA_AIRFRAME 4 param set-default CA_AIRFRAME 4
param set-default CA_ROTOR_COUNT 4 param set-default CA_ROTOR_COUNT 4
@@ -17,6 +17,8 @@
. ${R}etc/init.d/rc.vtol_defaults . ${R}etc/init.d/rc.vtol_defaults
param set-default EKF2_FUSE_BETA 0 # side slip fusion is currently not supported for tailsitters
param set UAVCAN_ENABLE 0 param set UAVCAN_ENABLE 0
param set-default VT_ELEV_MC_LOCK 0 param set-default VT_ELEV_MC_LOCK 0
param set-default VT_MOT_COUNT 2 param set-default VT_MOT_COUNT 2
@@ -12,6 +12,8 @@
. ${R}etc/init.d/rc.vtol_defaults . ${R}etc/init.d/rc.vtol_defaults
param set-default EKF2_FUSE_BETA 0 # side slip fusion is currently not supported for tailsitters
param set-default CA_AIRFRAME 4 param set-default CA_AIRFRAME 4
param set-default CA_ROTOR_COUNT 2 param set-default CA_ROTOR_COUNT 2
param set-default CA_ROTOR0_KM -0.05 param set-default CA_ROTOR0_KM -0.05
+6
View File
@@ -2360,6 +2360,12 @@ 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) // 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.is_fixed_wing = (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING);
if (vehicle_status.is_vtol_tailsitter && _params->beta_fusion_enabled) {
PX4_WARN("Disable EKF beta fusion as unsupported for tailsitter");
_param_ekf2_fuse_beta.set(0);
_param_ekf2_fuse_beta.commit_no_notification();
}
} }
// vehicle_land_detected // vehicle_land_detected
+1
View File
@@ -1073,6 +1073,7 @@ PARAM_DEFINE_FLOAT(EKF2_EV_POS_Z, 0.0f);
* value will determine the minimum airspeed which will still be fused. Set to about 90% of the vehicles stall speed. * value will determine the minimum airspeed which will still be fused. Set to about 90% of the vehicles stall speed.
* Both airspeed fusion and sideslip fusion must be active for the EKF to continue navigating after loss of GPS. * Both airspeed fusion and sideslip fusion must be active for the EKF to continue navigating after loss of GPS.
* Use EKF2_FUSE_BETA to activate sideslip fusion. * Use EKF2_FUSE_BETA to activate sideslip fusion.
* Note: side slip fusion is currently not supported for tailsitters.
* *
* @group EKF2 * @group EKF2
* @min 0.0 * @min 0.0