mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Math: use new check_latlng helper
This commit is contained in:
parent
ce9ecf9f3d
commit
7b4c503052
@ -177,7 +177,7 @@ bool location_sanitize(const struct Location &defaultLoc, struct Location &loc)
|
||||
}
|
||||
|
||||
// limit lat/lng to appropriate ranges
|
||||
if (abs(loc.lat) > 90 * 1e7 || abs(loc.lng) > 180 * 1e7) {
|
||||
if (!check_latlng(loc)) {
|
||||
loc.lat = defaultLoc.lat;
|
||||
loc.lng = defaultLoc.lng;
|
||||
has_changed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user