AP_NavEKF2: Add rangefinder body position offset to data buffer

This commit is contained in:
priseborough 2016-10-12 08:27:43 +11:00 committed by Andrew Tridgell
parent 3148ad4623
commit 92c086b40e
2 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,9 @@ void NavEKF2_core::readRangeFinder(void)
// limit the measured range to be no less than the on-ground range
rangeDataNew.rng = MAX(storedRngMeas[sensorIndex][midIndex],rngOnGnd);
// get position in body frame for the current sensor
rangeDataNew.body_offset = frontend->_rng.get_pos_offset(sensorIndex);
// write data to buffer with time stamp to be fused when the fusion time horizon catches up with it
storedRange.push(rangeDataNew);

View File

@ -390,6 +390,7 @@ private:
struct range_elements {
float rng; // 0
uint32_t time_ms; // 1
Vector3f body_offset; // 2..4
};
struct tas_elements {