Take this flight as an example:
- Takeoff in GUIDED mode
- Drone flies to a few waypoints as described by the script
- Pilot switches to another mode (STABILIZE for example)
- Pilot flies around manually
In this scenario, the entire time that the pilot is in STABILIZE, MAVCTL is still executing commands. There should be infrastructure created which would allow the pilot to be able to switch the flight mode, and for execution to cease. And when the mode is switched back into GUIDED mode, the script picks up its execution where it left off.