mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-17 11:20:35 +08:00
Refactor velocity reset (#788)
* Refactor velocity reset * Add unit tests for velocity resets * Expand updates to vertical buffer to velocity resets outside of resetHeight * Improve matrix library usage * Improve naming of vertical output samples * Fix update of output_vert_new during reset * Improve naming of vertical output samples 2
This commit is contained in:
@@ -17,7 +17,7 @@ void RangeFinder::send(uint64_t time)
|
||||
{
|
||||
_range_sample.time_us = time;
|
||||
_ekf->setRangeData(_range_sample);
|
||||
_ekf->set_rangefinder_limits(0.2f, 20.f); // This usually comes from the driver
|
||||
_ekf->set_rangefinder_limits(_min_distance, _max_distance);
|
||||
}
|
||||
|
||||
void RangeFinder::setData(float range_data_meters, int8_t range_quality)
|
||||
@@ -26,5 +26,11 @@ void RangeFinder::setData(float range_data_meters, int8_t range_quality)
|
||||
_range_sample.quality = range_quality;
|
||||
}
|
||||
|
||||
void RangeFinder::setLimits(float min_distance_m, float max_distance_m)
|
||||
{
|
||||
_min_distance = min_distance_m;
|
||||
_max_distance = max_distance_m;
|
||||
}
|
||||
|
||||
} // namespace sensor
|
||||
} // namespace sensor_simulator
|
||||
|
||||
Reference in New Issue
Block a user