I wrote a simple autonomous program to fly my quad from location A to location B using mavsdk. In order to confirm the drone has arrived to target location the current location is been compared to target location until the required accuracy condition is satisfied using GPS.
For safety reason, I am looking for an asynchronous way to break the code and regain remote control (RC) upon the use of one of the RC channels.
I guess I need to create two coroutines tasks and run those concurrently, one for the autonomous flight and one for checking if the RC channel was modified. If channel modification was detected then the autonomous flight coroutine should be stopped. It could be also that there is some built-in solution in mavsdk which I am not aware of.
I am new to mavsdk, asyncio, and drone in general and was wondering what is the correct approach I should take here.