It’s the wrong way around, sorry for this. I stumbled over a potential bug and spent the past 7 days trying to solve it without luck. The basic problem: when disabling GPS and running only with external navigation for the position, the SITL does very weird things. The drone takes off to the correct altitude and then heads towards the waypoint, but then only flies a few meters and bounces back in a somewhat circular motion. It will oscillate back and forth, sometimes switching to the next waypoint without reaching the prior one. The EKF is happy the whole time, drone is pitched in direction of the WP but flies backwards.
As a good developer I first thought it must be my external position i provide. But I spent a lot of time double checking it’s correct. I am now at a point, where I clearly see my external position giving good positions in the logs when flying with simulated GPS enabled. And still giving good results without GPS enabled, yet the controller still oscillates. It seems to be broken.
I discussed this with a colleague who has used this exact build successfully with the VISION_POSITION_ESTIMATE. Which brought me even closer to madness. But what he didn’t use is the geographic home point and waypoint navigation.