Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commander: remove COM_POS_FS_DELAY #24063

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions ROMFS/px4fmu_common/init.d/rc.fw_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ param set-default MAV_TYPE 1
#
# Default parameters for fixed wing UAVs.
#
param set-default COM_POS_FS_DELAY 5

# there is a 2.5 factor applied on the _FS thresholds if for invalidation
param set-default COM_POS_FS_EPH 50
param set-default COM_VEL_FS_EVH 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ void EstimatorChecks::setModeRequirementFlags(const Context &context, bool pre_f


// altitude
failsafe_flags.local_altitude_invalid = !lpos.z_valid || (now > lpos.timestamp + (_param_com_pos_fs_delay.get() * 1_s));
failsafe_flags.local_altitude_invalid = !lpos.z_valid || (now > lpos.timestamp + 1_s);


// attitude
Expand Down Expand Up @@ -864,7 +864,7 @@ bool EstimatorChecks::checkPosVelValidity(const hrt_abstime &now, const bool dat
const bool was_valid) const
{
bool valid = was_valid;
const bool data_stale = (now > data_timestamp_us + _param_com_pos_fs_delay.get() * 1_s) || (data_timestamp_us == 0);
const bool data_stale = (now > data_timestamp_us + 1_s) || (data_timestamp_us == 0);
const float req_accuracy = (was_valid ? required_accuracy * 2.5f : required_accuracy);
const bool level_check_pass = data_valid && !data_stale && (data_accuracy < req_accuracy);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class EstimatorChecks : public HealthAndArmingCheckBase
(ParamBool<px4::params::SYS_HAS_GPS>) _param_sys_has_gps,
(ParamFloat<px4::params::COM_POS_FS_EPH>) _param_com_pos_fs_eph,
(ParamFloat<px4::params::COM_VEL_FS_EVH>) _param_com_vel_fs_evh,
(ParamInt<px4::params::COM_POS_FS_DELAY>) _param_com_pos_fs_delay,
(ParamFloat<px4::params::COM_POS_LOW_EPH>) _param_com_low_eph,
(ParamInt<px4::params::COM_POS_LOW_ACT>) _param_com_pos_low_act
)
Expand Down
13 changes: 0 additions & 13 deletions src/modules/commander/commander_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,19 +512,6 @@ PARAM_DEFINE_INT32(COM_ARM_AUTH_MET, 0);
*/
PARAM_DEFINE_FLOAT(COM_ARM_AUTH_TO, 1);

/**
* Loss of position failsafe activation delay.
*
* This sets number of seconds that the position checks need to be failed before the failsafe will activate.
* The default value has been optimised for rotary wing applications. For fixed wing applications, a larger value between 5 and 10 should be used.
*
* @unit s
* @group Commander
* @min 1
* @max 100
*/
PARAM_DEFINE_INT32(COM_POS_FS_DELAY, 1);

/**
* Horizontal position error threshold.
*
Expand Down
Loading