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

DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13, 2022
More…