Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an algorithm for determining how much daylight there is?

Is there a function/algorithm that allows me to input the latitude and the approximate orbital position of the earth in so that I can determine how long the sun is up? IE during the winter it would show that the sun is only up a few hours in the far north hemisphere.

I did some basic Google search and didn't find much so I was thinking that I might have to do some trigonometry that would allow me to calculate how much the earth is inclined or not toward the sun then use that information along with the latitude to figure out how much sunshine a site would be getting.

like image 400
Pharaun Avatar asked May 25 '10 16:05

Pharaun


People also ask

How do you calculate day light length?

cos(ω) = − tan(δ) tan(δ) = −1, which gives ω = 180◦ ⇒ sunrise = midnight. So the sun rises, at exactly the time it sets. There are 24 hours of daylight with the sun just dipping below the horizon at precisely midnight.

How do you calculate sun set?

Sunrise/Sunset Calculations where the positive number corresponds to sunrise, negative to sunset. Then the UTC time of sunrise (or sunset) in minutes is: sunrise = 720 – 4*(longitude + ha) – eqtime where longitude and hour angle are in degrees and the equation of time is in minutes.

How is sunrise hour angle calculated?

The hour angle is converted to a number of minutes by multiplying the angle by 4 minutes per degree of hour angle, then that number of minutes is subtracted from 12:00 noon for the time of sunrise and added to 12:00 noon for the time of sunset, both in local solar time (LSoT).

What are the maximum and minimum duration of daylight at your latitude?

Areas on the Equator have a constant 12 hours of day light all year round. As latitude increases to 80° (polar circles - north or south) day length can be seen to increase to 24 hours or decrease to zero (depending on time of year).


1 Answers

Nice problem. Would this Sunset/Sunrise algorithm be helpful?

Source:

Almanac for Computers, 1990
published by Nautical Almanac Office
United States Naval Observatory
Washington, DC 20392
like image 190
miku Avatar answered Sep 26 '22 08:09

miku