Calculation of LMST

Accuracy : OverviewProgram Description

Several Internet sites point to a formula from "Astronomical Algorithms", author Jean Meeus.

Compute sidereal time at Greenwich

  1. T = (JD - 2451545.0 ) / 36525
  2. theta0 = 280.46061837 + 360.98564736629*(JD-2451545.0) + 0.000387933*T*T - T*T*T/38710000.0

JD is the Julian Date

Theta0 is in degrees. To convert to a time, subtract 360 until 0 <= Theta0 < 360 (then multiply by 240 to get sidereal seconds)

This formula can be simplified by leaving out the terms with T in them. The error is less than 0.1 seconds this century (i.e. 2100). To get the sidereal time at a particular longitude, known as Local Mean Sidereal Time, just add longitude in degrees, taking East as Positive.

LMST = 280.46061837 + 360.98564736629 * D + Long

D =  JD - 2451545.0 = the number of days and fraction (+ or -) from 2000 January 1, 12h UT

In designing the software, it was decided to avoid the multiplication 360.98564736629 * D, a 46 bit number and a 32 bit number, which would then be followed by a division by 360 to get the remainder. The alternate course was to break down the contribution of the various components of date and time and aggregate their contribution. The required result is time (seconds), so the computations are to the nearest 1/2^24 second (using 3 bytes for the fractional part). The individual errors contributed by each calculation is then not greater than the granularity of the timekeeping hardware (approx 1/2^19 second). The final formula used is:

LMST = (K + Long * 240 +7.3925159256 * fyp - 57.290712996 * ry + 236.5553679096 * (diy + 123) + sid + 0.002737909351 * sid) mod 86400, where

LMST is in seconds
K is a constant 9089.28254654 = ((
280.46061837 - (123 - 59.5) * 360.98564736629) mod 360) * 240
fyp is four year periods from 2000 up to the previous march 1st
ry is the remaining whole years up to the previous march 1st (e.g. 2014 yields fyp = 3 and ry =2)
diy is whole days in year since the previous march 1st (march 1st = 0)
sid is seconds in the current day 

 Although this may seem unnecessarily complex, one method of converting a date from ddmmyy (from the GPS) to days yields fyp, ry and diy+123 as intermediate values, so it is unnecesary to complete the conversion. Also, the result can be rounded to be less than 86400 by a maximum of three subtractions, which is simpler than a division. This may not be an optimal solution but it does the job.