-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle invalid observer latitude in solar irradiation calculation
- Added a new exception `InvalidObserverLatitudeError` to handle cases where the observer's latitude is not within the valid range of -88 to 88 degrees. - Modified the `calculate_direct_irradiation` method in `IrradiationCalculator` to return 90 or -90 based on `observer_latitude` when `irradiance_components` is empty. - Updated the `_ensure_latitude_provided` method in `Observer` to raise `InvalidObserverLatitudeError` when the observer's latitude is not within the valid range. - Added a new test `test_calculate_sunrise_sunset_invalid_latitude` to check if `InvalidObserverLatitudeError` is raised when the observer's latitude is not within the valid range.
- Loading branch information
1 parent
d4faf56
commit 8452a24
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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