diff --git a/corsika/detail/modules/ObservationPlane.inl b/corsika/detail/modules/ObservationPlane.inl index 2cb39341246d5f6b8bf3fab96515d27fa75516f1..c28485f6b37b4edcd292326a23b0dd24fc222296 100644 --- a/corsika/detail/modules/ObservationPlane.inl +++ b/corsika/detail/modules/ObservationPlane.inl @@ -78,10 +78,10 @@ namespace corsika { return std::numeric_limits<double>::infinity() * 1_m; } double const fractionOfIntersection = timeOfIntersection / trajectory.getDuration(); - auto const pointOfIntersection = trajectory.getPosition(fractionOfIntersection); - auto dist = (trajectory.getPosition(0) - pointOfIntersection).getNorm(); - CORSIKA_LOG_TRACE("ObservationPlane: getMaxStepLength l={} m", dist / 1_m); - return dist; + CORSIKA_LOG_TRACE("ObservationPlane: getMaxStepLength dist={} m, pos={}", + trajectory.getLength(fractionOfIntersection) / 1_m, + trajectory.getPosition(fractionOfIntersection)); + return trajectory.getLength(fractionOfIntersection); } template <typename TTracking, typename TOutput>