RTL vs.Loiter

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

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I have been working on code for the Ardustation as well as driving the Remzibi (from the Ardustation, not directly from the APM). When I select a flight mode (e.g. STABILIZE, FBW-A, etc.) on my radio TX I try to display the name of the current flight mode. Generally this works, but if I select RTL on my radio the mode I see via the MAVLink is LOITER. This means that the same indication is provided for a "true" loiter around the current position as well as for an RTL that will end up loitering around the home position that may be quite a distance away from the current position.

    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?

  • The index is not set to zero, so that won't work either...
  • I have the same issue
This reply was deleted.

Activity