Summary
geolens.core.sun_position(lat, lon, when) gives the instantaneous azimuth/elevation/declination, and estimate_latitude_from_shadow assumes the observation is at (or near) local solar noon. But there is no way to find solar noon (or sunrise/sunset) for a location and date — so the analyst has to guess the noon instant, which is the single biggest error source in the shadow-stick method.
Motivation
Two very common OSINT/verification questions have no direct API today:
- "When was local solar noon here on this date?" — needed to time-align a shadow-stick measurement (the method degrades quickly away from true noon).
- "Was the sun even up when the photo claims it was taken?" — currently you have to sample
sun_position across the day and look for the elevation sign change (see demos/08_sun_track_day.py, which does exactly this by hand).
Proposed addition (additive, std-lib only)
def solar_noon(lat, lon, date) -> datetime # UTC instant of max elevation
def sunrise_sunset(lat, lon, date) -> dict # {"sunrise": dt|None, "sunset": dt|None, "polar_day"/"polar_night": bool}
Both are derivable from the existing NOAA eq_time / hour-angle math already in sun_position — solar noon is 12:00 - eq_time/60 - lon/15 (UTC); sunrise/sunset from the standard hour-angle at the -0.833 deg horizon, with explicit None for polar day/night. No new dependency.
This would let estimate_latitude_from_shadow optionally snap to computed solar noon instead of trusting assume_local_noon, and give the verification demos a first-class daylight check.
Summary
geolens.core.sun_position(lat, lon, when)gives the instantaneous azimuth/elevation/declination, andestimate_latitude_from_shadowassumes the observation is at (or near) local solar noon. But there is no way to find solar noon (or sunrise/sunset) for a location and date — so the analyst has to guess the noon instant, which is the single biggest error source in the shadow-stick method.Motivation
Two very common OSINT/verification questions have no direct API today:
sun_positionacross the day and look for the elevation sign change (seedemos/08_sun_track_day.py, which does exactly this by hand).Proposed addition (additive, std-lib only)
Both are derivable from the existing NOAA
eq_time/ hour-angle math already insun_position— solar noon is12:00 - eq_time/60 - lon/15(UTC); sunrise/sunset from the standard hour-angle at the -0.833 deg horizon, with explicitNonefor polar day/night. No new dependency.This would let
estimate_latitude_from_shadowoptionally snap to computed solar noon instead of trustingassume_local_noon, and give the verification demos a first-class daylight check.