162 → 174 SQL objects, 27 → 28 test suites, 3 new C source files. Features: - solar_elongation(body_id, ts): Sun-Earth-Planet angle [0,180] degrees - planet_phase(body_id, ts): illuminated disk fraction [0,1] - satellite_is_eclipsed/next_eclipse_entry/exit/eclipse_fraction: cylindrical shadow model (Vallado §5.3) for Earth shadow prediction - observing_night_quality(observer, ts): composite PL/pgSQL scoring based on astronomical darkness duration and Moon interference - moon_libration_longitude/latitude/position_angle/libration/subsolar_longitude: optical libration from Meeus (1998) Ch. 53 Refactored magnitude_funcs.c to extract shared compute_planet_geometry() used by magnitude, elongation, and phase — single VSOP87 evaluation per call. All 28 regression suites pass. Zero compiler warnings.
23 lines
640 B
C
23 lines
640 B
C
/*
|
|
* libration.h -- Lunar optical libration (Meeus Ch. 53)
|
|
*
|
|
* Three components of the Moon's apparent wobble:
|
|
* l -- optical libration in longitude (degrees, [-8, +8])
|
|
* b -- optical libration in latitude (degrees, [-7, +7])
|
|
* p -- position angle of the Moon's axis (degrees)
|
|
*/
|
|
|
|
#ifndef PG_ORRERY_LIBRATION_H
|
|
#define PG_ORRERY_LIBRATION_H
|
|
|
|
typedef struct
|
|
{
|
|
double l; /* libration in longitude, degrees */
|
|
double b; /* libration in latitude, degrees */
|
|
double p; /* position angle of axis, degrees */
|
|
} lunar_libration;
|
|
|
|
void compute_lunar_libration(double jd, lunar_libration *lib);
|
|
|
|
#endif /* PG_ORRERY_LIBRATION_H */
|