Estimates the sun's declination angle for a given day of the year using Cooper's formula.
Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.
Try it
Inputs
day_of_year (integer, day (1-366), required) min 1 max 366 : Day of the year, January 1 = 1.
Outputs
declination_degrees (degrees): Solar declination, positive north of the celestial equator.
Steps
Cooper's formula: declination = 23.45 * sin( (360/365) * (284 + N) ), where N is the day of year and the sine argument is in degrees.
Convert the argument to radians before taking the sine, since standard math libraries use radians.
Round the result to 2 decimals.
This is a smooth approximation to Earth's actual declination curve (accurate to roughly within 1 degree); it does not model leap-year or orbital-eccentricity irregularities.
Constants
max_declination_degrees = 23.45 degrees (source: The absorption of solar radiation in solar stills)
days_in_year = 365 days (source: The absorption of solar radiation in solar stills)
phase_offset_days = 284 days (source: The absorption of solar radiation in solar stills)
Sources
The absorption of solar radiation in solar stills (Solar Energy (journal), 2026-09-30T19:42:00Z) - Source of the widely used Cooper approximation for solar declination.