Repository navigation
fix(event-display): end track extensions on the requested radius - #1060
Merged
Merged
Conversation
RungeKutta.propagate kept the startPos and startDir vectors it was given and moved them while stepping. extrapolateFromLastPosition then removed points equal to the moved last hit, which dropped the step that crosses the radius. So "Extend to radius" stopped one step short of the radius, or added nothing when the last hit was within one step of it. propagate now steps copies of the vectors. extrapolateFromLastPosition moves the end of the crossing step back onto the radius, returns no points when the last hit already reaches it, and builds the fallback start direction from a unit vector, because p is Number.MAX_VALUE when qop is 0 and the old direction came out as NaN or zero.
|
🚀 Preview deployed: http://phoenix-pr-1060.surge.sh Built from 50a7af3. |
G26karthik
added a commit
to G26karthik/phoenix
that referenced
this pull request
Nov 12, 2026
extrapolateTrackPositions built its start direction from a vector of length p, and p is Number.MAX_VALUE when qop is 0. The vector overflowed, so the direction came out as zero or NaN and the track collapsed to a point or was dropped. Build it from a unit vector, as was done for extrapolateFromLastPosition in HSF#1060.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1059
RungeKutta.propagatemoved thestartPosandstartDirvectors it was given.extrapolateFromLastPositionthen removed points equal to the movedlastPos, so the last point of every extension was dropped: "Extend to radius" ended one step short, or added nothing when the last hit was within one step of it.propagatenow steps copies ofstartPosandstartDir.extrapolateFromLastPositionmoves the end of the step that crosses the radius onto it (steps can be 1000 mm long), and returns nothing if the last hit already reaches it.Number.MAX_VALUEand the direction came out as NaN or zero, which the copies inpropagatewould otherwise turn intonullpoints.Testing
jest --config configs/jest.conf.js src/tests/helpers/rk-helper.test.ts src/tests/helpers/runge-kutta.test.tsstartPosmoved).yarn test:ci.extrapolateTrackPositionsoutput is unchanged.