View on GitHub

leaflet-city-mapper

A small 3D rendering engine for leaflet

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.

Related: sunlight.