iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.11k stars 1.47k forks source link

Failsafe activated by mistake #10019

Closed GTFreeFlyer closed 3 months ago

GTFreeFlyer commented 4 months ago

Current Behavior

This one was my fault, but there are lessons to be learned here that can help improve safety:

After a fixed wing flight, I landed and taxied back to the pit area at the club. The plane was stopped on the ground for about a minute or so. I did forget to disarm, oops! I also turned off the transmitter before unplugging the LiPo in the aircraft... double oops! Failsafe kicked in and throttled up my plane for RTH which made it crash into a bench. I'm not blaming anyone except myself for this one.

Desired Behavior

INAV detects that plane is already on ground, and prevents any failsafe behavior. Make it fully dummy-proof.

Suggested Solution

This desired safety behavior should be regardless of any user settings such as min failsafe distance, etc, because a new user might forget to set up some of these safety parameters. There's no need for RTH to occur when the aircraft is already on the ground. I'm not familiar with the code, but perhaps some pseudo code like this would be good:


If failsafe_activated then
     If speed=0 AND altitude=0 AND throttle = 0 then  (maybe there's no need for throttle check?)
          'do nothing
     Else
          continue with failsafe routine
     Endif
Endif

Who does this impact? Who is this for?

Everyone, especially beginners who may have not set up some of the parameters correctly.

Additional context

I'm never doing that one again! Thanks for considering my suggestion.

breadoven commented 4 months ago

You need to include which version of INAV you're using. Assuming it's a recent version did you set nav_disarm_on_landingto OFF ? If it's set to ON then the plane should have disarmed once it was taxied back and was no longer moving. If set to OFF then currently landing detection isn't active based on the logic there's nothing to do with a fixed wing on the ground other than disarm so if not set to disarm detecting a landing serves no useful purpose. However, based on your situation maybe it makes sense to still detect a landing even if not set to disarm in order to inhibit things that should only happen in flight such as failsafe RTH.

I guess this is more of an issue for planes with wheels that can taxi after landing where you don't want it to disarm before you've had a chance to taxi back although if it did disarm in those circumstances you only have to rearm again to taxi back. If you don't taxi too fast landing detection won't become active again so there's no chance of another landing disarm happening until you disarm manually.