Skip to content

Commit

Permalink
Merge pull request #2584 from eggrobin/guidance
Browse files Browse the repository at this point in the history
Point to the planned initial Frenet frame before ignition
eggrobin authored May 20, 2020
2 parents 5176916 + 325ef22 commit 17b8ecd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ksp_plugin/interface_flight_plan.cpp
Original file line number Diff line number Diff line change
@@ -255,10 +255,14 @@ XYZ __cdecl principia__FlightPlanGetGuidance(Plugin const* const plugin,
result = plugin->renderer().BarycentricToWorld(
plugin->PlanetariumRotation())(manœuvre.InertialDirection());
} else {
result = plugin->renderer().FrenetToWorld(
*plugin->GetVessel(vessel_guid),
*manœuvre.frame(),
plugin->PlanetariumRotation())(manœuvre.direction());
result = (plugin->CurrentTime() < manœuvre.initial_time()
? plugin->renderer().BarycentricToWorld(
plugin->PlanetariumRotation()) *
manœuvre.FrenetFrame()
: plugin->renderer().FrenetToWorld(
*plugin->GetVessel(vessel_guid),
*manœuvre.frame(),
plugin->PlanetariumRotation()))(manœuvre.direction());
}
return m.Return(ToXYZ(result));
}

0 comments on commit 17b8ecd

Please sign in to comment.