Automating the "load mission" and "write mission" functions of APM Planner 2.0


I currently have APM Planner 2.0 installed on a Raspberry Pi.

I also have autonomous flight missions created and saved as text files. My goal is to automate the process of writing those flight missions to the drone without actually opening the APM Planner software, and going through the steps of “loading” the pre-existing mission and “writing” to the drone.

Ideally, I could create a script that runs when the Raspberry Pi boots up, which simulates the “load” and “write” functions thereby preparing the drone for flight without the user actually interfacing with any software.

I have been looking at the open-source code posted here:
However, I haven’t been able to dissect the process enough to replicate it in the manner that I mentioned.

Is anyone familiar enough with the code that you could assist me with the process? … point me in the right direction? … or convince me that it is a fruitless effort?


Depending on your autopilot, you may want to use dronekit instead:

carpy, this looks to be a very promising lead to achieve my exact objectives. Thank you so much for the reference.