mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 19:30:36 +08:00
Commander: remove COM_POS_FS_DELAY
A user configurable delay for the internal `vehicle_local_position` seems confusing in my eyes. It's a different timeout for fixed-wing and multirotor which might have made sense earlier but not really anymore since the topic is constantly published by the estimator and not expected to time out on either vehicle type and the parameter description is also misleading because it's outdated.
This commit is contained in:
@@ -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
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@ private:
|
||||
(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
|
||||
)
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user