Print

Print


Pierre Maxted said:

> SUN67 advises the user to "[r]efer to the program source code for
> information on when the most recent leap second was added."
>
> The source code is not included with the distribution I have just
> downloaded (star-2015B for OS X), so how can I check this?

There's no really good answer to the question "How do I find out if
sla_DAT is up to date?", and it doesn't help that not having access
to source code was never envisaged in the innocent era when SLALIB
was developed.

The best answer is not to use sla_DAT in operational code (I
wouldn't, and don't in my TCS kernels) but to have your own
configuration-file based mechanism instead.  In this scenario,
sla_DAT is an excellent way to test your own code once and for all. 

Regarding changing the API for sla_DAT, I'd be reluctant as it's
well rusted in.  I suppose a kludge along the lines you suggest
(some magic value of the argument) could be considered, though it
goes against the grain.  Bear in mind that even if there is a way
of inquiring the most recent sla_DAT update, you still have to know
the recent history of leap seconds in order to be sure the copy is
truly up to date.  And if you're that clued-up you might just as
well handle the whole thing yourself and know it's right.

Incidentally, for applications that require precise and flexible
handling of time scales, you are best to use the SOFA software
(www.iausofa.org).  These tools get tricky things right such as
transforming UTC to TAI through a change of date that includes a
leap second.  And although the SOFA subroutine iau_DAT is nearly as
bad as sla_DAT, (a) it does at least tell you if your year is five
or more after the last update and (b) the source code is right there
on the web.


Patrick Wallace
____________________________________________________________________
RAL Space                                            +44-1235-531198
STFC Rutherford Appleton Laboratory
Harwell Oxford
Didcot, Oxfordshire, OX11 0QX, UK         [log in to unmask]
____________________________________________________________________

----
Starlink User Support list
For list configuration, including subscribing to and unsubscribing from the list, see
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=STARLINK