Long-lasting bug with seniority finally killed in gmt_crossover function #8188
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.
The test
spline_5.sh
has failed (at least on macOS) for the longest time. Finally decided to debug the sucker and found that the missing contour annotations had to do with round-off. If fact there were two missing but only one was seen as a bug. Problem was that if the crossing was exactly on a data noted then our test to see if it was outside the segment failed because we checked along-track "time":tx_a < ta_stop && tx_b < tb_stop
Clearly, if tx_a or tx_b equal ta_stop or tb_stop then we still fail (cutting at the mode). Solution is to allow one of the ends to be equal:
if (tx_a < ta_stop && tx_b <= tb_stop)
Now, the contour map places all the contours crossing the imaginary line set by -Gl:
The topmost 40 label in the bottom plot was missing before, but so was the 30 contour. Now all is well. A bug with seniority bites the dust!