<p>There has been a wry saying about IT people, that 'they love standards, and that's why there are so many of them': unfortunately something of the same is increasingly true of astronomical standards. So I sympathize with you in your problem, which seems basically due to (a) the number of different astronomical time standards which are (or have recently been) in use, and (b) the fact that people who apply those standards often do not specify full details of what they are using, and where its parts have come from.</p>
<p>As far as I can see, there's a kind of 'gold standard' of definiteness and clarity in specifying these things. Perhaps at the moment it's a  joint gold standard between first, 'SOFA' (<a href="http://www.sofa.org" rel="nofollow noreferrer">www.sofa.org</a>), the IAU's website for 'standards of fundamental astronomy', which is pretty complete although intricate (and something of a plus is that it identifies and supplies both present and recent-past standards); and second, the US Naval Observatory's 'Astronomical Almanac' (with current data distributed, a bit less conveniently, between (in part) hard-copy, and (also in part) in the Astronomical Almanac Online).</p>
<p>Turning to the details of your problem, it takes some work to find out (a) what standard your formulae belong to and (b) what standard is in use by the current 'Stellarium' software.</p>
<p>As for (a), after a bit of searching and calculating, it appears to me that your formulae are a slightly rounded set otherwise matching the 1982 standard for GMST -- which is two standards ago by now. Its details (in other units than those you have used) are given for example <a href="https://iausofa.org/2020_0721_C/sofa/Gmst82.c" rel="nofollow noreferrer">here</a>, and at Explanatory Supplement to the Astronomical Almanac (1992) at p.50, sec.2.24.
This standard came into force in 1984, and has since been superseded by later standards of 2000 (Gmst00) and 2006 (Gmst06). You can see them all  among others <a href="https://www.iausofa.org/2021_0125_C/ERA_ST.html" rel="nofollow noreferrer">here at SOFA earth-rotation page</a>.</p>
<p>As for (b) I did not yet succeed in identifying the GMST standard in use by Stellarium. (That's not a negative criticism, btw: Stellarium is an evolving software system, its original purpose (according to the user guide) was &quot;to present a beautiful simulation of the night sky, mostly to understand what is visible in the sky when you leave your house, i.e., for present times&quot;. Later on, its developers, appreciating a demand for greater accuracy, began a program of &quot;retrofitting detailed and accurate models&quot;, which &quot;has only recently (2021) come to a state where we as developers are beginning to be satisfied&quot;.) It's always hard for documentation to keep up, and maybe it has, but I couldn't find a statement of the standards they currently use.</p>
<p>It seems to me that in your current search for accuracy there are two basic approaches either of which you can use.</p>
<p>(1) You could try a largely empirical approach, first applying to your present GMST values the (time-dependent) difference mentioned by Greg Miller between apparent and mean sidereal time (used to be known as 'equation of the equinoxes' or 'nutation in RA' (see the SOFA website given above), its largest term depends on the longitude of the moon's ascending node). If there is any serious residue after that, you could try modeling how the residue behaves for the range of dates in which you are interested, and then apply the result as an empirical correction.</p>
<p>(2) You could try a more fundamental approach: e.g. try each of the likely combinations given by the SOFA software website and see how it fits, and/or ask the Stellarium developers if they can tell you which standards they currently adopt, and use those.</p>
<p>I'd suggest also that it's likely to be easier in the end if your code reproduces whatever standards you adopt, in exactly the same units and numbers as those in which the authoritative source is expressed, and if you then carry out any units-conversions called for by your application in separate operations. This makes it much easier and quicker to cross-check, proof-read your code and calculations, etc, by comparison with original sources, and the extra processing-time entailed in carrying out the calculations is a very tiny amount.</p>
<p>Also, for processing your dates, it's a help if you adopt exactly an authoritative source for your date-conversions, e.g. the Julian-day conversions from the ESAA 1992, given in the page-images reproduced <a href="https://astronomy.stackexchange.com/questions/49790/calculation-of-julian-day-is-off-for-negative-dates/49799#49799">here</a>. This helps to avoid or clarify doubts over such things as offsets of 12h, whether an interval is to be measured in UT or in sidereal time, &amp;c.</p>
<p>Good luck!</p>

CC BY-SA 4.0
2022-12-29T10:39:04.303Z
Many thanks for such a comprehensive answer. I have made approaches to Stellarium but it is not straight forward.
user36093
CC BY-SA 4.0
2022-12-28T00:57:59.760Z
2022-12-28T00:57:59.760Z
terry-s
<p>I have a number of date and times when I am interested in the location of my zenith and what objects might co-locate with these positions. The easiest way to do this was to put my latitude and longitude into Stellarium and create a bookmark at the North position of the azimuthal grid for each date/time. Stellarium will then give the Ra/Dec J2000 for the bookmark if required. This was ok for a low number of data points but now I have more than 3000 so I used information from this post <a href="https://astronomy.stackexchange.com/questions/24859/local-sidereal-time">Local Sidereal Time</a> to calculate LST for all my date and times in Excel. I then loaded all the LST values into a json file and opened them as stellarium bookmarks.
The problem is that all the values I calculate are displaced about 50 seconds from positions of stellarium markers based on the same date and time. Consequently there is too large an uncertainty to be sure whether my zeniths are coinciding with anything on Stellarium.</p>
<p>I used the following for my calculations:</p>
<p>LST= 100.4606184+(0.9856473662862 * Julian day)+Long+(decimal UT * 15)</p>
<p>Julian Day number = 367<em>y-INT(7</em>(y+INT((m+9)/12))/4)+INT(275*m/9)+day-730531.5 +
((h + mins/60 + seconds/3600)/24)</p>
<p>The JDN formula came from <a href="http://www.stargazing.net/kepler/altaz.html" rel="nofollow noreferrer">http://www.stargazing.net/kepler/altaz.html</a> , That website also contains example values which I used as a guide to get my calculations nearly right.
The result of the LST calculation was divided MOD.360 I then had to divide by 15 to make it recognisable - which I dont understand as it seems the LST calculation outputs degrees.</p>
<p>In case anyone else is looking to convert degrees to format suitable for json file I did this: starting with separate hour, minute, second columns I used the following excel formula to compile into a column that did not eliminate leading zeros =TEXT(A1,&quot;#00&quot;)&amp;TEXT(A2,&quot;#00&quot;)&amp;TEXT(A3,&quot;#00.0&quot;)
I had to make the minutes column an integer otherwise excel rounded it up if the decimals went over 0.5</p>
<p>Then I used this formula to insert the hms text =(REPLACE(REPLACE(A4,3,0,&quot;h&quot;),6,0,&quot;m&quot;))&amp;&quot;s&quot; to give the final format 02h27m13.2s suitable for the Stellarium bookmarks json file.</p>
<p>In options I have set excel to &quot;set precision as displayed&quot; with 8 decimal places in the cells and eliminated any rounding errors I could find.
For a starting date of 24/10/2019 00:29:16 my calculation gave 02h27m13.2s and a Stellarium bookmark at the zenith at that time gave 02h26m08.5s</p>
<p>Does anyone have experience of this problem, could suggest where to look next to solve it or spot my mistake?</p>

CC BY-SA 4.0
2022-12-27T23:37:04.043Z
Stellarium will likely use **apparent** sidereal time, what you're computing above is **mean** sidereal time.
Greg Miller
CC BY-SA 4.0
2022-12-28T04:05:35.313Z
Now that I have time to look.  The equations in question are in the sidereal_time.c file.  The references in the source code are for the first edition of Meeus' Astronomical Algorithms.  It looks like they mix IAU 1982 GMST algorithm with IAU 2000B nutation, which is non-standard and probably produces inaccurate results.
Greg Miller
CC BY-SA 4.0
2022-12-28T23:19:20.993Z
@Greg how do you access that file c and code?
user36093
CC BY-SA 4.0
2022-12-29T01:23:08.007Z
@user36093 it's on [github](https://github.com/Stellarium/stellarium/) and specifically [this directory](https://github.com/Stellarium/stellarium/tree/master/src/core/planetsephems)
astrosnapper
<positional-astronomy>
How to calculate Local siderial time that is consistent with Stellarium
user36093
# How to calculate Local siderial time that is consistent with Stellarium

(Asked by: username_0 on 2022-12-27)

I have a number of date and times when I am interested in the location of my zenith and what objects might co-locate with these positions. The easiest way to do this was to put my latitude and longitude into Stellarium and create a bookmark at the North position of the azimuthal grid for each date/time. Stellarium will then give the Ra/Dec J2000 for the bookmark if required. This was ok for a low number of data points but now I have more than 3000 so I used information from this post [Local Sidereal Time](https://astronomy.stackexchange.com/questions/24859/local-sidereal-time) to calculate LST for all my date and times in Excel. I then loaded all the LST values into a json file and opened them as stellarium bookmarks.
The problem is that all the values I calculate are displaced about 50 seconds from positions of stellarium markers based on the same date and time. Consequently there is too large an uncertainty to be sure whether my zeniths are coinciding with anything on Stellarium.

I used the following for my calculations:

LST= 100.4606184+(0.9856473662862 \* Julian day)+Long+(decimal UT \* 15)

Julian Day number = 367*y-INT(7*(y+INT((m+9)/12))/4)+INT(275\*m/9)+day-730531.5 +
((h + mins/60 + seconds/3600)/24)

The JDN formula came from <http://www.stargazing.net/kepler/altaz.html> , That website also contains example values which I used as a guide to get my calculations nearly right.
The result of the LST calculation was divided MOD.360 I then had to divide by 15 to make it recognisable - which I dont understand as it seems the LST calculation outputs degrees.

In case anyone else is looking to convert degrees to format suitable for json file I did this: starting with separate hour, minute, second columns I used the following excel formula to compile into a column that did not eliminate leading zeros =TEXT(A1,"#00")&TEXT(A2,"#00")&TEXT(A3,"#00.0")
I had to make the minutes column an integer otherwise excel rounded it up if the decimals went over 0.5

Then I used this formula to insert the hms text =(REPLACE(REPLACE(A4,3,0,"h"),6,0,"m"))&"s" to give the final format 02h27m13.2s suitable for the Stellarium bookmarks json file.

In options I have set excel to "set precision as displayed" with 8 decimal places in the cells and eliminated any rounding errors I could find.
For a starting date of 24/10/2019 00:29:16 my calculation gave 02h27m13.2s and a Stellarium bookmark at the zenith at that time gave 02h26m08.5s

Does anyone have experience of this problem, could suggest where to look next to solve it or spot my mistake?

**Tags:** positional-astronomy

> **Comments:**
> **username_1**: Stellarium will likely use **apparent** sidereal time, what you're computing above is **mean** sidereal time.  
> **username_1**: Now that I have time to look.  The equations in question are in the sidereal_time.c file.  The references in the source code are for the first edition of Meeus' Astronomical Algorithms.  It looks like they mix IAU 1982 GMST algorithm with IAU 2000B nutation, which is non-standard and probably produces inaccurate results.  
> **username_0**: @Greg how do you access that file c and code?  
> **username_2**: @username_0 it's on [github](https://github.com/Stellarium/stellarium/) and specifically [this directory](https://github.com/Stellarium/stellarium/tree/master/src/core/planetsephems)  

---

## 1 answers

### Answer by username_3 on 2022-12-28. Score: 2 | Accepted answer

There has been a wry saying about IT people, that 'they love standards, and that's why there are so many of them': unfortunately something of the same is increasingly true of astronomical standards. So I sympathize with you in your problem, which seems basically due to (a) the number of different astronomical time standards which are (or have recently been) in use, and (b) the fact that people who apply those standards often do not specify full details of what they are using, and where its parts have come from.

As far as I can see, there's a kind of 'gold standard' of definiteness and clarity in specifying these things. Perhaps at the moment it's a joint gold standard between first, 'SOFA' ([www.sofa.org](http://www.sofa.org)), the IAU's website for 'standards of fundamental astronomy', which is pretty complete although intricate (and something of a plus is that it identifies and supplies both present and recent-past standards); and second, the US Naval Observatory's 'Astronomical Almanac' (with current data distributed, a bit less conveniently, between (in part) hard-copy, and (also in part) in the Astronomical Almanac Online).

Turning to the details of your problem, it takes some work to find out (a) what standard your formulae belong to and (b) what standard is in use by the current 'Stellarium' software.

As for (a), after a bit of searching and calculating, it appears to me that your formulae are a slightly rounded set otherwise matching the 1982 standard for GMST -- which is two standards ago by now. Its details (in other units than those you have used) are given for example [here](https://iausofa.org/2020_0721_C/sofa/Gmst82.c), and at Explanatory Supplement to the Astronomical Almanac (1992) at p.50, sec.2.24.
This standard came into force in 1984, and has since been superseded by later standards of 2000 (Gmst00) and 2006 (Gmst06). You can see them all among others [here at SOFA earth-rotation page](https://www.iausofa.org/2021_0125_C/ERA_ST.html).

As for (b) I did not yet succeed in identifying the GMST standard in use by Stellarium. (That's not a negative criticism, btw: Stellarium is an evolving software system, its original purpose (according to the user guide) was "to present a beautiful simulation of the night sky, mostly to understand what is visible in the sky when you leave your house, i.e., for present times". Later on, its developers, appreciating a demand for greater accuracy, began a program of "retrofitting detailed and accurate models", which "has only recently (2021) come to a state where we as developers are beginning to be satisfied".) It's always hard for documentation to keep up, and maybe it has, but I couldn't find a statement of the standards they currently use.

It seems to me that in your current search for accuracy there are two basic approaches either of which you can use.

(1) You could try a largely empirical approach, first applying to your present GMST values the (time-dependent) difference mentioned by username_1 between apparent and mean sidereal time (used to be known as 'equation of the equinoxes' or 'nutation in RA' (see the SOFA website given above), its largest term depends on the longitude of the moon's ascending node). If there is any serious residue after that, you could try modeling how the residue behaves for the range of dates in which you are interested, and then apply the result as an empirical correction.

(2) You could try a more fundamental approach: e.g. try each of the likely combinations given by the SOFA software website and see how it fits, and/or ask the Stellarium developers if they can tell you which standards they currently adopt, and use those.

I'd suggest also that it's likely to be easier in the end if your code reproduces whatever standards you adopt, in exactly the same units and numbers as those in which the authoritative source is expressed, and if you then carry out any units-conversions called for by your application in separate operations. This makes it much easier and quicker to cross-check, proof-read your code and calculations, etc, by comparison with original sources, and the extra processing-time entailed in carrying out the calculations is a very tiny amount.

Also, for processing your dates, it's a help if you adopt exactly an authoritative source for your date-conversions, e.g. the Julian-day conversions from the ESAA 1992, given in the page-images reproduced [here](https://astronomy.stackexchange.com/questions/49790/calculation-of-julian-day-is-off-for-negative-dates/49799#49799). This helps to avoid or clarify doubts over such things as offsets of 12h, whether an interval is to be measured in UT or in sidereal time, &c.

Good luck!

> **Comments:**
> **username_0**: Many thanks for such a comprehensive answer. I have made approaches to Stellarium but it is not straight forward.  

---

