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

Properly reset the optimizer after each change of the flight plan #3816

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Dec 6, 2023

Addresses the following issue reported by test_account on Discord:

Also, it seems to always choose "Inertially fixed" which can waste some dV for longer burns.

@pleroy pleroy added the verified The fix has been verified in game. label Dec 6, 2023
@eggrobin eggrobin added the LGTM label Dec 7, 2023
@pleroy pleroy merged commit 2a3b91a into mockingbirdnest:master Dec 7, 2023
7 checks passed
@@ -105,6 +106,7 @@ class FlightPlanner : VesselSupervisedWindowRenderer {
GUILayoutWidth(1)) &&
i != selected_flight_plan) {
plugin.FlightPlanSelect(vessel_guid, i);
ResetOptimizer(vessel_guid);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, this is not needed.

@@ -123,6 +125,7 @@ class FlightPlanner : VesselSupervisedWindowRenderer {
plugin.FlightPlanCreate(vessel_guid,
plugin.CurrentTime() + 3600,
predicted_vessel.GetTotalMass());
ResetOptimizer(vessel_guid);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

@@ -366,6 +374,7 @@ class FlightPlanner : VesselSupervisedWindowRenderer {
new PlannedOrbitAnalyser(adapter_, predicted_vessel_);
plugin.FlightPlanDelete(vessel_guid);
ResetStatus();
ResetOptimizer(vessel_guid);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one probably caused #3819.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM verified The fix has been verified in game.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants