Mission: sanity check location

This commit is contained in:
Randy Mackay 2015-08-27 14:22:05 +09:00
parent e1a7760d38
commit 13e360df08

View File

@ -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: