Overview

The solar position algorithm is part of the safety function designed to detect when the concentrated focused sunlight goes off the heat stop reflector. To do this the actual solar position is calculated and compared to the where the telescope is pointed. The original specification is to allow a maximum 1.5 solar radii (0.40°) offset between the sun’s position and the telescope optical axis.

The formula for calculating the solar position is derived from Allen-Bradley’s Solar Position Algorithm Connected Components Accelerator Toolkit. This toolkit was originally designed as user-defined function block for the Micro 800 series of controllers. It has been modified to run as a routine in GuardLogix.

The toolkit is based on the National Renewable Energy Laboratory (NREL) Solar Position Algorithm. This algorithm is used to calculate the solar zenith and azimuth angles in the period from the year -2000 to 6000, with uncertainties of ±0.0003°. This algorithm was described in Jean Meeus' “Astronomical Algorithms”.

Procedure

Calculate the current Julian Ephemeris Day

One of the most important inputs to the algorithm is the current time expressed as the current Julian Ephemeris Millennium (JME). This can be obtained by converting the current system variable WallClockTime attribute LocalDateTime to the current Julian Day. Or obtained from the current system variable TimeSynchronize attribute CurrentMicrosecondTime.

Calculate the Earth heliocentric longitude, latitude, and radius vector (L, B, and R)

Calculate Earth heliocentric longitude (L):

L0_i = A_i * cos (B_i + C_i * JME)

where:

\[  \begin{array}{|c|c|c|} 
\hline 
        A_i & B_i & C_i\\
\hline
        175347046.0 & 0 & 0\\
        3341656.0 & 4.6692568 & 6283.07585\\
        34894.0 & 4.6261 & 12566.1517\\
        3497.0 & 2.7441 & 5753.3849\\
        3418.0 & 2.8289 & 3.5231\\
        3136.0 & 3.6277 & 77713.7715\\
        2676.0 & 4.4181 & 7860.4194\\
        2343.0 & 6.1352 & 3930.2097\\
        1324.0 & 0.7425 & 11506.7698\\
        1273.0 & 2.0371 & 529.691\\
        1199.0 & 1.1096 & 1577.3435\\
        990 & 5.233 & 5884.927\\
        902 & 2.045 & 26.298\\
        857 & 3.508 & 398.149\\
        780 & 1.179 & 5223.694\\
        753 & 2.533 & 5507.553\\
        505 & 4.583 & 18849.228\\
        492 & 4.205 & 775.523\\
        357 & 2.92 & 0.067\\
        317 & 5.849 & 11790.629\\
        284 & 1.899 & 796.298\\
        271 & 0.315 & 10977.079\\
        243 & 0.345 & 5486.778\\
        206 & 4.806 & 2544.314\\
        205 & 1.869 & 5573.143\\
        202 & 2.458 & 6069.777\\
        156 & 0.833 & 213.299\\
        132 & 3.411 & 2942.463\\
        126 & 1.083 & 20.775\\
        115 & 0.645 & 0.98\\
        103 & 0.636 & 4694.003\\
        102 & 0.976 & 15720.839\\
        102 & 4.267 & 7.114\\
        99 & 6.21 & 2146.17\\
        98 & 0.68 & 155.42\\
        86 & 5.98 & 161000.69\\
        85 & 1.3 & 6275.96\\
        85 & 3.67 & 71430.7\\
        80 & 1.81 & 17260.15\\
        79 & 3.04 & 12036.46\\
        75 & 1.76 & 5088.63\\
        74 & 3.5 & 3154.69\\
        74 & 4.68 & 801.82\\
        70 & 0.83 & 9437.76\\
        62 & 3.98 & 8827.39\\
        61 & 1.82 & 7084.9\\
        57 & 2.78 & 6286.6\\
        56 & 4.39 & 14143.5\\
        56 & 3.47 & 6279.55\\
        52 & 0.19 & 12139.55\\
        52 & 1.33 & 1748.02\\
        51 & 0.28 & 5856.48\\
        49 & 0.49 & 1194.45\\
        41 & 5.37 & 8429.24\\
        41 & 2.4 & 19651.05\\
        39 & 6.17 & 10447.39\\
        37 & 6.04 & 10213.29\\
        37 & 2.57 & 1059.38\\
        36 & 1.71 & 2352.87\\
        36 & 1.78 & 6812.77\\
        33 & 0.59 & 17789.85\\
        30 & 0.44 & 83996.85\\
        30 & 2.74 & 1349.87\\
        25 & 3.16 & 4690.48 \\
\hline
\end{array} \] 
L0 = \sum_{i=0}^{n} L0_i
L1_i = A_i * cos (B_i + C_i * JME)

where:

\[  \begin{array}{|c|c|c|} 
\hline 
        A_i & B_i & C_i\\
\hline
        628331966747.0 & 0 & 0\\
        206059.0 & 2.678235 & 6283.07585\\
        4303.0 & 2.6351 & 12566.1517\\
        425.0 & 1.59 & 3.523\\
        119.0 & 5.796 & 26.298\\
        109.0 & 2.966 & 1577.344\\
        93 & 2.59 & 18849.23\\
        72 & 1.14 & 529.69\\
        68 & 1.87 & 398.15\\
        67 & 4.41 & 5507.55\\
        59 & 2.89 & 5223.69\\
        56 & 2.17 & 155.42\\
        45 & 0.4 & 796.3\\
        36 & 0.47 & 775.52\\
        29 & 2.65 & 7.11\\
        21 & 5.34 & 0.98\\
        19 & 1.85 & 5486.78\\
        19 & 4.97 & 213.3\\
        17 & 2.99 & 6275.96\\
        16 & 0.03 & 2544.31\\
        16 & 1.43 & 2146.17\\
        15 & 1.21 & 10977.08\\
        12 & 2.83 & 1748.02\\
        12 & 3.26 & 5088.63\\
        12 & 5.27 & 1194.45\\
        12 & 2.08 & 4694\\
        11 & 0.77 & 553.57\\
        10 & 1.3 & 6286.6\\
        10 & 4.24 & 1349.87\\
        9 & 2.7 & 242.73\\
        9 & 5.64 & 951.72\\
        8 & 5.3 & 2352.87\\
        6 & 2.65 & 9437.76\\
        6 & 4.67 & 4690.48\\
\hline
\end{array} \] 
--uriencoded--L1 = \sum_%7Bi=0%7D%5e%7Bn%7D L1_i
L2_i = A_i * cos (B_i + C_i * JME)

where:

\[  \begin{array}{|c|c|c|} 
	\hline 
        A_i & B_i & C_i\\
	\hline
        52919.0 & 0 & 0\\
        8720.0 & 1.0721 & 6283.0758\\
        309.0 & 0.867 & 12566.152\\
        27 & 0.05 & 3.52\\
        16 & 5.19 & 26.3\\
        16 & 3.68 & 155.42\\
        10 & 0.76 & 18849.23\\
        9 & 2.06 & 77713.77\\
        7 & 0.83 & 775.52\\
        5 & 4.66 & 1577.34\\
        4 & 1.03 & 7.11\\
        4 & 3.44 & 5573.14\\
        3 & 5.14 & 796.3\\
        3 & 6.05 & 5507.55\\
        3 & 1.19 & 242.73\\
        3 & 6.12 & 529.69\\
        3 & 0.31 & 398.15\\
        3 & 2.28 & 553.57\\
        2 & 4.38 & 5223.69\\
        2 & 3.75 & 0.98\\
	\hline
\end{array} \] 
--uriencoded--L2 = \sum_%7Bi=0%7D%5e%7Bn%7D L2_i
L3_i = A_i * cos (B_i + C_i * JME)

where:

\[  
\begin{array}{|c|c|c|} 
	\hline 
        A_i & B_i & C_i\\
	\hline
        289.0 & 5.844 & 6283.076\\
        35 & 0 & 0\\
        17 & 5.49 & 12566.15\\
        3 & 5.2 & 155.42\\
        1 & 4.72 & 3.52\\
        1 & 5.3 & 18849.23\\
        1 & 5.97 & 242.73\\
	\hline
\end{array} \] 
--uriencoded--L3 = \sum_%7Bi=0%7D%5e%7Bn%7D L3_i
L4_i = A_i * cos (B_i + C_i * JME)

where:

\[  
\begin{array}{|c|c|c|} 
	\hline 
        A_i & B_i & C_i\\
	\hline
        114.0 & 3.142 & 0\\
        8 & 4.13 & 6283.08\\
        1 & 3.84 & 12566.15\\
	\hline
\end{array} \] 
--uriencoded--L4 = \sum_%7Bi=0%7D%5e%7Bn%7D L4_i
L5_i = A_i * cos (B_i + C_i * JME)

where:

\[  
\begin{array}{|c|c|c|} 
	\hline 
        A_i & B_i & C_i\\
	\hline 
        1 & 3.14 & 0\\
	\hline
\end{array} \] 
--uriencoded--L5 = \sum_%7Bi=0%7D%5e%7Bn%7D L5_i
L = \frac{(L0 + L1*JME + L2*JME^2 + L3*JME^3 + L4*JME^4 + L5*JME^5)}{10^8}

Calculate Earth heliocentric latitude (B):

B0_i = A_i * cos (B_i + C_i * JME)
--uriencoded--B0 = \sum_%7Bi=0%7D%5e%7Bn%7D B0_i
B1_i = A_i * cos (B_i + C_i * JME)
--uriencoded--B1 = \sum_%7Bi=0%7D%5e%7Bn%7DB1_i
B = \frac{(B0 + B1*JME)}{10^8}

Calculate the Earth radius vector (R) in astronomical units (AU):

R0_i = A_i * cos (B_i + C_i * JME)
--uriencoded--R0 = \sum_%7Bi=0%7D%5e%7Bn%7D R0_i
R1_i = A_i * cos (B_i + C_i * JME)
--uriencoded--R1 = \sum_%7Bi=0%7D%5e%7Bn%7DR1_i
R2_i = A_i * cos (B_i + C_i * JME)
--uriencoded--R2 = \sum_%7Bi=0%7D%5e%7Bn%7D R2_i
R3_i = A_i * cos (B_i + C_i * JME)
--uriencoded--R3 = \sum_%7Bi=0%7D%5e%7Bn%7D R3_i
R4_i = A_i * cos (B_i + C_i * JME)
--uriencoded--R4 = \sum_%7Bi=0%7D%5e%7Bn%7D R4_i
R = \frac{(R0 + R1*JME + R2*JME^2 + R3*JME^3 + R4*JME^4)}{10^8}

Caculate the geocentric longitude and latitude (Θ and ß)

\theta = L + 180
\beta = -B

Calculate the nutation in longitude and obliquity (Δψ and Δε)

Calculate the true obliquity of the ecliptic (ε)

Calculate the aberration correction (Δτ)

Calculate the apparent sun longitude (λ)

Calculate the apparent sidereal time (υ)

Calculate the geocentric sun right ascension (α)

Calculate the geocentric sun declination (δ)

Calculate the observer local hour angle (H)

Calculate the topocentric sun right ascension (α′)

Calculate the topocentric local hour angle (H′)

Calculate the topocentric zenith angle (Θ)

Calculate the topocentric azimuth angle (Φ)

Calculate the angular separation

\cos \Theta = \sin  \delta_1 \sin \delta_2 + \cos \delta_1 \cos \delta_2 \cos (\alpha_1 - \alpha_2)