This article uses a very idealized model to roughly calculate daylight hours and midday moments, and to calculate the time of sunrise and the day.

How do you calculate Daylight time? Or, how do you calculate the percentage of daylight time in a day? Figure out how much of the Sun's Sunday parallel loop (the trajectory of the Sun's motion on the celestial sphere) is above the horizon (ignoring the sun's revolution in one day and the uneven rotation of the Earth).

To figure out this ratio, you need these two quantities:

Symbol |
Meaning |
Why? |

\ (\delta \) |
Sun Latitude (Longitude of direct sun Point, north latitude is positive) |
Summer day long, winter day short |

\ (\varphi \) |
Local latitude (north latitude is positive) |
Arctic summertime, Antarctic polar Night |

, taking the northern hemisphere winter as an example, draw the celestial sphere, the horizon, and the parallel circle, and then make several auxiliary lines, using the relations of \ (\delta \) and \ (\varphi \) to represent the required proportions:

The center of the celestial sphere is \ (o\), the radius is \ (1\), the circle of the circle is \ (O ' \), the sun rises from the \ (a\) point, falls from the (b\) point, the Observer is not the extreme. Connect \ (ab\), \ (ao\), \ (AO ' \), \ (bo\), \ (BO \).

Take the midpoint of \ (ab\) (m\), connect \ (mo\), \ (MO ' \). Easy to know \ (\ANGLE{OAO '} =-\delta \), \ (\angle{moo '} = \varphi \).

Set \ (\angle{mo ' A} = \theta \), the ratio is \ (\frac{2\theta}{^{\circ}} = \frac{\theta}{180^{\circ}} \).

\ (\because OO ' \perp plane O ' AB \)

\ (\therefore oo ' \perp o ' M, OO ' \perp o ' A \)

\ (\therefore o ' o = \sin{(-\delta)}, o ' A = \cos{(-\delta)} \)

\ (\therefore o ' M = O ' o \cdot \tan{\varphi} = \sin{(-\delta)}\tan{\varphi} \)

\ (\therefore \cos{\theta} = \frac{o ' M}{o ' A} = \frac{\sin{(-\delta)}\tan{\varphi}}{\cos{(-\delta)}} = \tan{(-\delta)}\ Tan{\varphi} \)

\ (\therefore \theta = \arccos{(\tan{(-\delta)}\tan{\varphi})} \)

\ (\therefore \frac{\theta}{{180}^{\circ}} = \frac{\arccos{(\tan{(-\delta)}\tan{\varphi})}}{{180}^{\circ}} \)

Get the day-long expressions about \ (\delta \) and \ (\varphi \):

\ (\mathrm{daytime} = \frac{\arccos{(\tan{(-\delta)}\tan{\varphi})}}{{180}^{\circ}} \cdot {24}^{\mathrm{h}} \) \ ((\ \ Varphi \neq \pm {90}^{\CIRC}) \)

Although this formula was introduced from the "Northern Hemisphere winter" scenario, it also applies to the southern hemisphere and the summer (-\delta \) and \ (-\varphi \) are easy to see.

......

So the question is: \ (\delta \) How to ask? You have to draw a ball:

, the center of the celestial sphere is the Earth, the ecliptic and the equator intersect, set the vernal equinox point for \ (e\), Equinox for \ (E ' \), the Sun for \ (s\), the obliquity angle for \ (\varepsilon \), the Sun Center Huangching for \ (\lambda \).

Representation of \ (\delta \) with \ (\varepsilon \) and \ (\lambda \) through relations:

(s\) as a large arc \ (SS ' \) perpendicular to the equatorial intersection of the equator (S ' \) (Figure bit move place).

According to the spherical triangle sine theorem, in the sphere \ (\triangle{ses '} \), there are:

\ (\frac{\sin{(-\delta)}}{\sin{\varepsilon}}=\frac{\sin{(-\LAMBDA)}}{\sin{{90}^{\circ}} \)

\ (\sin{\delta} = \sin{\lambda}\sin{\varepsilon} \)

\ (\delta = \arcsin{(\sin{\lambda}\sin{\varepsilon})} \)

This formula is also applicable to a variety of situations.

......

The question comes again, \ (\lambda \) How to beg? There is no need to draw the ball, there is no ball to draw. One can be directly with the orbital parameters to calculate, the second is to get the date of the various solar terms, and then in the vicinity of the two throttle for linear interpolation.

The expression of the latitude and the yellow meridian of the sun can be made by the above-mentioned various types of daylight time:

\ (\mathrm{daytime} = {24}^{\mathrm{h}}\cdot\frac{\arccos{(\tan{(-\arcsin{(Sin{\lambda}sin{\varepsilon})})}\tan{\ Varphi})}}{{180}^{\circ} \) \ ((\varphi \neq \pm {90}^{\CIRC}) \)

Or

\ (\mathrm{daytime} = {24}^{\mathrm{h}}\cdot (1-\frac{\arccos{(\tan{(\arcsin{})}) Sin{\lambda}sin{\varepsilon {\varphi})}} {{180}^{\CIRC}}) \) \ ((\varphi \neq \pm {90}^{\CIRC}) \)

Or

\ (\mathrm{daytime} = {24}^{\mathrm{h}}\cdot (1-\frac{\arccos{\frac{\sin{\lambda}\sin{\varepsilon}\tan{\varphi}}{\ SQRT{1-\SIN^2{\LAMBDA}\SIN^2{\VAREPSILON}}}}}{{180}^{\CIRC}}) \ ((\varphi \neq \pm {90}^{\CIRC}) \)

Northern latitude \ ({36.5}^{\CIRC} \) Daylight time about the change of the solar yellow meridian such as:

Looks particularly like a sinusoidal curve and tries to fit it:

\ (\mathrm{daytime} \approx {12}^{\mathrm{h}} \cdot [(1-\frac{\arccos{(\tan{\varepsilon}\tan{\varphi})}}{{90}^{\ CIRC}}) \cdot Sin{\lambda} + 1] \) \ ((\varphi \neq \pm {90}^{\CIRC}) \)

Look at the error:

Maximum error \ (\pm 6 \mathrm{min} \), the effect is more general, the expression is not simplified much, it seems that the original formula.

With daylight time, the Sunrise Day is not always available in the following two formulas:

\ (T_{sunrise} = T_{noon}-\frac{\mathrm{daytime}}{2} \) (1)

\ (T_{sunset} = T_{noon} + \frac{\mathrm{daytime}}{2} \) (2)

The problem comes again, midday \ (T_{noon} \) is not necessarily 12:00:

First, there may be a lot worse between time and place, which can lead to a departure from 12:00 in the noon hour.

Second, due to the uneven movement of the Sun (both times), the noon hour will also deviate from 12:00.

The two effects are superimposed. The first problem is solved, as long as you know the longitude of the time zone central meridian and the local longitude, it's all right. The second one is not very good to forget. An approximate formula was given in the astronomical algorithm (I threw out the higher-order items):

\ (E ' = t_{mean}-t_{true} = 4 \cdot [\tan^2{(\frac{\varepsilon}{2})}\cdot \sin{2l}+2e\cdot \sin{(L-\bar{\omega})}] \) ( The unit of E is minutes)

where \ (l\) for Taiyangping Huangching (that is, the flat Sun Yellow Meridian, (imaginary) flat sun with a regression year for the cycle on the ecliptic do uniform circular motions. It can be considered approximately equal to the number of days between the last vernal equinox and today (or multiplied by the angular velocity of the Sun (\frac{{}^{\circ}}{{365.2422}^{\mathrm{d}}})), and \ (e\) for the Earth's orbital eccentricity, \ (\bar{\ Omega} \) Huangching for the Earth's recent point (Ri Xin). \ (e \approx 0.0167 \) and \ (\bar{\omega}\approx {102.982}^{\CIRC} \) can be considered constant for a short time.

Graphing (\ (e\) about \ (l\) changes):

Now ask for the noon time, make \ (t_{true} = 12:00 \), Solution:

\ (T_{mean}=12:00+e ' \)

The deviation from the time and place of the upper zone is finally obtained:

\ (t_{noon}=12:00 + 4^{\mathrm{m}}\cdot (l_{zone}-l_{local}) + 4^{\mathrm{m}} \cdot [\tan^2{(\frac{\varepsilon}{2})}\ CDOT \sin{2l}+2e\cdot \sin{(L-\bar{\omega})}] \)

where \ (L_{zone} \) and \ (L_{local} \) are the longitude and local longitude (east longitude) of the time zone's central Meridian, respectively.

At this point, you are done, using (1) and (2) Calculate Sunrise Day is not possible.

A rough calculation of daylight time and Sunrise day without time