Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to specify a time delay before executing an autoland when the craft has RTH in FS #4123

Closed
evmoius opened this issue Dec 27, 2018 · 6 comments · Fixed by #9502

Comments

@evmoius
Copy link

evmoius commented Dec 27, 2018

Current Behavior

Currently a craft will land immediately (or not at all depending on configuration) after reaching it's home point if RTH failsafe is enabled.

Desired Behavior

An option to set a timer to delay landing after reaching home would be useful. I had a situation today where my plane was loitering overhead for 15 minutes before I was able to reestablish a control link to it. Having the time to get myself sorted out was great but I was fully expecting the pack to die resulting in a crash if I couldn't get the Crossfire connected again. If I could have set myself a timer that I knew would bring the plane down eventually that would be great. Sometimes an auto landing is not the best option due to trees or other obstacles that you may hit on the way down so having time to try and regain control is valuable. Could also be tied to voltage instead of time.

Suggested Solution

Add another option to the landing behavior dropdown in the advanced tuning tab that lets you specify an amount of time the plane will loiter on RTH FS before auto landing. Would also be great to have a timer counting down time to auto land in the OSD. An option to specify a cell voltage level could also be useful for triggering auto land so there would be no danger of running the pack down to a level that damages it.

Who does this impact? Who is this for?

This is for all fixed wing users

Additional context

@evmoius evmoius closed this as completed Dec 27, 2018
@evmoius evmoius reopened this Dec 27, 2018
@evmoius
Copy link
Author

evmoius commented Dec 27, 2018

Sorry for the close and reopen. My GitHub skills are weak.

@fiam
Copy link
Member

fiam commented Jan 2, 2019

@evmoius Doesn't the "Land only on failsafe" option satisfy your use case? A timer seems needlessly complicated to me, because if you set it too low it won't be helpful and if you set it too high it might drain the battery before it lands. Tying it to battery voltage comes with another set of problems. See the issues regarding automatic RTH on low battery for a detailed discussion.

@evmoius
Copy link
Author

evmoius commented Jan 12, 2019

@fiam
If the plane had autolanded where I was flying there is a good chance it would have hit an obstacle. Since I was able to eventually get it back under control, having some time to troubleshoot it while in the air would be great, plus I would also have some peace of mind that it will indeed attempt to land if all else fails rather than just crash when the lipo dies.

Keep in mind this would just be an additional option to the current failsafe modes. My plane can fly for an hour so running out of battery isn't a huge concern with most of my flights less than half an hour.

@hali9
Copy link
Contributor

hali9 commented Mar 27, 2019

Waypoint has 3 additional parameters p1, p2, p3 and p2, p3 are not used.
Maybe we can use p2 to store time in seconds, how long the plane should wait after reaching the point.
This will work for the waypoint and waypoint rth.
I'm trying do something like that development...hali9:wait-wp-rth but do not have time to test it.

For normal rth, cli parameter rth_home_wait can be create similar to rth_home_altitude.
A new stage will need to be created NAV_STATE_RTH_WAIT_ABOVE_HOME.
When rth_home_altitude is not set and allow landing go to NAV_STATE_RTH_WAIT_ABOVE_HOME wait rth_home_wait seconds and then go to NAV_STATE_RTH_LANDING.

A question is:

  1. When rth_home_altitude is set and allow landing, firstly go to NAV_STATE_RTH_HOVER_ABOVE_HOME,
    and when reach rth_home_altitude wait rth_home_wait time and then land.
  2. Or when reach home point, count rth_home_wait and at the same time descent (climb) to rth_home_altitude. I think this is good option.
  3. Or simply ignore rth_home_altitude and wait at the altitude you arrived at home point.

@evmoius
Copy link
Author

evmoius commented Mar 28, 2019

@hali9
I think your second option is probably best. Having the plane start its countdown timer when it reaches its RTH point and in that time adjust its altitude to rth_home_altitude while the timer is counting down.

@hali9
Copy link
Contributor

hali9 commented Apr 15, 2019

I managed to achieve the intended effect. It implements the 2nd scenario.
This work on waypoint (using p2), waypoint rth (using p2), rth (using nav_rth_home_wait).
And I tested it on quadx yesterday and it works well.
I have not tested it on the plane yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants