I have been trying out the PreciseHome feature and it works really nice in most cases.
My implementation of precise home is roughly this:
After connect I enable precise home using set_mode(standard).
After takeoff I wait until state == available
Going home is then activated using NavigateHome
However I don’t understand how to activate this feature when the drone is already close to home (within 20 meters?). If I send the NavigateHome command in this case the drone yaws to point towards the home location, but it does not fly to the home location.
Also, sometimes after takeoff I do not get state == available. How can I restart the precise home feature in this case? Is there a better way than to land and takeoff again?
I am using Olympe 1.2.0 and the problem occurs both using Sphinx and an Anafi drone with FW 1.6.8.
I wrote this code and it works fine. Ok, yaw towards home is missing, but it can be easily calculated and added.
But there is a problem with automatic RTH when the connection is lost with the drone. Then the standard RTH is triggered and it works just as you described - it doesn’t actually fly over the home position if the drone is closer than ca. 20 meters.
I cannot find any way to assign a custom RTH after the connection is lost, or to remove the 20m threshold for automatic RTH. I started a topic about it, but no replies yet: