-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Autopilot tweaks #5481
Autopilot tweaks #5481
Conversation
90e4530
to
6a3a044
Compare
For testing if something is over the horizon we also have a HorizonCulling method. Code looks good to me 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the mentioned assertion failure, I'm quite happy with this PR! I haven't been able to properly stress-test it, but I haven't seen any obvious failures yet.
From an administrative standpoint, @azieba do you have a presence on IRC for communication purposes? It's not required, but we have been discussing some planned improvements to the autopilot's capabilities to support manual docking and planned maneuver execution if you are interested in chiming in and/or contributing further.
If not, we can discuss here via a tracking issue or on the forums if you are interested in helping to implement this functionality.
Which is the main dev communication channel the IRC or the forum? |
IRC is the "primary" developer communication channel (the core developers are all on it and it stays fairly active, and it's where we generally bounce ideas back and forth). The forums are used for more specific long-form discussion to discuss a specific project or concern, for user feature requests, or when we need to write something down for future reference much later. When planning we generally communicate on IRC and only cross-post the "plan" to the forum if it's significantly large and multiple people have volunteered to help out (e.g. the UI rewrite from many years ago). The Pioneer IRC channel is accessible at |
I have been trying to fix autopilot crashing into planets/stars and some cases of overshoots. This is the result of my work so far.
Those saves are two examples of situations when autopilot crashes the ship that are now avoidable:
testPlanet.gz
testStar.gz
The main change is moving the CheckSuicide function call that detects the potential crash to AICmdFlyTo instead of AICmdFlyAround. I have changed the calculations in this function as well as the recovery action taken by the autopilot.
Previously in any dangerous situation the recovery was putting rear of the ship in direction of center of the planet and try to accelerate on main thruster killing other speed component at the same time. This was really sub optimal and resulted in many
ship crashes on autopilot.
The proposed recovery procedure is trying to bend the flght path of the ship to the horizon of the planet while breaking at the same time with the exception of a situation when the ship is below safety radius and the body gravity is greater then ship's available upward thrust. In such case the ship must accelerate to survive.
I have removed speed checks from the CheckCollision function as they are already covered by CheckSuicide.
Quite a few other minor changes to fix autopilot overshoots.
I have also included a generalization of @WKFO code for obstructed target indicators. Now it also works for ships as a nav or combat targets.
Fixes #5497