Pushing a new mission to QGC automatically

I am currently working on an API that manages mission information. This API will hold mission items and they could differ from the QGC instance.

Currently, in order to get my mission items from my API to the QGC Instance, I have to click the ‘download’ button in the file tools so the UI gets updated with the mission data that is in my API at this moment.

What I would like to achieve is to be able to trigger the same exact behavior when I click the ‘download’ button under the file tools, but programmatically. I would like if possible to be able to call the same function that downloads the mission from the vehicle (PlanMasterController->loadFromVehicle()) but from the Vehicle.cc file.

What I actually want to do :

  1. Send a message to QGC to let it know that I have a updated mission and that it should download it
  2. QGC receives that messages and calls the appropriate function to download the entire mission from the vehicle
  3. QGC then asks for the mission and my API will send all the mission items/mission counts to QGC as described in the mavlink protocol
  4. The new mission will then be shown in QGC (Fly & Plan View)