mirror of https://github.com/ArduPilot/ardupilot
Tracker: update how current_loc gets location
Get position from EKF but fall back to GPS if that fails
This commit is contained in:
parent
a693f9ead6
commit
16c9023cf0
|
@ -35,7 +35,7 @@ void Tracker::update_tracker_position()
|
|||
{
|
||||
// update our position if we have at least a 2D fix
|
||||
// REVISIT: what if we lose lock during a mission and the antenna is moving?
|
||||
if (gps.status() >= AP_GPS::GPS_OK_FIX_2D) {
|
||||
if (!ahrs.get_position(current_loc) && (gps.status() >= AP_GPS::GPS_OK_FIX_2D)) {
|
||||
current_loc = gps.location();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue