mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_NavEKF3: simplify taking of GPS measurements
This commit is contained in:
parent
8aabf7c22a
commit
f4591faeed
@ -339,10 +339,7 @@ bool NavEKF3_core::getGPSLLH(struct Location &loc) const
|
||||
{
|
||||
const auto &gps = dal.gps();
|
||||
if ((gps.status(selected_gps) >= AP_DAL_GPS::GPS_OK_FIX_3D)) {
|
||||
const struct Location &gpsloc = gps.location(selected_gps);
|
||||
loc = gpsloc;
|
||||
loc.relative_alt = 0;
|
||||
loc.terrain_alt = 0;
|
||||
loc = gps.location(selected_gps);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user