Open danilofariadutra opened 7 months ago
Agent comment from yating.liao in Zendesk ticket #104243:
Could you clarify if the distance you are referring to is the flying distance after the aircraft takes off, or the straight-line distance between the current position of the aircraft and the return point?
Thank you.
°°°
the straight-line distance between the current position of the aircraft and the return point
Agent comment from yating.liao in Zendesk ticket #104243:
You can calculate the distance between the current location of the aircraft and the return point after obtaining their positions. The current location of the aircraft can be obtained using FlightController.getState.getAircraftLocation. The return point location can be obtained using FlightController.getState.getHomeLocation. The latitude and longitude coordinates obtained are all based on the WGS84 coordinate system.
°°°
What method should I use to acquire the value of the distance already traveled between the homepoint and the current location of the drone, just like in the DJI app?