spa-rs
spa-rs copied to clipboard
Solar Position Algorithm implementation in Rust
Thank you for this useful library! I noticed a confusing behavior with `sunrise_and_set`. It seems that it only returns the sunrise/sunset for the current day, if the provided UTC timestamp...
Resolves #8 ## Problem Overview Since the Julian Day starts at noon, truncating the Julian Day before 12:00 UTC results in the sunrise/sunset being off by one day. ### Example...
This replaces the `chrono::DateTime` timestamp type that is used on the API by a `Timestamp` struct, which has conversion methods to `chrono::DateTime`, `std::time::SystemTime`, and `jiff::Timestamp`.
The current constant `PI2` has an weird name. It kinda suggest that it is an alternative version of `PI`, but it actually represents `2 * PI`. A rename to [`TAU`](https://en.wikipedia.org/wiki/Turn_(angle)#Proposals_for_a_single_letter_to_represent_2%CF%80)...
Currently there are German code fragments in the source code, such as `berechne_zeitgleichung` as well as comments and variables names within it. Though being a native German speaker myself, it'd...
- Added lots of comments - Renamed some variables - Translated some variable names and function names from German to English - Added JulianDate, JulianDayNumber and RelativeJulianDays structs