mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 10:17:36 +08:00
move init
This commit is contained in:
@@ -46,8 +46,7 @@ void Ekf::controlRangeHaglFusion(const imuSample &imu_sample)
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: move setting params to init function
|
||||
_rng_consistency_check.setGate(_params.ekf2_rng_k_gate);
|
||||
// Apply rotation to earth frame
|
||||
_range_sensor.updateSensorToEarthRotation(_R_to_earth);
|
||||
|
||||
// TODO: why isn't this being done anywhere?
|
||||
|
||||
@@ -402,7 +402,8 @@ void Ekf::updateParameters()
|
||||
_aux_global_position.updateParameters();
|
||||
#endif // CONFIG_EKF2_AUX_GLOBAL_POSITION
|
||||
#if defined (CONFIG_EKF2_RANGE_FINDER)
|
||||
// TODO: set the tilt/rotation shit
|
||||
// TODO: initialize static rangefinder parameters
|
||||
_rng_consistency_check.setGate(_params.ekf2_rng_k_gate);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ protected:
|
||||
uint64_t _range_time_last_good_sample{};
|
||||
|
||||
SensorRangeFinder _range_sensor{};
|
||||
RangeFinderConsistencyCheck _rng_consistency_check;
|
||||
RangeFinderConsistencyCheck _rng_consistency_check{};
|
||||
#endif // CONFIG_EKF2_RANGE_FINDER
|
||||
|
||||
#if defined(CONFIG_EKF2_OPTICAL_FLOW)
|
||||
|
||||
Reference in New Issue
Block a user