Expand description
Utility functions for time and angle conversions.
Helper functions for common operations: Julian Date to centuries conversion, angle normalization, and angular differences. These are building blocks used throughout the library.
§Time Conversion
jd_to_centuries converts a two-part Julian Date to Julian centuries from J2000.0,
the time unit used by most IAU precession/nutation models.
§Angle Normalization
| Function | Input | Output Range |
|---|---|---|
normalize_longitude | degrees | (-180°, 180°] |
normalize_latitude | degrees | [-90°, 90°] (clamped) |
normalize_angle_rad | radians | (-π, π] |
§Angular Difference
angular_difference computes the shortest signed difference between two angles
in degrees, handling the wraparound at ±180°.
Functions§
- angular_
difference - Computes the shortest signed angular difference
a - bin degrees. - jd_
to_ centuries - Converts a two-part Julian Date to Julian centuries from J2000.0.
- normalize_
angle_ rad - Normalizes an angle in radians to the range (-π, π].
- normalize_
angle_ to_ positive - Normalizes an angle in radians to the range [0, 2π).
- normalize_
latitude - Clamps latitude to the valid range [-90°, 90°].
- normalize_
longitude - Normalizes longitude to the range (-180°, 180°].