Plane: use the projected position for geofencing and waypoints
This commit is contained in:
parent
dcb60e190d
commit
ec0c894306
@ -1010,7 +1010,7 @@ static void update_GPS(void)
|
||||
}
|
||||
|
||||
// get position from AHRS
|
||||
have_position = ahrs.get_position(current_loc);
|
||||
have_position = ahrs.get_projected_position(current_loc);
|
||||
|
||||
if (g_gps->new_data && g_gps->status() >= GPS::GPS_OK_FIX_3D) {
|
||||
g_gps->new_data = false;
|
||||
|
@ -213,7 +213,7 @@ static void geofence_check(bool altitude_check_only)
|
||||
} else if (geofence_check_maxalt()) {
|
||||
outside = true;
|
||||
breach_type = FENCE_BREACH_MAXALT;
|
||||
} else if (!altitude_check_only && ahrs.get_position(loc)) {
|
||||
} else if (!altitude_check_only && ahrs.get_projected_position(loc)) {
|
||||
Vector2l location;
|
||||
location.x = loc.lat;
|
||||
location.y = loc.lng;
|
||||
|
Loading…
Reference in New Issue
Block a user