Manage Waypoint with Python

Hello community,

im working with MissionPlanner for a while.

Now i want to check which part of my Workflow i can automate with python scripts.

When im on a survey i do the following:

  1. Upload Waypoints to drone
  2. Start Drone and go in Mission Mode
  3. RTL
  4. Check the messages for the last reached Waypoint
  5. Delete all Waypoint BEFORE the last reached one, except the first one.
  6. Upload the remaining Waypoints to the drone again

My questions:
Is there a possibility to get the Information about the last reached Waypoint and delete all the waypoints i want to delete with a python script?
Is there a possibility to write informations about all waypoints i reached during the fligt in a textfile?

I know how to work with python. I just need a little help for the start with Python-Scripts in MissionPlanner.

Thanks for your help

Hey @fsg9

You can achieve most of the things you’ve mentioned using pymavlink library. Check out this link for more details - Pymvalink (Python-mavgen) · MAVLink Developer Guide

Mission Planner uses an integrated python based on IronPython. There is not much documentation, but you can start with the examples in the scripts folder in Program Files(x86)/Mission Planner folder.

For the available clr.classes and their published methods and properties, you have to check the source code.