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

Backtracking as an option for stage 2 of Failsafe #13042

Open
pegurov opened this issue Aug 17, 2023 · 8 comments
Open

Backtracking as an option for stage 2 of Failsafe #13042

pegurov opened this issue Aug 17, 2023 · 8 comments
Labels
Feature Request Feature requests are excluded from automatically being marked as stale

Comments

@pegurov
Copy link

pegurov commented Aug 17, 2023

Is your feature request related to a problem? Please describe

GPS Rescue is awesome, but in these scenarios it is not going to return the quad home:

  1. Flying behind a tall structure, like a skyscraper. After signal loss the quad is going to gain some altitude, rotate and then try to get back to home. And crash into the structure, as it is taller than the gained altitude.
  2. Flying under something, like a bridge. When trying to gain altitude, it is going to crash into the bridge.

Describe the solution you'd like

I would like to see a 'Backtracking' feature as an alternative to GPS Rescue in stage 2 of Failsafe.

I suppose it should be possible to track 'breadcrumbs' during the flight, every N milliseconds, like a combo of altitude + GPS coords. And in case of a Failsafe event try to fly backward on a path, very close to the path in 3D space, that was taken to get to the point, where Failsafe happened.

This feature would probably result in safer return path, and quick signal recovery, as the quad is going to go back to the point where we still had signal, which should be pretty close to the point, where failsafe happened.

Describe alternatives you've considered

None

Other information

I have extensive iOS development experience (10 years), I could probably try to implement this feature myself)

@pegurov pegurov added the Template: Feature Request Set by auto_close_issue. label Aug 17, 2023
@haslinghuis haslinghuis added Feature Request Feature requests are excluded from automatically being marked as stale and removed Template: Feature Request Set by auto_close_issue. labels Aug 17, 2023
@ZzyzxTek
Copy link
Contributor

Logging the breadcrumbs might be possible. Betaflight already does blackbox logging of GPS data, maybe that could be leveraged for this. But many FCs have limited flash (or no flash) to use for logging.

The challenge is that Betaflight does not do autonomous flight. GPS rescue is a very specialized type of autonomous flight that heads back to a single home point. This would require a more generalized waypoint flight to follow the breadcrumbs.

If waypoint flight ever does get implemented, it's a ways off in the future, there are lots of other support features needed first on the way to that. At this point, we're just getting the GPS driver more solid, and working on better compass integration.

@pegurov
Copy link
Author

pegurov commented Aug 18, 2023

Thoughts on limited flash memory:

  1. Maybe it is possible to allow this feature only when it is known that there is enough memory to do that? Is there a way to figure it out of the code, running on FC? Or just add a warning in Betaflight configurator, that this feature is only available when the FC has enough flash storage.
  2. Maybe we could implement a combo of bactracking and GPS Rescue, where the craft follows breadcrumbs back for some N meters, and then goes into GPS Rescue mode. That way we would only need to store a limited amount of breadcrumbs for the last N meters. Maybe that could just be an option for GPS rescue, like a switch that enables backtracking + an input, that allows you to specify the N.

Thoughts on waypoint flight:

  1. Could you please be a little more specific, as to what exactly is needed for waypoint flying? I'm guessing there needs to be some logic, that is able to get from A to B in 3D space, first in ideal conditions (no wind), and then being able to correct itself against wind. Sounds like a challenge, but totally doable.
  2. I do not really see, how getting GPS drivers more solid conflicts with waypoint flying, looks like more solid GPS performance only enhances the overall quality of GPS rescue and backtracking.

As I said above, I would be willing to try and implement this myself, just need some kind of approval from the repo maintainers) I have tried to figure out the process of adding new features in the repo docs, but it is rather focused on code style and testing.

@haslinghuis
Copy link
Member

Right now we are in feature freeze. Some requirements:

@ledvinap
Copy link
Contributor

IMO only reasonable way to handle this is to port it from iNav. Either iNav already supports it, or implement it in iNav first.

@haslinghuis
Copy link
Member

s00521-020-05097-x.pdf

@sudoTheBotFather
Copy link

Just use Inav, it handles this beautifully right now and it based for autonomous flight / advanced rescue modes.

@Prajwal-Koirala

This comment has been minimized.

@ctzsnooze
Copy link
Member

Closing, we don't do this at the moment. Use iNav for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Feature requests are excluded from automatically being marked as stale
Projects
None yet
Development

No branches or pull requests

7 participants