diff --git a/AntennaTracker/GCS_Mavlink.cpp b/AntennaTracker/GCS_Mavlink.cpp index 31c1148db9ea8..6c2a10554bb3b 100644 --- a/AntennaTracker/GCS_Mavlink.cpp +++ b/AntennaTracker/GCS_Mavlink.cpp @@ -597,7 +597,9 @@ void GCS_MAVLINK_Tracker::handle_message_mission_item(const mavlink_message_t &m msg.sysid, msg.compid, result, - MAV_MISSION_TYPE_MISSION); + MAV_MISSION_TYPE_MISSION, + 0 + ); } #endif diff --git a/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/empty.txt b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/empty.txt new file mode 100644 index 0000000000000..1d0bc59ad651f --- /dev/null +++ b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/empty.txt @@ -0,0 +1 @@ +QGC WPL 110 diff --git a/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/flaps.txt b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/flaps.txt new file mode 100644 index 0000000000000..93d0726c86ea6 --- /dev/null +++ b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/flaps.txt @@ -0,0 +1,13 @@ +QGC WPL 110 +0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.390015 1 +1 0 3 22 15.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 30.000000 1 +2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361229 149.163025 80.000000 1 +3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364563 149.163773 80.000000 1 +4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364384 149.164795 80.000000 1 +5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361027 149.164093 80.000000 1 +6 0 0 177 2.000000 3.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 +7 0 3 189 0.000000 0.000000 0.000000 0.000000 -35.362915 149.162613 60.000000 1 +8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363136 149.162750 60.000000 1 +9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365467 149.164215 55.000000 1 +10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365009 149.165482 39.889999 1 +11 0 3 21 0.000000 0.000000 0.000000 1.000000 -35.363041 149.165222 0.000000 1 diff --git a/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/jumpcount.txt b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/jumpcount.txt new file mode 100644 index 0000000000000..63d05f93c4510 --- /dev/null +++ b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/jumpcount.txt @@ -0,0 +1,9 @@ +QGC WPL 110 +0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165238 584.090027 1 +1 0 3 22 15.000000 0.000000 0.000000 0.000000 -35.359833 149.164703 41.029999 1 +2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.359585 149.161392 100.000000 1 +3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.366463 149.162231 100.000000 1 +4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.366131 149.164581 100.000000 1 +5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.359272 149.163757 100.000000 1 +6 0 0 177 2.000000 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 +7 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.359272 149.163757 100.000000 1 diff --git a/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/justhome.txt b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/justhome.txt new file mode 100644 index 0000000000000..1bf7650d2a882 --- /dev/null +++ b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/justhome.txt @@ -0,0 +1,2 @@ +QGC WPL 110 +0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.362938 149.165085 650.000000 1 diff --git a/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/text.txt b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/text.txt new file mode 100644 index 0000000000000..0803b7a43344f --- /dev/null +++ b/Tools/autotest/ArduPlane_Tests/MissionOpaqueID/text.txt @@ -0,0 +1,374 @@ +QGC WPL 110 +0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363261 149.165230 584.090027 1 +1 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356827 149.162213 100.000000 1 +2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357696 149.162662 100.000000 1 +3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356827 149.162213 100.000000 1 +4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357712 149.161811 100.000000 1 +5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357423 149.162520 100.000000 1 +6 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357433 149.161937 100.000000 1 +7 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357367 149.163217 100.000000 1 +8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357333 149.163215 100.000000 1 +9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357297 149.163222 100.000000 1 +10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357260 149.163239 100.000000 1 +11 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357223 149.163255 100.000000 1 +12 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357190 149.163276 100.000000 1 +13 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357160 149.163303 100.000000 1 +14 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357131 149.163330 100.000000 1 +15 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357106 149.163361 100.000000 1 +16 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357087 149.163396 100.000000 1 +17 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357067 149.163430 100.000000 1 +18 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357058 149.163465 100.000000 1 +19 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357057 149.163500 100.000000 1 +20 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357058 149.163465 100.000000 1 +21 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357067 149.163430 100.000000 1 +22 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357087 149.163396 100.000000 1 +23 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357106 149.163361 100.000000 1 +24 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357131 149.163330 100.000000 1 +25 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357160 149.163303 100.000000 1 +26 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357190 149.163276 100.000000 1 +27 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357223 149.163255 100.000000 1 +28 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357260 149.163239 100.000000 1 +29 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357297 149.163222 100.000000 1 +30 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357333 149.163215 100.000000 1 +31 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357367 149.163217 100.000000 1 +32 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357062 149.163209 100.000000 1 +33 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357686 149.163225 100.000000 1 +34 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357041 149.164178 100.000000 1 +35 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357040 149.164221 100.000000 1 +36 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357045 149.164262 100.000000 1 +37 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357054 149.164301 100.000000 1 +38 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357063 149.164339 100.000000 1 +39 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357079 149.164373 100.000000 1 +40 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357103 149.164402 100.000000 1 +41 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357127 149.164431 100.000000 1 +42 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357158 149.164455 100.000000 1 +43 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357198 149.164472 100.000000 1 +44 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357238 149.164490 100.000000 1 +45 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357288 149.164500 100.000000 1 +46 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357349 149.164502 100.000000 1 +47 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357410 149.164503 100.000000 1 +48 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357461 149.164496 100.000000 1 +49 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357501 149.164480 100.000000 1 +50 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357542 149.164465 100.000000 1 +51 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357574 149.164443 100.000000 1 +52 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357599 149.164415 100.000000 1 +53 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357624 149.164388 100.000000 1 +54 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357642 149.164355 100.000000 1 +55 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357652 149.164317 100.000000 1 +56 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357662 149.164278 100.000000 1 +57 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357668 149.164238 100.000000 1 +58 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357669 149.164195 100.000000 1 +59 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357670 149.164152 100.000000 1 +60 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357665 149.164111 100.000000 1 +61 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357656 149.164073 100.000000 1 +62 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357647 149.164035 100.000000 1 +63 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357631 149.164002 100.000000 1 +64 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357607 149.163972 100.000000 1 +65 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357583 149.163943 100.000000 1 +66 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357551 149.163919 100.000000 1 +67 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357512 149.163902 100.000000 1 +68 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357472 149.163885 100.000000 1 +69 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357421 149.163875 100.000000 1 +70 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357361 149.163873 100.000000 1 +71 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357300 149.163872 100.000000 1 +72 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357249 149.163879 100.000000 1 +73 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357209 149.163894 100.000000 1 +74 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357168 149.163909 100.000000 1 +75 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357136 149.163931 100.000000 1 +76 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357111 149.163959 100.000000 1 +77 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357086 149.163987 100.000000 1 +78 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357068 149.164020 100.000000 1 +79 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357058 149.164057 100.000000 1 +80 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357048 149.164095 100.000000 1 +81 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357042 149.164135 100.000000 1 +82 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357041 149.164178 100.000000 1 +83 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357041 149.164178 100.000000 1 +84 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357040 149.164221 100.000000 1 +85 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357045 149.164262 100.000000 1 +86 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357054 149.164301 100.000000 1 +87 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357063 149.164339 100.000000 1 +88 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357079 149.164373 100.000000 1 +89 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357103 149.164402 100.000000 1 +90 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357127 149.164431 100.000000 1 +91 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357158 149.164455 100.000000 1 +92 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357198 149.164472 100.000000 1 +93 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357238 149.164490 100.000000 1 +94 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357288 149.164500 100.000000 1 +95 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357349 149.164502 100.000000 1 +96 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357410 149.164503 100.000000 1 +97 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357461 149.164496 100.000000 1 +98 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357501 149.164480 100.000000 1 +99 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357542 149.164465 100.000000 1 +100 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357574 149.164443 100.000000 1 +101 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357599 149.164415 100.000000 1 +102 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357624 149.164388 100.000000 1 +103 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357642 149.164355 100.000000 1 +104 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357652 149.164317 100.000000 1 +105 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357662 149.164278 100.000000 1 +106 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357668 149.164238 100.000000 1 +107 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357669 149.164195 100.000000 1 +108 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357670 149.164152 100.000000 1 +109 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357665 149.164111 100.000000 1 +110 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357656 149.164073 100.000000 1 +111 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357647 149.164035 100.000000 1 +112 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357631 149.164002 100.000000 1 +113 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357607 149.163972 100.000000 1 +114 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357583 149.163943 100.000000 1 +115 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357551 149.163919 100.000000 1 +116 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357512 149.163902 100.000000 1 +117 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357472 149.163885 100.000000 1 +118 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357421 149.163875 100.000000 1 +119 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357361 149.163873 100.000000 1 +120 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357300 149.163872 100.000000 1 +121 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357249 149.163879 100.000000 1 +122 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357209 149.163894 100.000000 1 +123 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357168 149.163909 100.000000 1 +124 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357136 149.163931 100.000000 1 +125 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357111 149.163959 100.000000 1 +126 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357086 149.163987 100.000000 1 +127 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357068 149.164020 100.000000 1 +128 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357058 149.164057 100.000000 1 +129 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357048 149.164095 100.000000 1 +130 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357042 149.164135 100.000000 1 +131 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357041 149.164178 100.000000 1 +132 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357663 149.164512 100.000000 1 +133 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356784 149.164488 100.000000 1 +134 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357489 149.165136 100.000000 1 +135 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357503 149.165136 100.000000 1 +136 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357519 149.165141 100.000000 1 +137 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357537 149.165150 100.000000 1 +138 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357556 149.165160 100.000000 1 +139 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357573 149.165175 100.000000 1 +140 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357589 149.165196 100.000000 1 +141 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357606 149.165216 100.000000 1 +142 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357619 149.165243 100.000000 1 +143 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357631 149.165276 100.000000 1 +144 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357642 149.165309 100.000000 1 +145 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357647 149.165349 100.000000 1 +146 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357646 149.165397 100.000000 1 +147 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357645 149.165445 100.000000 1 +148 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357638 149.165486 100.000000 1 +149 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357624 149.165522 100.000000 1 +150 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357610 149.165558 100.000000 1 +151 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357591 149.165588 100.000000 1 +152 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357569 149.165612 100.000000 1 +153 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357547 149.165636 100.000000 1 +154 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357522 149.165654 100.000000 1 +155 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357494 149.165666 100.000000 1 +156 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357466 149.165677 100.000000 1 +157 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357438 149.165683 100.000000 1 +158 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357410 149.165682 100.000000 1 +159 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357438 149.165683 100.000000 1 +160 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357466 149.165677 100.000000 1 +161 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357494 149.165666 100.000000 1 +162 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357522 149.165654 100.000000 1 +163 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357547 149.165636 100.000000 1 +164 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357569 149.165612 100.000000 1 +165 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357591 149.165588 100.000000 1 +166 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357610 149.165558 100.000000 1 +167 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357624 149.165522 100.000000 1 +168 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357638 149.165486 100.000000 1 +169 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357645 149.165445 100.000000 1 +170 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357646 149.165397 100.000000 1 +171 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357647 149.165349 100.000000 1 +172 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357642 149.165309 100.000000 1 +173 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357631 149.165276 100.000000 1 +174 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357619 149.165243 100.000000 1 +175 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357606 149.165216 100.000000 1 +176 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357589 149.165196 100.000000 1 +177 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357573 149.165175 100.000000 1 +178 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357556 149.165160 100.000000 1 +179 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357537 149.165150 100.000000 1 +180 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357519 149.165141 100.000000 1 +181 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357503 149.165136 100.000000 1 +182 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357489 149.165136 100.000000 1 +183 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357025 149.165123 100.000000 1 +184 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357641 149.165688 100.000000 1 +185 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357015 149.165671 100.000000 1 +186 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357629 149.166401 100.000000 1 +187 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356752 149.166377 100.000000 1 +188 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356746 149.166719 100.000000 1 +189 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356745 149.166787 100.000000 1 +190 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356750 149.166844 100.000000 1 +191 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356762 149.166888 100.000000 1 +192 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356774 149.166932 100.000000 1 +193 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356790 149.166967 100.000000 1 +194 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356810 149.166993 100.000000 1 +195 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356830 149.167019 100.000000 1 +196 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356854 149.167037 100.000000 1 +197 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356881 149.167048 100.000000 1 +198 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356908 149.167060 100.000000 1 +199 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356936 149.167067 100.000000 1 +200 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356965 149.167069 100.000000 1 +201 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356994 149.167071 100.000000 1 +202 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357023 149.167068 100.000000 1 +203 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357052 149.167059 100.000000 1 +204 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357081 149.167050 100.000000 1 +205 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357107 149.167034 100.000000 1 +206 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357130 149.167010 100.000000 1 +207 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357153 149.166986 100.000000 1 +208 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357172 149.166953 100.000000 1 +209 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357187 149.166913 100.000000 1 +210 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357202 149.166872 100.000000 1 +211 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357210 149.166821 100.000000 1 +212 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357211 149.166760 100.000000 1 +213 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357218 149.166390 100.000000 1 +214 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357211 149.166760 100.000000 1 +215 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357210 149.166820 100.000000 1 +216 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357202 149.166870 100.000000 1 +217 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357187 149.166911 100.000000 1 +218 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357173 149.166952 100.000000 1 +219 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357153 149.166984 100.000000 1 +220 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357130 149.167008 100.000000 1 +221 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357107 149.167033 100.000000 1 +222 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357081 149.167049 100.000000 1 +223 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357052 149.167058 100.000000 1 +224 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357023 149.167068 100.000000 1 +225 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356994 149.167071 100.000000 1 +226 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356965 149.167069 100.000000 1 +227 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356936 149.167067 100.000000 1 +228 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356908 149.167060 100.000000 1 +229 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356881 149.167048 100.000000 1 +230 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356854 149.167037 100.000000 1 +231 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356830 149.167019 100.000000 1 +232 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356810 149.166992 100.000000 1 +233 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356790 149.166966 100.000000 1 +234 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356774 149.166931 100.000000 1 +235 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356762 149.166887 100.000000 1 +236 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356750 149.166843 100.000000 1 +237 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356745 149.166787 100.000000 1 +238 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356746 149.166719 100.000000 1 +239 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356752 149.166377 100.000000 1 +240 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356982 149.167637 100.000000 1 +241 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357606 149.167654 100.000000 1 +242 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356728 149.167630 100.000000 1 +243 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356750 149.167631 100.000000 1 +244 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356718 149.168305 100.000000 1 +245 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357595 149.168328 100.000000 1 +246 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357579 149.169179 100.000000 1 +247 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357580 149.169132 100.000000 1 +248 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357576 149.169089 100.000000 1 +249 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357567 149.169048 100.000000 1 +250 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.169007 100.000000 1 +251 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357541 149.168971 100.000000 1 +252 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357517 149.168939 100.000000 1 +253 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357493 149.168908 100.000000 1 +254 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357461 149.168883 100.000000 1 +255 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357420 149.168864 100.000000 1 +256 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357380 149.168845 100.000000 1 +257 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357328 149.168835 100.000000 1 +258 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357267 149.168833 100.000000 1 +259 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357205 149.168832 100.000000 1 +260 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357154 149.168839 100.000000 1 +261 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357113 149.168856 100.000000 1 +262 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357072 149.168873 100.000000 1 +263 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357039 149.168896 100.000000 1 +264 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357014 149.168926 100.000000 1 +265 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356989 149.168956 100.000000 1 +266 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356972 149.168991 100.000000 1 +267 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356961 149.169032 100.000000 1 +268 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356950 149.169072 100.000000 1 +269 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356944 149.169115 100.000000 1 +270 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356943 149.169162 100.000000 1 +271 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356942 149.169208 100.000000 1 +272 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356947 149.169252 100.000000 1 +273 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356956 149.169294 100.000000 1 +274 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356966 149.169335 100.000000 1 +275 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356982 149.169371 100.000000 1 +276 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357006 149.169402 100.000000 1 +277 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357030 149.169433 100.000000 1 +278 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357062 149.169458 100.000000 1 +279 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357102 149.169477 100.000000 1 +280 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357142 149.169495 100.000000 1 +281 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357193 149.169506 100.000000 1 +282 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357255 149.169507 100.000000 1 +283 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357316 149.169509 100.000000 1 +284 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357368 149.169502 100.000000 1 +285 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357409 149.169485 100.000000 1 +286 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357450 149.169468 100.000000 1 +287 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357483 149.169445 100.000000 1 +288 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357508 149.169415 100.000000 1 +289 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357533 149.169386 100.000000 1 +290 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357551 149.169351 100.000000 1 +291 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357562 149.169310 100.000000 1 +292 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357573 149.169269 100.000000 1 +293 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357578 149.169225 100.000000 1 +294 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357579 149.169179 100.000000 1 +295 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357579 149.169179 100.000000 1 +296 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357580 149.169132 100.000000 1 +297 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357576 149.169089 100.000000 1 +298 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357567 149.169048 100.000000 1 +299 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.169007 100.000000 1 +300 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357541 149.168971 100.000000 1 +301 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357517 149.168939 100.000000 1 +302 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357493 149.168908 100.000000 1 +303 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357461 149.168883 100.000000 1 +304 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357420 149.168864 100.000000 1 +305 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357380 149.168845 100.000000 1 +306 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357328 149.168835 100.000000 1 +307 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357267 149.168833 100.000000 1 +308 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357205 149.168832 100.000000 1 +309 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357154 149.168839 100.000000 1 +310 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357113 149.168856 100.000000 1 +311 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357072 149.168873 100.000000 1 +312 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357039 149.168896 100.000000 1 +313 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357014 149.168926 100.000000 1 +314 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356989 149.168956 100.000000 1 +315 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356972 149.168991 100.000000 1 +316 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356961 149.169032 100.000000 1 +317 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356950 149.169072 100.000000 1 +318 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356944 149.169115 100.000000 1 +319 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356943 149.169162 100.000000 1 +320 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356942 149.169208 100.000000 1 +321 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356947 149.169252 100.000000 1 +322 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356956 149.169294 100.000000 1 +323 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356966 149.169335 100.000000 1 +324 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356982 149.169371 100.000000 1 +325 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357006 149.169402 100.000000 1 +326 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357030 149.169433 100.000000 1 +327 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357062 149.169458 100.000000 1 +328 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357102 149.169477 100.000000 1 +329 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357142 149.169495 100.000000 1 +330 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357193 149.169506 100.000000 1 +331 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357255 149.169507 100.000000 1 +332 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357316 149.169509 100.000000 1 +333 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357368 149.169502 100.000000 1 +334 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357409 149.169485 100.000000 1 +335 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357450 149.169468 100.000000 1 +336 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357483 149.169445 100.000000 1 +337 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357508 149.169415 100.000000 1 +338 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357533 149.169386 100.000000 1 +339 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357551 149.169351 100.000000 1 +340 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357562 149.169310 100.000000 1 +341 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357573 149.169269 100.000000 1 +342 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357578 149.169225 100.000000 1 +343 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357579 149.169179 100.000000 1 +344 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357555 149.170208 100.000000 1 +345 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357556 149.170190 100.000000 1 +346 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.170172 100.000000 1 +347 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.170153 100.000000 1 +348 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.170135 100.000000 1 +349 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357555 149.170119 100.000000 1 +350 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357551 149.170104 100.000000 1 +351 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357547 149.170090 100.000000 1 +352 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357540 149.170078 100.000000 1 +353 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357529 149.170069 100.000000 1 +354 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357518 149.170059 100.000000 1 +355 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357502 149.170055 100.000000 1 +356 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357482 149.170054 100.000000 1 +357 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356704 149.170033 100.000000 1 +358 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357482 149.170054 100.000000 1 +359 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357502 149.170055 100.000000 1 +360 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357518 149.170059 100.000000 1 +361 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357529 149.170069 100.000000 1 +362 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357540 149.170078 100.000000 1 +363 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357547 149.170090 100.000000 1 +364 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357551 149.170104 100.000000 1 +365 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357555 149.170119 100.000000 1 +366 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.170135 100.000000 1 +367 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.170153 100.000000 1 +368 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357557 149.170172 100.000000 1 +369 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357556 149.170190 100.000000 1 +370 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.357555 149.170208 100.000000 1 +371 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356931 149.170194 100.000000 1 +372 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.356936 149.169883 100.000000 1 diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index bc0d157258f51..2a8a7f2b5933f 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -4120,6 +4120,48 @@ def attempt_fence_breached_disable(start_mode, end_mode, expected_mode, action): attempt_fence_breached_disable(start_mode="FBWA", end_mode="FBWA", expected_mode="GUIDED", action=6) attempt_fence_breached_disable(start_mode="FBWA", end_mode="FBWA", expected_mode="GUIDED", action=7) + def get_mission_checksum(self): + self.drain_mav() + m = self.poll_message('MISSION_CURRENT') + print("Got %s" % str(m)) + return m.mission_id + + def MissionOpaqueID(self): + '''test support for vehicle identifying mission via opaque ID''' + jumpcount_checksum = 2006072681 + for missionstuff in [("text.txt", 4264322242), + ("empty.txt", 4294967295), + ("justhome.txt", 4294967295), + ("jumpcount.txt", jumpcount_checksum), + ]: + (filename, expected_checksum) = missionstuff + self.progress("Checking checksum for (%s)" % (filename,)) + self.load_mission(filename) + self.assert_cached_message_field_values('MISSION_ACK', { + "opaque_id": expected_checksum, + }) + # ensure it appears in the MISSION_CURRENT message: + self.assert_received_message_field_values('MISSION_CURRENT', { + "mission_id": expected_checksum, + }, poll=True) + + # fly the jump count mission, make sure the checksum doesn't + # change over time + self.load_mission("jumpcount.txt", strict=False) + self.set_current_waypoint(0, check_afterwards=False) + self.change_mode('AUTO') + self.wait_ready_to_arm() + self.arm_vehicle() + for i in range(2): + self.wait_current_waypoint(2, timeout=120) + self.wait_current_waypoint(3, timeout=120) + mission_checksum = self.get_mission_checksum() + if mission_checksum != jumpcount_checksum: + raise NotAchievedException( + "Mission checksum changed during mission; got=%u want=%u i=%u" % + (jumpcount_checksum, mission_checksum, i)) + self.fly_home_land_and_disarm() + def _MAV_CMD_DO_AUX_FUNCTION(self, run_cmd): '''Test triggering Auxiliary Functions via mavlink''' self.context_collect('STATUSTEXT') @@ -6396,6 +6438,7 @@ def tests1b(self): self.AutotuneFiltering, self.MegaSquirt, self.Hirth, + self.MissionOpaqueID, self.MSP_DJI, self.SpeedToFly, self.GlideSlopeThresh, diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index 3cab908b5951c..cbfeac0c3b449 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -5507,8 +5507,20 @@ def check_mission_item_upload_download(self, items, itype, mission_type, strict= self.progress("check %s upload/download: upload %u items" % (itype, len(items),)) self.upload_using_mission_protocol(mission_type, items) + upload_opaque_id = self.get_cached_message('MISSION_ACK').opaque_id + if upload_opaque_id == 0: + raise NotAchievedException("Expected non-zero upload opaque_id") + self.progress("Upload opaque_id=%s" % upload_opaque_id) self.progress("check %s upload/download: download items" % itype) downloaded_items = self.download_using_mission_protocol(mission_type) + download_opaque_id = self.get_cached_message('MISSION_COUNT').opaque_id + if download_opaque_id == 0: + raise NotAchievedException("Expected non-zero download opaque_id") + if upload_opaque_id != download_opaque_id: + raise NotAchievedException( + "Expected upload id and download id to be same; upload=%s download=%s" % + (upload_opaque_id, download_opaque_id)) + if len(items) != len(downloaded_items): raise NotAchievedException("Did not download same number of items as uploaded want=%u got=%u" % (len(items), len(downloaded_items))) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index 8edbc60474a7c..06b372a8a476a 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -237,7 +237,8 @@ class GCS_MAVLINK msg.sysid, msg.compid, result, - mission_type); + mission_type, + opaque_id_for_mission_type(mission_type)); } // packetReceived is called on any successful decode of a mavlink message @@ -332,6 +333,7 @@ class GCS_MAVLINK // mission is up to: virtual MISSION_STATE mission_state(const class AP_Mission &mission) const; // send a mission_current message for the supplied waypoint + uint32_t opaque_id_for_mission_type(MAV_MISSION_TYPE type) const; void send_mission_current(const class AP_Mission &mission, uint16_t seq); // common send functions diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 743b8b7e61d30..93b7cce1a0acf 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -616,7 +616,8 @@ void GCS_MAVLINK::handle_mission_request_list(const mavlink_message_t &msg) msg.sysid, msg.compid, MAV_MISSION_UNSUPPORTED, - packet.mission_type); + packet.mission_type, + 0); return; } @@ -675,6 +676,21 @@ MISSION_STATE GCS_MAVLINK::mission_state(const AP_Mission &mission) const return MISSION_STATE_UNKNOWN; } +// returns the opaque ID used for identifying a mission (or fence, or +// rally) on the vehicle. Returns 0 on failure. +uint32_t GCS_MAVLINK::opaque_id_for_mission_type(MAV_MISSION_TYPE type) const +{ + MissionItemProtocol *prot = gcs().get_prot_for_mission_type(type); + if (prot == nullptr) { + return 0; + } + + uint32_t opaque_id = 0; + UNUSED_RESULT(prot->opaque_id(opaque_id)); + + return opaque_id; +} + void GCS_MAVLINK::send_mission_current(const class AP_Mission &mission, uint16_t seq) { auto num_commands = mission.num_commands(); @@ -694,7 +710,11 @@ void GCS_MAVLINK::send_mission_current(const class AP_Mission &mission, uint16_t seq, num_commands, // total mission_state(mission), // mission_state - mission_mode); // mission_mode + mission_mode, // mission_mode + opaque_id_for_mission_type(MAV_MISSION_TYPE_MISSION), + 0, // fence_id, 0 meaning unsupported + 0 // rally_id, 0 meaning unsupported + ); } #if AP_MAVLINK_MISSION_SET_CURRENT_ENABLED @@ -750,7 +770,8 @@ void GCS_MAVLINK::handle_mission_count(const mavlink_message_t &msg) msg.sysid, msg.compid, MAV_MISSION_UNSUPPORTED, - packet.mission_type); + packet.mission_type, + 0); return; } diff --git a/libraries/GCS_MAVLink/MissionItemProtocol.cpp b/libraries/GCS_MAVLink/MissionItemProtocol.cpp index 5667578ad064e..1ace5464b4d5a 100644 --- a/libraries/GCS_MAVLink/MissionItemProtocol.cpp +++ b/libraries/GCS_MAVLink/MissionItemProtocol.cpp @@ -29,13 +29,21 @@ void MissionItemProtocol::init_send_requests(GCS_MAVLINK &_link, mission_request_warning_sent = false; } -void MissionItemProtocol::handle_mission_clear_all(const GCS_MAVLINK &_link, +void MissionItemProtocol::handle_mission_clear_all(GCS_MAVLINK &_link, const mavlink_message_t &msg) { - bool success = true; - success = success && cancel_upload(_link, msg); - success = success && clear_all_items(); - send_mission_ack(_link, msg, success ? MAV_MISSION_ACCEPTED : MAV_MISSION_ERROR); + if (!cancel_upload(_link, msg)) { + send_mission_ack(_link, msg, MAV_MISSION_ERROR); + return; + } + if (!clear_all_items()) { + send_mission_ack(_link, msg, MAV_MISSION_ERROR); + return; + } + link = &_link; + receiving = true; + timelast_receive_ms = AP_HAL::millis(); + transfer_is_complete(_link, msg); } bool MissionItemProtocol::mavlink2_requirement_met(const GCS_MAVLINK &_link, const mavlink_message_t &msg) const @@ -105,6 +113,9 @@ void MissionItemProtocol::handle_mission_count( if (packet.count == 0) { // no requests to send... + link = &_link; + receiving = true; + timelast_receive_ms = AP_HAL::millis(); transfer_is_complete(_link, msg); return; } @@ -132,11 +143,15 @@ void MissionItemProtocol::handle_mission_request_list( // reply with number of commands in the mission. The GCS will // then request each command separately CHECK_PAYLOAD_SIZE2_VOID(_link.get_chan(), MISSION_COUNT); + uint32_t _opaque_id = 0; + UNUSED_RESULT(opaque_id(_opaque_id)); mavlink_msg_mission_count_send(_link.get_chan(), msg.sysid, msg.compid, item_count(), - mission_type()); + mission_type(), + _opaque_id + ); } void MissionItemProtocol::handle_mission_request_int(GCS_MAVLINK &_link, @@ -325,8 +340,23 @@ void MissionItemProtocol::handle_mission_item(const mavlink_message_t &msg, cons void MissionItemProtocol::transfer_is_complete(const GCS_MAVLINK &_link, const mavlink_message_t &msg) { const MAV_MISSION_RESULT result = complete(_link); - send_mission_ack(_link, msg, result); free_upload_resources(); + uint32_t _opaque_id; + if (!receiving) { + INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control); + } + if (supports_opaque_id() && !opaque_id(_opaque_id)) { + // the opaque ID can't currently be calculated; we definitely + // want to have it in the mission ack to avoid race + // conditions. Defer sending the mission ack until it is + // available: + deferred_mission_ack.link = &_link; + deferred_mission_ack.sysid = msg.sysid; + deferred_mission_ack.compid = msg.compid; + deferred_mission_ack.opaque_id = 0; + return; + } + send_mission_ack(_link, msg, result); receiving = false; link = nullptr; } @@ -343,13 +373,23 @@ void MissionItemProtocol::send_mission_ack(const mavlink_message_t &msg, void MissionItemProtocol::send_mission_ack(const GCS_MAVLINK &_link, const mavlink_message_t &msg, MAV_MISSION_RESULT result) const +{ + send_mission_ack(_link, msg.sysid, msg.compid, result); +} +void MissionItemProtocol::send_mission_ack(const GCS_MAVLINK &_link, + uint8_t sysid, + uint8_t compid, + MAV_MISSION_RESULT result) const { CHECK_PAYLOAD_SIZE2_VOID(_link.get_chan(), MISSION_ACK); + uint32_t _opaque_id = 0; + UNUSED_RESULT(opaque_id(_opaque_id)); mavlink_msg_mission_ack_send(_link.get_chan(), - msg.sysid, - msg.compid, + sysid, + compid, result, - mission_type()); + mission_type(), + _opaque_id); } /** @@ -388,18 +428,22 @@ void MissionItemProtocol::update() INTERNAL_ERROR(AP_InternalError::error_t::gcs_bad_missionprotocol_link); return; } + + const mavlink_channel_t chan = link->get_chan(); // stop waypoint receiving if timeout const uint32_t tnow = AP_HAL::millis(); if (tnow - timelast_receive_ms > upload_timeout_ms) { receiving = false; timeout(); - const mavlink_channel_t chan = link->get_chan(); if (HAVE_PAYLOAD_SPACE(chan, MISSION_ACK)) { + uint32_t _opaque_id = 0; + UNUSED_RESULT(opaque_id(_opaque_id)); mavlink_msg_mission_ack_send(chan, dest_sysid, dest_compid, MAV_MISSION_OPERATION_CANCELLED, - mission_type()); + mission_type(), + _opaque_id); } link = nullptr; free_upload_resources(); @@ -411,6 +455,20 @@ void MissionItemProtocol::update() timelast_request_ms = tnow; link->send_message(next_item_ap_message_id()); } + + // send any deferred transfer acceptance (to allow for + // asynchronous opaque-id calculation) + if (HAVE_PAYLOAD_SPACE(chan, MISSION_ACK) && + deferred_mission_ack.link != nullptr && + deferred_mission_ack.opaque_id != 0) { + send_mission_ack(*deferred_mission_ack.link, + deferred_mission_ack.sysid, + deferred_mission_ack.compid, + MAV_MISSION_ACCEPTED); + deferred_mission_ack.link = nullptr; + receiving = false; + link = nullptr; + } } #endif // HAL_GCS_ENABLED diff --git a/libraries/GCS_MAVLink/MissionItemProtocol.h b/libraries/GCS_MAVLink/MissionItemProtocol.h index 37f37fd559716..65d01c8eb559d 100644 --- a/libraries/GCS_MAVLink/MissionItemProtocol.h +++ b/libraries/GCS_MAVLink/MissionItemProtocol.h @@ -49,11 +49,11 @@ class MissionItemProtocol void handle_mission_item(const mavlink_message_t &msg, const mavlink_mission_item_int_t &cmd); - void handle_mission_clear_all(const GCS_MAVLINK &link, + void handle_mission_clear_all(GCS_MAVLINK &link, const mavlink_message_t &msg); void queued_request_send(); - void update(); + virtual void update(); bool active_link_is(const GCS_MAVLINK *_link) const { return _link == link; }; @@ -64,6 +64,7 @@ class MissionItemProtocol // a method for GCS_MAVLINK to send warnings about received // MISSION_ITEM messages (we should be getting MISSION_ITEM_INT) void send_mission_item_warning(); + virtual bool opaque_id(uint32_t &checksum) const { return false; } protected: @@ -77,6 +78,13 @@ class MissionItemProtocol uint16_t request_last; // last request index + struct { + const GCS_MAVLINK *link; + uint8_t sysid; + uint8_t compid; + uint32_t opaque_id; // subclass fills this in when it is ready + } deferred_mission_ack; + private: // returns true if we are either not receiving, or we successfully @@ -121,6 +129,10 @@ class MissionItemProtocol void send_mission_ack(const mavlink_message_t &msg, MAV_MISSION_RESULT result) const; void send_mission_ack(const GCS_MAVLINK &link, const mavlink_message_t &msg, MAV_MISSION_RESULT result) const; + void send_mission_ack(const GCS_MAVLINK &_link, + uint8_t sysid, + uint8_t compid, + MAV_MISSION_RESULT result) const; virtual uint16_t item_count() const = 0; virtual uint16_t max_items() const = 0; @@ -144,4 +156,6 @@ class MissionItemProtocol virtual void timeout() {}; bool mavlink2_requirement_met(const GCS_MAVLINK &_link, const mavlink_message_t &msg) const; + + virtual bool supports_opaque_id() const { return false; } }; diff --git a/libraries/GCS_MAVLink/MissionItemProtocol_Waypoints.cpp b/libraries/GCS_MAVLink/MissionItemProtocol_Waypoints.cpp index 3605dc152b85f..b9f36c05ec49d 100644 --- a/libraries/GCS_MAVLink/MissionItemProtocol_Waypoints.cpp +++ b/libraries/GCS_MAVLink/MissionItemProtocol_Waypoints.cpp @@ -61,6 +61,7 @@ MAV_MISSION_RESULT MissionItemProtocol_Waypoints::complete(const GCS_MAVLINK &_l #if HAL_LOGGING_ENABLED AP::logger().Write_EntireMission(); #endif + invalidate_checksum(); return MAV_MISSION_ACCEPTED; } @@ -74,11 +75,14 @@ MAV_MISSION_RESULT MissionItemProtocol_Waypoints::get_item(const GCS_MAVLINK &_l // try to educate the GCS on the actual size of the mission: const mavlink_channel_t chan = _link.get_chan(); if (HAVE_PAYLOAD_SPACE(chan, MISSION_COUNT)) { + uint32_t _opaque_id = 0; + IGNORE_RETURN(opaque_id(_opaque_id)); mavlink_msg_mission_count_send(chan, msg.sysid, msg.compid, mission.num_commands(), - MAV_MISSION_TYPE_MISSION); + MAV_MISSION_TYPE_MISSION, + _opaque_id); } return MAV_MISSION_ERROR; } @@ -147,4 +151,128 @@ void MissionItemProtocol_Waypoints::truncate(const mavlink_mission_count_t &pack mission.truncate(packet.count); } +// returns a unique ID for this mission +bool MissionItemProtocol_Waypoints::opaque_id(uint32_t &checksum) const +{ + WITH_SEMAPHORE(mission.get_semaphore()); + switch (checksum_state.state) { + case ChecksumState::READY: + if (mission.last_change_time_ms() != checksum_state.mission_change_time_ms) { + return false; + } + checksum = checksum_state.checksum; + // can't use zero as the field is an extension field in mavlink2: + if (checksum == 0) { + checksum = UINT32_MAX; + } + return true; + case ChecksumState::CALCULATING: + case ChecksumState::ERROR: + return false; + } + return false; +} + +void MissionItemProtocol_Waypoints::invalidate_checksum() +{ + WITH_SEMAPHORE(mission.get_semaphore()); + + checksum_state.state = ChecksumState::CALCULATING; + checksum_state.checksum = 0; + checksum_state.current_waypoint = 1; + checksum_state.count = mission.num_commands(); + checksum_state.mission_change_time_ms = mission.last_change_time_ms(); +} + +void MissionItemProtocol_Waypoints::update_checksum() +{ + // update the checksum if required: + + WITH_SEMAPHORE(mission.get_semaphore()); + + const uint32_t mission_last_change_time_ms = mission.last_change_time_ms(); + + if (mission_last_change_time_ms == checksum_state.last_calculate_time_ms) { + return; + } + + // decide whether we need to start calculating the checksum from + // the start; we may be partially through the calculation and need + // to start again + bool do_initialisation = false; + switch (checksum_state.state) { + case ChecksumState::READY: + do_initialisation = true; + break; + case ChecksumState::CALCULATING: + if (checksum_state.mission_change_time_ms != mission_last_change_time_ms) { + // mission changed part-way through our calculations + do_initialisation = true; + } + break; + case ChecksumState::ERROR: + do_initialisation = true; + break; + } + + if (do_initialisation) { + invalidate_checksum(); + } + + const uint32_t now_ms = AP_HAL::millis(); + if (now_ms - mission.last_change_time_ms() < 500) { + // don't start to calculate unless the mission's been + // unchanged for a while. + return; + } + + // AP: Took 2.178000ms to checksum 373 points (5.839142ms/1000 points + for (uint16_t count = 0; + count<16 && checksum_state.current_waypoint