Compute the terrain altitude at the right place to determine whether the periapsis is underground #3832
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.
Possibly fix #3826. The preconditions on
ComputeCollision
are a bit of a mess, but so long as we are underground atlast_time
it should work. However, we were instead checking whether we would have been underground had we been on one branch of the φ=λ analemma. The height above terrain calculation used to actually compute the collision was correct, which is why it would show up in the right place (up to the issue of multiple intersections). This may explain some oddities as to whether we would try to compute the collision at all—though the underground periapsis thing is of course fundamentally deficient as a criterion.