Astronomy
| Source guide | Project README |
Calculates celestial positions and solar time for a date and observer.
From observer to direction
flowchart LR
Observer["Time + latitude / longitude"] --> Positions["Solar / lunar coordinates"]
Positions --> Horizontal["Observer-relative position"]
Horizontal --> Output["Altitude + azimuth + world direction"]
Output --> Sunlight["Sunlight / sky"]
Output angles are degrees; internal trigonometry uses radians. Solar position does not include atmospheric refraction. The clock belongs to sunlight, not these calculations.
- solarPosition.js and moonPosition.js: celestial coordinates.
- horizontalPosition.js: observer-relative position.
- solarTime.js: solar time calculation.
Related: sunlight.