Open
Conversation
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.
Related Issue / Discussion:
Fixes Issue #170
Changes:
Please list the central functionalities that have been changed:
WeatherRoutingTool/ship/direct_power_boat.pyget_apparent_windtest_get_apparent_wind_no_nan_with_edge_valuesFurther Details:
Summary:
This PR addresses an issue where NaN values were produced in the apparent wind calculation for certain edge cases of wind direction and speed.
Previously, floating-point precision errors caused invalid inputs to trigonometric functions (specifically
arcsin), leading to NaN outputs. This affected the reliability of downstream routing computations.After the fix:
🧪 Test Coverage
Added test to validate behavior:
🚀 Additional Improvement
To further improve robustness:
❌ Case 2: Test FAILED
👉 Copy the error and paste it here.
Common causes:
get_apparent_windExample:
👉 Install dependencies:
Dependencies:
PR Checklist:
In the context of this PR, I: