# Computer Modelling of Heliostat Fields by Ray-Tracing Techniques: Simulating the Sun
## 2 Sun Position
### Coordinates \(Ecliptic\to Equatorial\to Horizon\)  
To convert ecliptic coordinates to equatorial coordinates, the obliquity \(\varepsilon\) of the ecliptic (the angle between the Sun-Earth ecliptic plane and the celestial equator plane) must be known. \(\varepsilon\) changes slightly with time, so a small correction must be added to obtain accurate results. Since 1984, the Jet Propulsion Laboratory equation [22; 23] has been widely used for this calculation, where \(\varepsilon_{0}=23.452294^{\circ}\) is the obliquity of the ecliptic at the standard epoch J2000 and \(T\) is the number of Julian centuries since 2000.0 (see [22] for details):  
\[\varepsilon=\varepsilon_{0}-\frac{46.815T+0.0006T^{2}-0.00181T^{3}}{3600} \tag{6}\]  
The ecliptic longitude \(\lambda\) and latitude \(\beta\), plus the obliquity \(\varepsilon\) can then be used to calculate the equatorial coordinates (step 8) [22]:  
\[\sin\delta=\sin\beta\text{cos}\,\varepsilon+\cos\beta\text{sin}\,\varepsilon \text{sin}\,\lambda \tag{7}\]  
\[\tan\alpha=\frac{\sin\lambda\text{cos}\,\varepsilon-\tan\beta\text{sin}\, \varepsilon}{\cos\lambda} \tag{8}\]  
Equatorial coordinates are defined by a celestial longitude, the right ascension \(\alpha\), the angle (0 to 360\({}^{\circ}\)) measured from the celestial prime meridian (defined by the celestial north pole, the celestial south pole and the First Point of Aries) to the target meridian, and a celestial latitude, the declination \(\delta\), the angle (\(-90^{\circ}\) to \(+90^{\circ}\)) measured from the celestial equator to the target, along the target meridian. As these celestial coordinates are independent of time and location, they are widely used to describe star objects in astronomical publications. Moreover, these coordinates are easily converted to ecliptic coordinates (usually obtained from theoretical calculations) and horizon coordinates (needed to do sky observations).  
A closely related quantity that indeed depends on time and location is the so-called hour angle \(H\), given by the difference between LST time and the right ascension: \(H=LST-\alpha\). Both LST and \(\alpha\) are measured against the same celestial prime meridian  
Figure 3: Geocentric model describing the ecliptic coordinates \(\lambda\) and \(\beta\) of some object over an ecliptic plane with an obliquity \(\varepsilon\) relative to the celestial plane.  
(defined by the First Point of Aries), so \(H\) represents the sidereal time elapsed since the object crossed the observer's celestial meridian (the time defined by \(\alpha\)). It must be noted that both \(H\) and \(\alpha\) can be represented as a sidereal time of day or as an angle quantity, depending on the context.  
To convert equatorial to horizon coordinates (step 9), we need to know the declination, the observer's latitude \(\phi\), and the hour time \(H\), which depends on right ascension and LST time (which, in turn, depends on the observer's longitude \(\Psi\)) [22]:  
\[\sin h=\sin\delta\sin\phi+\cos\delta\text{cos}\,\phi\text{cos}\,H \tag{9}\]  
\[\cos A=\frac{\sin\delta-\sin\phi\text{sin}\,h}{\cos\phi\text{cos}\,h} \tag{10}\]  
The azimuth angle \(A\) (from 0 to 360\({}^{\circ}\)) is measured clockwise from the North pole. The altitude \(h\) (from \(-90^{\circ}\) to \(+90^{\circ}\)) is measured upwards from the horizon, so \(h=0\) at sunrise and sunset and \(h<0\) in the dark hours. As horizon coordinates depend on the hour angle \(H\), they depend on the observer's time and location, as expected.