mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
Mission: sanity check location
This commit is contained in:
parent
e1a7760d38
commit
13e360df08
@ -705,6 +705,14 @@ bool AP_Mission::mavlink_to_mission_cmd(const mavlink_mission_item_t& packet, AP
|
||||
|
||||
// copy location from mavlink to command
|
||||
if (copy_location || copy_alt) {
|
||||
|
||||
// sanity check location
|
||||
if (copy_location) {
|
||||
if (fabsf(packet.x) > 90.0f || fabsf(packet.y) > 180.0f) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
switch (packet.frame) {
|
||||
|
||||
case MAV_FRAME_MISSION:
|
||||
|
Loading…
Reference in New Issue
Block a user