* parameter renaming

* move hor-motion check to method
This commit is contained in:
Marco Hauswirth
2025-08-26 15:08:55 +02:00
parent db468f78a1
commit c47b3ba1b0
6 changed files with 14 additions and 5 deletions
@@ -181,3 +181,12 @@ void RangeFinderConsistencyCheck::reset()
_initialized = false;
}
void RangeFinderConsistencyCheck::setHorizontalMotion(const bool horizontal_motion)
{
if (!horizontal_motion && getHorizontalMotion()) {
reset();
}
_horizontal_motion = horizontal_motion;
}
@@ -65,7 +65,7 @@ public:
void set_terrain_process_noise(float terrain_process_noise) { _terrain_process_noise = terrain_process_noise; }
void reset();
void setHorizontalMotion(const bool horizontal_motion) { _horizontal_motion = horizontal_motion; }
void setHorizontalMotion(const bool horizontal_motion);
bool getHorizontalMotion() const { return _horizontal_motion; }
void setIsLanded(bool landed);
@@ -57,7 +57,7 @@ void Ekf::controlRangeHaglFusion(const imuSample &imu_sample)
_range_sensor.setCosMaxTilt(_params.range_cos_max_tilt);
_range_sensor.setQualityHysteresis(_params.ekf2_rng_qlty_t);
_range_sensor.setMaxFogDistance(_params.ekf2_rng_fog);
_rng_consistency_check.setGate(_params.range_kin_consistency_gate);
_rng_consistency_check.setGate(_params.ekf2_rng_k_gate);
_range_sensor.runChecks(imu_sample.time_us, _R_to_earth);
+1 -1
View File
@@ -425,7 +425,7 @@ struct parameters {
float ekf2_rng_a_vmax{1.0f}; ///< maximum ground velocity for which we allow to use the range finder as height source (if rng_control == 1)
float ekf2_rng_qlty_t{1.0f}; ///< minimum duration during which the reported range finder signal quality needs to be non-zero in order to be declared valid (s)
float range_cos_max_tilt{0.7071f}; ///< cosine of the maximum tilt angle from the vertical that permits use of range finder and flow data
float range_kin_consistency_gate{0.5f}; ///< gate size used by the range finder kinematic consistency check
float ekf2_rng_k_gate{0.5f}; ///< gate size used by the range finder kinematic consistency check
float ekf2_rng_fog{0.f}; ///< max distance which a blocked range sensor measures (fog, dirt) [m]
Vector3f rng_pos_body{}; ///< xyz position of range sensor in body frame (m)
+1 -1
View File
@@ -163,7 +163,7 @@ EKF2::EKF2(bool multi_mode, const px4::wq_config_t &config, bool replay_mode):
_param_ekf2_rng_a_vmax(_params->ekf2_rng_a_vmax),
_param_ekf2_rng_a_hmax(_params->ekf2_rng_a_hmax),
_param_ekf2_rng_qlty_t(_params->ekf2_rng_qlty_t),
_param_range_kin_consistency_gate(_params->range_kin_consistency_gate),
_param_ekf2_rng_k_gate(_params->ekf2_rng_k_gate),
_param_ekf2_rng_fog(_params->ekf2_rng_fog),
_param_ekf2_rng_pos_x(_params->rng_pos_body(0)),
_param_ekf2_rng_pos_y(_params->rng_pos_body(1)),
+1 -1
View File
@@ -622,7 +622,7 @@ private:
(ParamExtFloat<px4::params::EKF2_RNG_A_VMAX>) _param_ekf2_rng_a_vmax,
(ParamExtFloat<px4::params::EKF2_RNG_A_HMAX>) _param_ekf2_rng_a_hmax,
(ParamExtFloat<px4::params::EKF2_RNG_QLTY_T>) _param_ekf2_rng_qlty_t,
(ParamExtFloat<px4::params::EKF2_RNG_K_GATE>) _param_range_kin_consistency_gate,
(ParamExtFloat<px4::params::EKF2_RNG_K_GATE>) _param_ekf2_rng_k_gate,
(ParamExtFloat<px4::params::EKF2_RNG_FOG>) _param_ekf2_rng_fog,
(ParamExtFloat<px4::params::EKF2_RNG_POS_X>) _param_ekf2_rng_pos_x,
(ParamExtFloat<px4::params::EKF2_RNG_POS_Y>) _param_ekf2_rng_pos_y,