To calculate the sunrise hour angle:
Find the latitude and day of the year, n.
Estimate the declination angle of the Sun using the equation:
δ = 23.45 × sin((284 + n) × 360/365).
Note that this equation can err up to 1.5°.
Multiply the tangents of latitude and declination angle.
Find the cosecant inverse for the negative of the product.
Multiply the resultant with -1 to get the hour angle for sunrise.
Read more