Skip to content

Commit

Permalink
disable side slip fusion for tailsitters
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sfuhrer committed Mar 21, 2023
1 parent 226b8fb commit 29d934a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ROMFS/px4fmu_common/init.d-posix/airframes/10042_sihsim_xvert
Expand Up @@ -11,6 +11,8 @@
PX4_SIMULATOR=${PX4_SIMULATOR:=sihsim}
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_BAROSIM 1
param set-default SENS_EN_MAGSIM 1
Expand Down
Expand Up @@ -9,6 +9,8 @@

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_ROTOR_COUNT 4
Expand Down
Expand Up @@ -17,6 +17,8 @@

. ${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-default VT_ELEV_MC_LOCK 0
param set-default VT_MOT_COUNT 2
Expand Down
Expand Up @@ -12,6 +12,8 @@

. ${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_ROTOR_COUNT 2
param set-default CA_ROTOR0_KM -0.05
Expand Down
6 changes: 6 additions & 0 deletions src/modules/ekf2/EKF2.cpp
Expand Up @@ -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)
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
Expand Down
1 change: 1 addition & 0 deletions src/modules/ekf2/ekf2_params.c
Expand Up @@ -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.
* 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.
* Note: side slip fusion is currently not supported for tailsitters.
*
* @group EKF2
* @min 0.0
Expand Down

0 comments on commit 29d934a

Please sign in to comment.