mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -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();
|
const auto &gps = dal.gps();
|
||||||
if ((gps.status(selected_gps) >= AP_DAL_GPS::GPS_OK_FIX_3D)) {
|
if ((gps.status(selected_gps) >= AP_DAL_GPS::GPS_OK_FIX_3D)) {
|
||||||
const struct Location &gpsloc = gps.location(selected_gps);
|
loc = gps.location(selected_gps);
|
||||||
loc = gpsloc;
|
|
||||||
loc.relative_alt = 0;
|
|
||||||
loc.terrain_alt = 0;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user