mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-21 07:33:18 +08:00
ekf2: initialize origin from corrent position when possible
This commit is contained in:
committed by
Mathieu Bresciani
parent
af752536b9
commit
130fefb1e7
@@ -280,8 +280,7 @@ bool Ekf::resetGlobalPosToExternalObservation(double lat_deg, double lon_deg, fl
|
||||
uint64_t timestamp_observation)
|
||||
{
|
||||
if (!_pos_ref.isInitialized()) {
|
||||
ECL_WARN("unable to reset global position, position reference not initialized");
|
||||
return false;
|
||||
return setLatLonOriginFromCurrentPos(lat_deg, lon_deg, accuracy);
|
||||
}
|
||||
|
||||
Vector2f pos_corrected = _pos_ref.project(lat_deg, lon_deg);
|
||||
|
||||
Reference in New Issue
Block a user