53 template <
typename propagator_state_t,
typename stepper_t>
55 const stepper_t& )
const {
56 const auto& logger = state.options.logger;
57 if (state.navigation.targetReached) {
62 state.stepping.pathAccumulated;
63 double tolerance = state.options.targetTolerance;
65 bool limitReached = (distance * distance < tolerance *
tolerance);
68 <<
"Path limit reached at distance " << distance);
70 state.navigation.targetReached =
true;
73 <<
"Target stepSize (path limit) updated to "
74 << state.stepping.stepSize.toString());
93 template <
typename propagator_state_t,
typename stepper_t>
95 return (*
this)(state,
stepper, *state.navigation.targetSurface);
106 template <
typename propagator_state_t,
typename stepper_t>
108 const Surface& targetSurface)
const {
109 const auto& logger = state.options.logger;
110 if (state.navigation.targetReached) {
115 if ((state.navigation.currentSurface &&
116 state.navigation.currentSurface == &targetSurface)) {
118 <<
"Target surface reached.");
120 state.navigation.targetReached =
true;
124 const double tolerance = state.options.targetTolerance;
125 const auto sIntersection = targetSurface.
intersect(
126 state.geoContext, stepper.position(state.stepping),
127 state.stepping.navDir * stepper.direction(state.stepping),
true);
130 bool targetReached = (sIntersection.intersection.status ==
131 Intersection3D::Status::onSurface);
137 <<
"Target surface reached at distance (tolerance) "
138 << distance <<
" (" << tolerance <<
")");
140 state.navigation.currentSurface = &targetSurface;
142 <<
"Current surface set to target surface "
143 << state.navigation.currentSurface->geometryId());
146 state.navigation.targetReached =
true;
149 const double overstepLimit = stepper.overstepLimit(state.stepping);
151 if (distance < overstepLimit and sIntersection.alternative) {
153 distance = sIntersection.alternative.pathLength;
155 state.stepping.stepSize.update(state.stepping.navDir * distance,
158 <<
"Target stepSize (surface) updated to "
159 << state.stepping.stepSize.toString());
162 return targetReached;
176 template <
typename propagator_state_t,
typename stepper_t>
178 const stepper_t& )
const {
179 if (state.navigation.currentVolume !=
nullptr) {
182 state.navigation.targetReached =
true;