mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 07:21:36 +08:00
SensorRangeFinder: add distBottom function to get the vertical distance
This commit is contained in:
committed by
Mathieu Bresciani
parent
a998da1781
commit
572ad2df0a
@@ -88,6 +88,8 @@ public:
|
||||
void setRange(float rng) { _sample.rng = rng; }
|
||||
float getRange() const { return _sample.rng; }
|
||||
|
||||
float getDistBottom() const { return _sample.rng * _cos_tilt_rng_to_earth; }
|
||||
|
||||
void setDataReadiness(bool is_ready) { _is_sample_ready = is_ready; }
|
||||
void setValidity(bool is_valid) { _is_sample_valid = is_valid; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user