Problem with position_set_golbal() function


Hii everyone !
I have a problem with my custom app.
I’m using the FlytSim to test my app.
I test two script: first use the cpp langage, and the second the “cppROS” langage.
When I try to set a GPS setpoint, my drone (in simulator) take off.
If the setpoint is far, the drone starts to go to this point BUT after 15seconds, it’s landing. I don’t understand why.
I’m using function position_set_global.
You find my code here :

Thanks !


Hi @Mr_Snicker5,

Sorry for the delayed response.
I hope you were able to fix the problem.

If not, can you please share FlytOS run log, when this happens. Click here to know more.



Yes, we have fixed this problem. How ? We have put “a while”, and we compare the lattitude and longitude of drone with our set point location. And if the delta is superior to 0.001 then the script continue else the drone land.

Thanks a lot,