forked from Archive/PX4-Autopilot
Merge pull request #184 from PX4/pr-rngDelayFix
fixed computation of range measurement timestamp
This commit is contained in:
commit
5ab90048e1
|
@ -241,9 +241,7 @@ void EstimatorInterface::setRangeData(uint64_t time_usec, float *data)
|
||||||
rangeSample range_sample_new = {};
|
rangeSample range_sample_new = {};
|
||||||
range_sample_new.rng = *data;
|
range_sample_new.rng = *data;
|
||||||
rng = *data;
|
rng = *data;
|
||||||
range_sample_new.time_us -= _params.range_delay_ms * 1000;
|
range_sample_new.time_us = time_usec - _params.range_delay_ms * 1000;
|
||||||
|
|
||||||
range_sample_new.time_us = time_usec;
|
|
||||||
_time_last_range = time_usec;
|
_time_last_range = time_usec;
|
||||||
|
|
||||||
_range_buffer.push(range_sample_new);
|
_range_buffer.push(range_sample_new);
|
||||||
|
|
Loading…
Reference in New Issue