Neon22 / sun-angle

Given latitude, longitude and gmt date and time - calculate the azimuth and elevation of the Sun's position.
MIT License
31 stars 10 forks source link

discontinuous/wrong azimuth and elevation values #5

Open tomoreilly opened 10 months ago

tomoreilly commented 10 months ago

Note extremely discontinuous values of azimuth and elevation between the following dates/times which are 1 second apart:

import sunpos sunpos.sun_position(2023, 10, 6, 16, 59, 59, 37, -122) (114.03738483361127, 20.773828716923735) sunpos.sun_position(2023, 10, 6, 17, 0, 0, 37, -122) (126.02456270870414, 31.14718918092208)

NOAA Solar Geometry Calculator predicts the following for the same lat/lon and dates:

2023 10 06 16:59 30.98566 2023 10 06 17:00 31.14719

Neon22 commented 10 months ago

oh dear. Any ideas ? (last time it was a leap year overflow problem)