New! Enter your latitude and longitude.Today's sunrise/sunset calculation for 39.040759 °N, 77.04876 °W.
Find today's Julian date (days since Jan 1, 2000 + 2451545): Julian date: 2457811
Now, calculate J
n
_{*} = (J_{date} - 2451545 - 0.0009) - (l_{w}/360)n = round(n _{*})n _{*} = (2457811 - 2451545 - 0.0009) - (77.04876/360) = 6265.7850756667n = round(6265.7850756667) = 6266
Now J
J
_{*} = 2451545 + 0.0009 + (l_{w}/360) + nJ _{*} = 2451545 + 0.0009 + (77.04876/360) + 6266 = 2457811.2149243
Using J
M = [357.5291 + 0.98560028 * (J
_{*} - 2451545)] mod 360M = [357.5291 + 0.98560028 * (2457811.2149243 - 2451545)] mod 360 = 6533.5122839629 mod 360 = 53.512283962933 We need to calculate the equation of center, C:
C = (1.9148 * sin(M)) + (0.0200 * sin(2 * M)) + (0.0003 * sin(3 * M))
C = 1.9148 * sin(53.512283962933) + 0.0200 * sin(2 * 53.512283962933) + 0.0003 * sin(3 * 53.512283962933) = 1.5586928169551 We need λ which is the ecliptical longitude of the sun:
λ = (M + 102.9372 + C + 180) mod 360
λ = (53.512283962933 + 102.9372 + 1.5586928169551 + 180) mod 360 = 338.00817677989 mod 360 = 338.00817677989
Finally, calculate J
J
_{transit} = J_{*} + (0.0053 * sin(M)) - (0.0069 * sin(2 * λ))J _{transit} = 2457811.2149243 + (0.0053 * sin(53.512283962933)) - (0.0069 * sin(2 * 338.00817677989)) = 2457811.2239772
Now, to get an even more accurate number, recursively recalculate M using J
I1: M = 53.521206447385, C = 1.5588681576088, λ = 338.01727460499, J
_{transit} = 2457811.2239761I2: M = 53.5212053771, C = 1.5588681365784, λ = 338.01727351368, J _{transit} = 2457811.2239761I3: M = 53.5212053771, C = 1.5588681365784, λ = 338.01727351368, J _{transit} = 2457811.2239761Ok, translate this into something we understand. i.e. When is Solar Noon?
J
_{transit} =
2457811.2239761 = 02/26/2017 at 12:22:31 -0500
Alrighty, now calculate how long the sun is in the sky at latitude 39.040759: Now we need to calculate δ which is the declination of the sun:
δ = arcsin( sin(λ) * sin(23.45) )
δ = arcsin(sin(338.01727351368) * sin(23.45)) = -8.5668320282872 Now we can go about calculating H (Hour angle):
H = arccos( [sin(-0.83) - sin(l
_{n}) * sin(δ)] / [cos(l_{n}) * cos(δ)] )H = arccos((sin(-0.83) - sin(39.040759) * sin(-8.5668320282872))/(cos(39.040759) * cos(-8.5668320282872))) = 84.0704477378
Just as above, calculate J
J
_{**} = 2451545 + 0.0009 + ((H + l_{w})/360) + nJ _{**} = 2451545 + 0.0009 + ((84.0704477378 + 77.04876)/360) + 6266 = 2457811.4484534
We can use M from above because it really doesn't change that much over the course of a day, calculate J
J
_{set} = J_{**} + (0.0053 * sin(M)) - (0.0069 * sin(2 * λ))J _{set} = 2457811.4484534 + (0.0053 * sin(53.5212053771)) - (0.0069 * sin(2 * 338.01727351368)) = 2457811.4575051
Now I'm going to cheat and calculate J
J
_{rise} = J_{transit} - (J_{set} - J_{transit})J _{rise} = 2457811.2239761 - (2457811.4575051 - 2457811.2239761) = 2457810.9904471Using the same idea, figure out when sunrise and sunset are:
J
_{rise} =
2457810.9904471 = 02/26/2017 at 06:46:14 -0500
J _{set} =
2457811.4575051 = 02/26/2017 at 17:58:48 -0500
A couple anomalies occur. At high latitudes, you will sometimes get H = 0. This means that either the sun does not rise (in the winter) or the sun does not set (in the summer) on that day. |

Copyright ©1997 - 2011, Bulent Yilmaz