sun_position — GEOCAM sun op

• Data kinds: signal → table

• Call: import fullseye as fs; fs.ledger.sun_position(lat_deg, lon_deg, unix_times) (to call the implementation directly, import geocam; geocam.sun_position(lat_deg, lon_deg, unix_times); from the registry, opsgeocam.get("sun_position"))

Usage

Latitude, longitude, time (UNIX seconds, UTC) → azimuth and elevation of the sun [degrees] (NOAA solar position algorithm, the low-accuracy formula of Meeus 1998).

A published closed form (the same formulas as the Solar Calculator of the NOAA Global Monitoring Laboratory:

Julian century → mean longitude, mean anomaly, equation of centre → apparent longitude → obliquity of the ecliptic → declination and equation of time → hour angle → zenith angle, azimuth). Accuracy is about 0.01° for 2000 ± 1 century (NOAA's statement); atmospheric refraction is added to the elevation (NOAA's piecewise formula, at most 0.57° near the horizon). Times are UNIX seconds in UTC (1-D, float is fine). Leap seconds and ΔT are ignored (they do not matter at 0.01°).

Args:

lat_deg, lon_deg: observation point. Longitude is positive east.

unix_times: (N,) UNIX seconds (UTC). A scalar is also accepted.

Returns:

table: azimuth_deg (N,) (north 0°, clockwise) / elevation_deg (N,) (refraction included) /

elevation_true_deg (N,) (without refraction) / declination_deg / equation_of_time_min /

hour_angle_deg / n.

Properties checked against ground truth (tests/test_geocam.py): at noon on the equinox, elevation = 90 − |latitude|; the noon azimuth in the northern hemisphere is 180° (south); azimuth is monotonic east → south → west; sunrise and sunset elevations are symmetric; declination stays within ±23.44°.

Detailed usage guide

• geocam family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_public_camera_heading — py -3.11 examples/poc_public_camera_heading.py

• poc_public_camera_heading_real — py -3.11 examples/poc_public_camera_heading_real.py

Ops the type connects to (they accept table as input)

render_skyline_view · camera_orientation_from_skyline

Same category (sun)

sun_pixel_position · camera_orientation_from_sun · sun_bloom_fit · camera_orientation_from_sun_candidates


*Provenance: geocam.py — GEOCAM operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.