Conversation
erikvansebille
approved these changes
Mar 3, 2026
Member
erikvansebille
left a comment
There was a problem hiding this comment.
Code looks good, but would be useful to also add a test that failed under the old code and passes now. In general, I think that we should adopt a more test-driven development flow. In general, every change/fix would need to be tested, to make sure there's no regression?
Collaborator
Author
|
Test now also added to check that the ship path/underway ADCP measurement sites sit within the domain bounds determined by the waypoints and that the trajectory matches the waypoints. |
Member
|
Thanks for adding the tests; these look good! I assume you tested that the old code fails on them? |
Collaborator
Author
Oops yes I should have indeed mentioned. The old code fails and the new passes 👍 |
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.
Following #298 and the issues identified in class, this PR fixes the the path that the ship takes (and therefore the measurement locations for
ADCPandUnderwater_STinstruments) to be the actual shortest path between waypoints on the spherical globe.As a reminder (and summarised in the plot below), the ship was 'missing' waypoints previously by going straight along a bearing, without curving, and this effect was enhanced when there are larger gaps between waypoints. Hence, the ship could overshoot a waypoint and leave the fieldset domain, causing out of bounds errors. Now, the logic is changed so that first an array of all locations on the forward propagation on the globe are accessed by
geod.fwd_intermediate()and the number of spacings between each waypoint is determined by the distance and time between waypoints and the period associated withADCP/Underwater_STsampling. These are then added to the list storing where to take measurements.Summary:
Closes #298