Skip to main content

Module angles

Module angles 

Source
Expand description

Angular geometry helpers for sky directions and satellite body geometry.

Computes general angular separation between arbitrary directions or (lon, lat) / (RA, Dec) pairs, position angle measured North through East, and satellite nadir/Sun, nadir/Moon, Sun-elevation, phase, solar beta, and Earth angular radius angles. Public angle-producing helpers in this module return degrees unless their names state otherwise.

Enums§

AngleError
Error while computing satellite angular geometry.

Functions§

angular_separation
On-sky angle (degrees) between two direction vectors, via the stable atan2(|a x b|, a . b) form.
angular_separation_coords
On-sky angle (degrees) between two (lon, lat) / (RA, Dec) pairs in degrees. The second tuple component is the latitude or declination in [-90, 90].
beta_angle
Solar beta angle (degrees, signed, in [-90, 90]): the elevation of the Sun above the orbit plane, beta = 90 - angle(orbit_normal, sun), computed in the normative pi/2 - acos(clamp(cos)) operation order.
beta_angle_from_state
Solar beta angle (degrees) from an inertial Cartesian state.
earth_angular_radius
Angular radius (degrees) of the Earth as seen from the satellite: asin(R_earth / |sat_pos|), clamped to the asin domain.
moon_angle
Angle (degrees) between satellite nadir and the Moon direction.
normalize_geodetic_lon_rad
Snap a geodetic longitude (radians) off the -pi branch cut onto +pi.
phase_angle
Sun-satellite-observer phase angle (degrees): the angle at the satellite between the Sun and the observer.
position_angle
Position angle (degrees, [0, 360)) of to as seen from from, measured from North (+lat) through East (+lon). Inputs are (lon, lat) in degrees.
rad_to_deg_ref
Radians to degrees in the reference operation order (rad * 180 / pi, multiply before divide), required for bit-exact parity with the prior Elixir reference rather than a single rounded RAD_TO_DEG constant.
sun_angle
Angle (degrees) between satellite nadir and the Sun direction.
sun_elevation
Sun elevation (degrees) above the satellite’s local horizontal plane.