Is there any way to distinguish between RTL and loiter via the Mavlink? From what I can see, when an RTL command is active it is implemented as a loiter at the home position, so the flight status that is sent is loiter. The HK GCS and APM Planner both show "loiter" when RTL is selected. I am sure that I saw "home" or "RTL" when using one of the earlier APM loads, but not with 2.12. The only thing I can think of is to look for the active WP index being 0. Any other ideas?
Thank you,
Andrew
Replies
I had hoped that the WP index would be set to zero (i.e. the RTL would be implemented as a goto WP0), and it would then change to loiter when it reached home but it is actually implemented by commanding a loiter at the lat/long/altitude of the home position - the next WP index does not change. Maybe this is to allow the interrupted flight plan to continue even after an RTL has been commanded.
While I haven't tried this yet in the air, I suspect that if any situation that automatically causes an RTL is triggered there will be no way of the pilot knowing (beyond looking at the model or at the flight data for a constant roll and continually changing heading) to try to figure out if it is coming back, or loitering at the remote condition.
As far as I can see the HK GCS and APM Flight Planner behave the same way my code does.
If the definition of the MAVLink requires that RTL be implemented this way, so be it, but if it is left open I believe that it would be desirable to be able to tell the difference between these two modes.
Originally all the code was custom so it did whatever the dev team wanted now it has MAVLink integrated so APM must fit MAVLink. I believe I read that RTL is called Loiter because there is an RTL message in MAVLink but this may be outdated now as the code would seem to support both.
How do you mean distinguish? by the audio or name on the GCS or by sight or by some other means?