add ref_timestamp (time when origin was set) to lpe

This commit is contained in:
ChristophTobler
2017-06-12 09:39:41 +05:30
committed by Kabir Mohammed
parent a1a0dd37dc
commit 9b5de23553
4 changed files with 10 additions and 1 deletions
@@ -66,6 +66,8 @@ void BlockLocalPositionEstimator::gpsInit()
map_projection_reproject(&_map_ref, -_x(X_x), -_x(X_y), &gpsLatOrigin, &gpsLonOrigin);
// reinit origin
map_projection_init(&_map_ref, gpsLatOrigin, gpsLonOrigin);
// set timestamp when origin was set to current time
_time_origin = _timeStamp;
// always override alt origin on first GPS to fix
// possible baro offset in global altitude at init