Executing flight plans with Guided Piloting Interface

Hello,

I am implementing an interface for executing full flight plans with the GuidedPilotingItf. The input would contain a list of lat/long coordinates for the drone to travel to, and they would be executed sequentially with the Guided pilot interface.

However, I need to be able to detect RTH, so that these Guided missions don’t keep executing.
** Unless RTH makes the Guided Pilot unavailable? I would love to know **

Given that RTH doesn’t disable Guided pilot interface, how can I detect that the RTH button has been pressed so that I stop executing Guided pilot missions?

EDIT:
Follow up question, If I were to loop through a list of say, 5, locations and executed them in order with the GuidedPilotingItf, would the locations be stored in a queue on the drone to be executed? I don’t need to wait for one to finish before calling the next one, do I? If so, how would I know that one has completed?

Hi,

GuidedPilotingItf doesn’t store guided flights.
If moveToLocation or moveToRelativePosition are called while a guided flight is still in progress, the current guided flight will be stopped immediately and the new guided flight is started.

When the drone starts a Return To Home during a guided flight, the current guided flight will be stopped immediately and the drone returns to home, the ReturnHomePilotingItf state becomes active and GuidedPilotingItf state becomes idle.

If a new guided flight is asked during a Return To Home, the Return To Home will be stopped immediately and the new guided flight is started.

You can also look at FlightPlanPilotingItf that allows execute predefined flight plans.

Regards,
Maxime