[time-nuts] Calculating sidereal time

Didier Juges shalimr9 at gmail.com
Sat Jan 19 19:08:23 UTC 2019


Replying to my own email as I understand my mistake...
Of course the leap seconds must be applied. The whole point of the leap
seconds is for UTC to be consistent with the actual position of the earth
in the sky, so to get accurate mjd, I have to use UTC.


On Sat, Jan 19, 2019 at 11:33 AM Didier Juges <shalimr9 at gmail.com> wrote:

> I believe I have clarified the issue with the Julian calendar being offset
> by half a day (ending in 0.5):
> The formula I am using uses Modified Julian Date, which has an offset of
> 51544.5 days with Julian Date, so I believe my formula is correct since the
> mjd2gmst() function adds that factor to the mjd value fed to it.
>
> Another detail bothers me. The formulas to convert mjd to gmst all take
> julian date or modified julian date as input, so I have to calculate Julian
> date. Julian date cannot be calculated from UTC since UTC is affected by
> leap seconds, so should I calculate Julian date from TAI or some other time
> reference not affected by leap seconds?
> At the moment, I calculate it from UTC and I am pretty sure that it is
> wrong, just not sure what else to do.
>
> On Sat, Jan 19, 2019 at 6:51 AM Didier Juges <shalimr9 at gmail.com> wrote:
>
>> I am using an Android app and the USNO web site. The USNO web site is
>> using server side scripting so there is a few 100mS delay. Considering this
>> small delay, they match very well but the app is more convenient so I
>> have been using that as my reference, checking it periodically against
>> USNO. Without knowing any better, I would like to think the USNO is
>> probably right.
>>
>> I have seen a couple other calculators but they have some offset and they
>> do not publish their code.
>> The one Tom sent me the link for is accessible on line. The web site
>> where it is hosted produces results that are off by a significant amount
>> (minutes) compared to the USNO, but the GMST calculation is using a very
>> similar formula to what I am using. It could be that the server time is
>> off, not every web server has NTP running. I have made an attempt to
>> compare the results after converting the JavaScript to C but I must have a
>> bug in my conversion as it's just broken at the moment.
>>
>> I have not found yet how to tell Lady Heather to display sidereal time
>> but have not looked very hard, that will be for today.
>>
>> As of this morning, my implementation is still off by 57 seconds, so at
>> least it is consistent.
>>
>> On Sat, Jan 19, 2019, 5:02 AM Mark Sims <holrum at hotmail.com wrote:
>>
>>> When I was playing with the sidereal time code I found lots of
>>> buggy/bogus implementations and also lots of web calculators that were
>>> either totally wrong or off by some amount.    Same for sunrise/sunset code
>>> and equation-of-time code.   It's hard to know what code / sites you can
>>> trust.  Heather could be off...
>>>
>>> A lot of the web based ones seemed to have their system clocks not all
>>> that accurate.
>>> _______________________________________________
>>> time-nuts mailing list -- time-nuts at lists.febo.com
>>> To unsubscribe, go to
>>> http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
>>> and follow the instructions there.
>>>
>>



More information about the Time-nuts_lists.febo.com mailing list