Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 12bd3bc3ae15
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cdccc60450ed
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 17, 2019

  1. Copy the full SHA
    0e41a9f View commit details
  2. Copy the full SHA
    3403263 View commit details
  3. Merge pull request #2358 from pleroy/2331d

     Don't look at anomalous manœuvres when building the guidance node
    pleroy authored Oct 17, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cdccc60 View commit details
Showing with 12 additions and 9 deletions.
  1. +6 −6 journal/player_test.cpp
  2. +6 −3 ksp_plugin_adapter/ksp_plugin_adapter.cs
12 changes: 6 additions & 6 deletions journal/player_test.cpp
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ TEST_F(PlayerTest, DISABLED_SECULAR_Debug) {
// An example of how journaling may be used for debugging. You must set
// |path| and fill the |method_in| and |method_out_return| protocol buffers.
std::string path =
R"(C:\Program Files\Kerbal Space Program\1.7.0\glog\Principia\JOURNAL.20190713-140753)"; // NOLINT
R"(C:\Program Files\Kerbal Space Program\1.7.2\glog\Principia\JOURNAL.20191015-230454)"; // NOLINT
Player player(path);
int count = 0;
while (player.Play(count)) {
@@ -106,19 +106,19 @@ TEST_F(PlayerTest, DISABLED_SECULAR_Debug) {
serialization::Method method_in;
{
auto* extension = method_in.MutableExtension(
serialization::FlightPlanGetManoeuvreFrenetTrihedron::extension);
serialization::FlightPlanGetGuidance::extension);
auto* in = extension->mutable_in();
in->set_plugin(2312193072);
in->set_vessel_guid("bedd9d23-de56-4fb8-881c-f647e22f848f");
in->set_plugin(2342492000);
in->set_vessel_guid("6615e657-7c13-4428-bb17-4d9009b4a458");
in->set_index(0);
}
serialization::Method method_out_return;
{
auto* extension = method_out_return.MutableExtension(
serialization::FlightPlanGetManoeuvreFrenetTrihedron::extension);
serialization::FlightPlanGetGuidance::extension);
}
LOG(ERROR) << "Running unpaired method:\n" << method_in.DebugString();
CHECK(RunIfAppropriate<FlightPlanGetManoeuvreFrenetTrihedron>(
CHECK(RunIfAppropriate<FlightPlanGetGuidance>(
method_in, method_out_return, player));
#endif
}
9 changes: 6 additions & 3 deletions ksp_plugin_adapter/ksp_plugin_adapter.cs
Original file line number Diff line number Diff line change
@@ -1471,10 +1471,13 @@ private void RenderGuidance(Vessel active_vessel) {
// This duplicates a bit of code in FlightPlanner.
// UpdateVesselAndBurnEditors but it's probably not worth factoring out.
double current_time = plugin_.CurrentTime();
int number_of_manœuvres =
plugin_.FlightPlanNumberOfManoeuvres(vessel_guid);
// Note that we don't want to look at the anomalous manœuvres as we may
// not even be able to build a Frenet frame for them.
int number_of_nomalous_manœuvres =
plugin_.FlightPlanNumberOfManoeuvres(vessel_guid) -
plugin_.FlightPlanNumberOfAnomalousManoeuvres(vessel_guid);
int? first_future_manœuvre_index = null;
for (int i = 0; i < number_of_manœuvres; ++i) {
for (int i = 0; i < number_of_nomalous_manœuvres; ++i) {
NavigationManoeuvre manœuvre =
plugin_.FlightPlanGetManoeuvre(vessel_guid, i);
if (current_time < manœuvre.final_time) {