Celestial Programming : Local Solar Time

Local Solar Time is essentially the Local Hour Angle of the Sun, but offset so that midnight is 0h and noon is 12h. The hour angle is computed by $$ \begin{align*} H &= \theta_0 + \lambda - \alpha \\ or \\ H &= \theta - \alpha \\ \\ SolarTime &= H - 12 \end{align*} $$ Where \(H\) is the Local Hour Angle, \(\theta_0\) is Greenwich Sidereal Time, \(\theta\) is Local Sidereal Time, \(\lambda\) is the Longitude, and \(\alpha\) is the Right Ascension.

Alternate method using the Equation of Time

$$ SolarTime=UTC + \frac{Longitude}{15} + EquationOfTime $$ UTC and EquationOfTime should be expressed in hours, and Longitude in degrees.




Longitude:
Local Solar Time: