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: 15e157e99c6e
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 42c0617fd31b
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Mar 30, 2019

  1. Copy the full SHA
    f5256ea View commit details
  2. Merge pull request #2113 from pleroy/MaxSteps

    Allow an arbitrary number of steps when extending the target vessel prediction
    eggrobin authored Mar 30, 2019
    Copy the full SHA
    42c0617 View commit details
Showing with 8 additions and 3 deletions.
  1. +1 −1 ksp_plugin/renderer.cpp
  2. +7 −2 ksp_plugin/vessel.cpp
2 changes: 1 addition & 1 deletion ksp_plugin/renderer.cpp
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ Renderer::RenderBarycentricTrajectoryInPlotting(
if (target_ && begin != end) {
auto last = end;
--last;
target_->vessel->FlowPrediction(last.time());
CHECK_OK(target_->vessel->FlowPrediction(last.time()));
}
for (auto it = begin; it != end; ++it) {
Instant const& t = it.time();
9 changes: 7 additions & 2 deletions ksp_plugin/vessel.cpp
Original file line number Diff line number Diff line change
@@ -307,12 +307,17 @@ Status Vessel::FlowPrediction(Instant const& time) {
}

// If the prediction is not long enough, extend it explicitly. This is
// blocking.
// blocking. We are willing to compute an arbitrary number of steps to try to
// reach the desired time.
Ephemeris<Barycentric>::AdaptiveStepParameters adaptive_step_parameters =
prediction_adaptive_step_parameters_;
adaptive_step_parameters.set_max_steps(
std::numeric_limits<std::int64_t>::max());
return ephemeris_->FlowWithAdaptiveStep(
prediction_,
Ephemeris<Barycentric>::NoIntrinsicAcceleration,
time,
prediction_adaptive_step_parameters_,
adaptive_step_parameters,
FlightPlan::max_ephemeris_steps_per_frame,
/*last_point_only=*/false);
}