AP_NavEKF: Make LLH output report last known position in const pos mode

This commit is contained in:
priseborough 2015-01-07 17:45:22 +11:00 committed by Andrew Tridgell
parent a0957a83f8
commit f0ea858e4c

View File

@ -3644,7 +3644,11 @@ bool NavEKF::getLLH(struct Location &loc) const
loc.alt = _ahrs->get_home().alt - state.position.z*100;
loc.flags.relative_alt = 0;
loc.flags.terrain_alt = 0;
location_offset(loc, state.position.x, state.position.y);
if (constPosMode) {
location_offset(loc, lastKnownPositionNE.x, lastKnownPositionNE.y);
} else {
location_offset(loc, state.position.x, state.position.y);
}
return true;
}