FlightPlan with Olympe

Hello,
I’m trying to send a flight plan to anafi using olympe.
In the olympe message documentation I found a page about FlightPlans Common.FlighPlan, however I don’t know how to use it.
Does olympe have functions to upload, start, etc. flightplans on the anafi?

Hello,

To start/stop a flightplan, the commands you’re actually looking for are in Common.Mavlink : common.Mavlink.Pause and common.Mavlink.Stop (flightplans files are using the mavlink syntax).

For Anafi, flightplans are started using the common.Mavlink.Start(flightplan_uid, type='flightPlan') command where the flightplan_uid is an UID generated by the drone when you upload a new flightplan mavlink file to the drone.

To upload/download flightplans files on/from Anafi you can either :

  • use Freeflight6
  • use the drone web interface “Flightplans” tab (http://192.168.42.1/ for a real drone or http://10.202.0.1/ for a simulated drone). This interface also list available flightplans and their uid.
  • use the drone REST JSON API that is used by both Freeflight6 and the drone web interface
    • GET http://{drone_ip_address}/api/v1/upload/flightplans to list of available flightplans on the drone
    • GET http://{drone_ip_address}/api/v1/upload/flightplan/{flightplan_uid} to download a flightplan mavlink file
    • PUT http://{drone_ip_address}/api/v1/upload/flightplan to upload a new flightplan mavlink file (the json response is just the uid of the just uploaded flightplan)

Thank you very much.
Can I ask if there is any documentation available for the REST API?

Not yet but we are working on it.
In the meantime, it’s a very simple API and you can see how the web interface is built on top of it.