# Position of the Sun

The Sun seen from Lamlash (55° 31′ 47.43″ N, 5° 05′ 59.77″ W) on 3 January 2010, at 8:53 a.m., local time

The position of the Sun in the sky is a function of both time and the geographic coordinates of the observer on the surface of the Earth. As the Earth moves around the Sun during the course of the year, the Sun appears to move with respect to the fixed stars on the celestial sphere, along a path called the "ecliptic". The Earth's rotation about its axis causes the fixed stars to move in the sky in a way that depends on the observer's geographic latitude. The time when a given fixed star crosses the observer's meridian depends on the geographic longitude. To find the Sun's position for a given observer at a given time, one may therefore proceed in three steps:[1][2]

This calculation is useful in astronomy, navigation, surveying, meteorology, climatology, solar energy, and for designing sundials.

## Approximate position

### Ecliptic coordinates

These equations, from the Astronomical Almanac,[3][4] can be used to calculate the apparent coordinates of the Sun, mean equinox and ecliptic of date, to a precision of about 0°.01 (36″), for dates between 1950 and 2050.

Start by calculating n, the number of days (positive or negative) since Greenwich noon, Terrestrial Time, on 1 January 2000 (J2000.0). If you know the Julian date for your desired time then

$n = \mathrm{JD} - 2451545.0$

The mean longitude of the Sun, corrected for the aberration of light, is:

$L = 280.460^\circ + 0.9856474^\circ n$

The mean anomaly of the Sun (actually, of the Earth in its orbit around the Sun, but it is convenient to pretend the Sun orbits the Earth), is:

$g = 357.528^\circ + 0.9856003^\circ n$

Put $L$ and $g$ in the range 0° to 360° by adding or subtracting multiples of 360° as needed.

Finally, the ecliptic longitude of the Sun is:

$\lambda = L + 1.915^\circ \sin g + 0.020^\circ \sin 2g$

The ecliptic latitude of the Sun is nearly:

$\beta = 0$, as the ecliptic latitude of the Sun never exceeds 0.00033°,[5]

and the distance of the Sun from the Earth, in astronomical units, is:

$R = 1.00014 - 0.01671 \cos g - 0.00014 \cos 2g$.

### Equatorial coordinates

$\lambda$, $\beta$ and $R$ form a complete position of the Sun in the ecliptic coordinate system. This can be converted to the equatorial coordinate system by calculating the obliquity of the ecliptic, $\epsilon$, and continuing:

$\alpha = \arctan(\cos \epsilon \tan \lambda)$, where $\alpha$ is in the same quadrant as $\lambda$,

and declination,

$\delta = \arcsin(\sin \epsilon \sin \lambda)$.

### Horizontal coordinates

For more details on this topic, see Horizontal coordinate system.

### Rectangular equatorial coordinates

In right-handed rectangular equatorial coordinates (where the $X$ axis is in the direction of the vernal equinox, and the $Y$ axis is 90° to the east, in the plane of the celestial equator, and the $Z$ axis is directed toward the north celestial pole[6] ), in astronomical units:

$X = R \cos \lambda$

$Y = R \cos \epsilon \sin \lambda$

$Z = R \sin \epsilon \sin \lambda$

### Obliquity of the ecliptic

Where the obliquity of the ecliptic is not obtained elsewhere, it can be approximated:

$\epsilon = 23.439^\circ - 0.0000004^\circ n$

for use with the above equations.

## Declination of the Sun as seen from Earth

The Sun's path over the celestial sphere changes with its declination during the year. Azimuths where the Sun rises and sets at the summer and winter solstices, for an observer at 56°N latitude, are marked in °N on the horizontal axis.

### Overview

The Sun appears to move northward during the northern spring. Its declination reaches a maximum equal to the angle of the Earth's axial tilt (23.44 degrees)[7] on the June solstice, then decreases until the December solstice, when its value is the opposite of (-1 times) the axial tilt. This variation produces the seasons.

A graph of solar declination during a year looks like a sine wave with an amplitude of 23.44 degrees, but one lobe of the "sine wave" is several days longer than the other, among other differences.

Imagine that the Earth is spherical, in a circular orbit around the Sun, and that its axis is tilted 90 degrees, so that the axis itself is in the plane of the orbit. At one date in the year the Sun is vertically overhead at the North Pole, so its declination is +90 degrees. For the next few months, the sub-solar point moves toward the South Pole at constant speed, crossing the lines of latitude at a constant rate, so the solar declination decreases linearly with time. Eventually the Sun is over the South Pole, with a declination of -90 degrees. Then it starts to move northward at a constant speed. So the graph of the Sun's declination, as seen from this highly tilted Earth, would not resemble a sine wave — it would be a sawtooth, zig-zagging between plus and minus 90 degrees, with linear segments between the maxima and minima.

Now suppose that the axial tilt decreases. The absolute maximum and minimum values of the declination decrease, to equal the axial tilt. Also, the shapes of the maxima and minima on the graph become less acute ("pointy") so that they are curved to resemble the maxima and minima of a sine wave. However, when the axial tilt equals that of the real Earth, the maxima and minima are still more acute than those of a sine wave.

The real Earth's orbit is elliptical. The Earth moves more rapidly around the Sun near perihelion, in early January, than near aphelion, in early July. This makes processes like the variation of the solar declination happen faster in January than July. On the graph, this makes the minima more acute than the maxima. Also, since perihelion and aphelion do not happen on exactly the same dates as the solstices, the maxima and minima are slightly asymmetrical. The rates of change before and after are not quite equal.

The graph of apparent solar declination is therefore different in several ways from a sine wave. Calculating it accurately involves some complexity, as shown below.

### Calculations

The declination of the Sun, δ, is the angle between the rays of the Sun and the plane of the Earth's equator. The Earth's axial tilt (called the obliquity of the ecliptic by astronomers) is the angle between the Earth's axis and a line perpendicular to the Earth's orbit. The Earth's axial tilt changes slowly over thousands of years but its current value of about ε = 23°26' is nearly constant, so the change in solar declination during one year is nearly the same as during the next year.

At the solstices, the angle between the rays of the Sun and the plane of the Earth's equator reaches its maximum value of 23°26'. Therefore δ = +23°26' at the northern summer solstice and δ = −23°26' at the southern summer solstice.

At the moment of each equinox, the center of the Sun appears to pass through the celestial equator, and δ is 0°.

The Sun's declination at any given moment is calculated by:

$\delta_\odot = \arcsin \left [ \sin \left ( -23.44^\circ \right ) \cdot \sin \left ( EL \right ) \right ]$

where EL is the ecliptic longitude (essentially, the Earth's position in its orbit). Since the Earth's orbital eccentricity is small, its orbit can be approximated as a circle which causes up to 1 degree of error. The circle approximation means the EL would be 90 degrees ahead of the solstices in Earth's orbit (at the equinoxes), so that sin(EL) can be written as sin(90+NDS)=cos(NDS) where NDS is the number of days after the December solstice. By also using the approximation that arcsin[sin(d)*cos(NDS)] is close to d*cos(NDS), the following frequently used formula is obtained:

$\delta_\odot = - 23.44^\circ \cdot \cos \left [ \frac{360^\circ}{365} \cdot \left ( N + 10 \right ) \right ]$

where N is the day of the year beginning with N=0 at midnight Coordinated Universal Time as January 1 begins (i.e. the days part of the ordinal date -1). The number 10, in (N+10), is the approximate number of days after the December solstice to January 1. This equation overestimates the declination near the September equinox by up to +1.5 degrees. The sine function approximation by itself leads to an error of up to 0.26 degrees and has been discouraged for use in solar energy applications.[2] The 1971 Spencer formula[8] (based on a fourier series) is also discouraged for having an error of up to 0.28 degrees.[9] An additional error of up to 0.5 degrees can occur in all equations around the equinoxes if not using a decimal place when selecting N to adjust for the time after Coordinated Universal Time midnight for the beginning of that day. So the above equation can have up to 2.0 degrees of error, about 4 times the Sun's angular width, depending on how it is used.

The declination can be more accurately calculated by not making the two approximations, using the parameters of the Earth's orbit to more accurately estimate EL:[10]

$\delta_\odot = \arcsin \left [ \sin \left ( -23.44^\circ \right ) \cdot \cos \left ( \frac{360^\circ}{365.24} \left (N + 10 \right ) + \frac{360^\circ}{\pi} \cdot 0.0167 \sin \left ( \frac{360^\circ}{365.24} \left ( N - 2 \right ) \right ) \right ) \right ]$

which can be simplified by evaluating constants to:

$\delta_\odot = - \arcsin \left [ 0.39779 \cos \left ( 0.98565 \left (N + 10 \right ) + 1.914 \sin \left ( 0.98565 \left ( N - 2 \right ) \right ) \right ) \right ]$

N is the number of days since midnight Coordinated Universal Time as January 1 begins (i.e. the days part of the ordinal date -1) and can include decimals to adjust for local times later or earlier in the day. The number 2, in (N-2), is the approximate number of days after January 1 to the Earth's perihelion. The number 0.0167 is the current value of the eccentricity of the Earth's orbit. The eccentricity varies very slowly over time, but for dates fairly close to the present, it can be considered to be constant. The largest errors in this equation are less than +/- 0.2 degrees, but are less than +/- 0.03 degrees for a given year if the number 10 is adjusted up or down in fractional days as determined by how far the previous year's December solstice occurred before or after noon on December 22. These accuracies are compared to NOAA's advanced calculations[11][12] which are based on the 1999 Jean Meeus algorithm that is accurate to within 0.01 degree.[13]

(The above formula is related to a reasonably simple and accurate calculation of the Equation of Time, which is described here.)

More complicated algorithms[14][15] correct for changes to the ecliptic longitude by using terms in addition to the 1st-order eccentricity correction above. They also correct the 23.44-degree obliquity which changes very slightly with time. Corrections may also include the effects of the moon in offsetting the Earth's position from the center of the pair's orbit around the Sun. After obtaining the declination relative to the center of the Earth, a further correction for parallax is applied, which depends on the observer's distance away from the center of the Earth. This correction is less than 0.0025 degrees. The error in calculating the position of the center of the Sun can be less than 0.00015 degrees. For comparison, the Sun's width is about 0.5 degrees.

### Atmospheric refraction

The declination calculations described above do not include the effects of the refraction of light in the atmosphere, which causes the apparent angle of elevation of the Sun as seen by an observer to be higher than the actual angle of elevation, especially at low Sun elevations.[2] For example, when the Sun is at an elevation of 10 degrees, it appears to be at 10.1 degrees. The Sun's declination can be used, along with its right ascension, to calculate its azimuth and also its true elevation, which can then be corrected for refraction to give its apparent position.[2][12][16]

## Equation of time

The equation of time — above the axis a sundial will appear fast relative to a clock showing local mean time, and below the axis a sundial will appear slow.
Main article: Equation of time

In addition to the annual north-south oscillation of the Sun's apparent position, corresponding to the variation of its declination described above, there is also a smaller but more complex oscillation in the east-west direction. This is caused by the tilt of the Earth's axis, and also by changes in the speed of its orbital motion around the Sun produced by the elliptical shape of the orbit. The principal effects of this east-west oscillation are variations in the timing of events such as sunrise and sunset, and in the reading of a sundial compared with a clock showing local mean time. As the graph shows, a sundial can be up to about 16 minutes fast or slow, compared with a clock. Since the Earth rotates at a mean speed of one degree every four minutes, relative to the Sun, this 16-minute displacement corresponds to a shift eastward or westward of about four degrees in the apparent position of the Sun, compared with its mean position. A westward shift causes the sundial to be ahead of the clock.

Since the main effect of this oscillation concerns time, it is called the equation of time, using the word "equation" in a somewhat archaic sense meaning "correction". The oscillation is measured in units of time, minutes and seconds, corresponding to the amount that a sundial would be ahead of a clock. The equation of time can be positive or negative. See the main article for further information.

## Analemma

Analemma with declination and equation of time to the same scale.
Main article: Analemma

The analemma is a diagram that shows the annual variation of the Sun's position on the celestial sphere, relative to its mean position, as seen from a fixed location on the Earth. (The word "analemma" is also occasionally, but rarely, used in other contexts.) It can be considered as an image of the Sun's apparent motion during a year. It can be photographed by superimposing pictures taken at the same time of day, a few days apart for a year. The analemma can also be considered as a graph of the Sun's declination, usually plotted vertically, against the equation of time, plotted horizontally. Usually, the scales are chosen so that equal distances on the diagram represent equal angles in both directions on the celestial sphere. Thus four minutes of time, in the equation of time, are represented by the same distance as one degree in the declination, since the Earth rotates at a mean speed of one degree every four minutes, relative to the Sun.

The analemma is drawn as it would be seen in the sky by an observer looking upward. If north is shown at the top, west is to the right. This is usually done even when the analemma is marked on a geographical globe, on which the continents, etc., are shown with west to the left.

Some analemmas are marked to show the position of the Sun on the graph on various dates, a few days apart, throughout the year. This enables the analemma to be used to make simple analog computations of quantities such as the times and azimuths of sunrise and sunset. Analemmas without date markings are used as decorations on such things as sundials. They have little practical usefulness.

## References and notes

1. ^ Meeus, Jean (1991). "Chapter 12, Transformation of Coordinates". Astronomical Algorithms. Willmann Bell, Inc., Richmond, VA. ISBN 0-943396-35-2.
2. ^ a b c d Jenkins, A. (2013). "The Sun's position in the sky". European Journal of Physics 34 (3): 633. arXiv:1208.1043. Bibcode:2013EJPh...34..633J. doi:10.1088/0143-0807/34/3/633. edit
3. ^ U.S. Naval Observatory, Nautical Almanac Office; U.K. Hydrographic Office, H.M. Nautical Almanac Office (2008). The Astronomical Almanac for the Year 2010. U.S. Govt. Printing Office. p. C5. ISBN 978-0-7077-4082-9.
4. ^ Much the same set of equations, covering the years 1800 to 2200, can be found at Approximate Solar Coordinates, at the U.S. Naval Observatory website. Graphs of the error of these equations, compared to an accurate ephemeris, can also be viewed.
5. ^ Meeus (1991), p. 152
6. ^ U.S. Naval Observatory Nautical Almanac Office (1992). P. Kenneth Seidelmann, ed. Explanatory Supplement to the Astronomical Almanac. University Science Books, Mill Valley, CA. p. 12. ISBN 0-935702-68-7.
7. ^ "Astronomical Almanac Online! 2013". US Naval Observatory. 2012. p. K7.
8. ^ J. W. Spencer (1971). Fourier series representation of the position of the sun.
9. ^ Sproul, Alistair B. "Derivation of the solar geometric relationships using vector analysis". Retrieved 28 February 2012.
10. ^ "SunAlign". Retrieved 28 February 2012.
11. ^ "NOAA Solar Calculator". Earth System Research Laboratory. Retrieved 28 February 2012.
12. ^ a b "Solar Calculation Details". Earth System Research Laboratory. Retrieved 28 February 2012.
13. ^ "Astronomical Algorithms". Retrieved 28 February 2012.
14. ^ "Computing the Solar Vector". Solar Energy 70 (5): 431–441. 2001. doi:10.1016/s0038-092x(00)00156-0.
15. ^ Ibrahim Reda and Afshin Andreas. "Solar Position Algorithm for Solar Radiation Applications". Retrieved 28 February 2012.
16. ^ "Atmospheric Refraction Approximation". National Oceanic and Atmospheric Administration. Retrieved 28 February 2012.