#190 closed defect (fixed)
psTime: UT1-UTC and x_p,y_p table lookups
| Reported by: | Paul Price | Owned by: | Paul Price |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib ADD | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | calvin.harman@… |
Description
Sorry for not specifying this in more detail before, but I've now rewritten the
appropriate SDRS sections to make this more clear (pasted below). Please let me
know if there are any further questions.
\paragraph{Universal Time (UT1)}
\label{sec:ut1}
Univseral Time is a measure of the rotation angle of the Earth. When
corrected for polar motion it is referred to as UT1. This is distict
from UT0 which does not involve corrections for polar motion. UT1 may
be calculated from UTC through a table lookup of the appropriate value
of UTC - UT1 (\S\ref{sec:tables}).
[....]
\paragraph{Polar Coordinates}
The polar coordinates, $x_p$ and $y_p$, required for \code{SLA_AOPPA}
(and hence the \code{psGrommit}s), may be calculated through table
lookups (\S\ref{sec:tables}).
\paragraph{Table Lookups}
\label{sec:tables}
The offset of UTC from UT1, $\Delta$ UT1 = UTC - UT1, as well as the
pole coordinates, $x_p$ and $y_p$, may be determined from table
lookups. Tables are available covering different time periods and
with different time resolution:
\begin{itemize}
\item \code{ftp://maia.usno.navy.mil/ser7/ser7.dat}
\item \code{ftp://maia.usno.navy.mil/ser7/finals.all} with explanatory
guide at \code{ftp://maia.usno.navy.mil/ser7/readme.finals} . See also
the web page \code{http://maia.usno.navy.mil/}.
\item \code{http://hpiers.obspm.fr/eoppc/eop/eopc01/eopc01.1900-2004}
(contains estimates prior to 1972).
\end{itemize}
For the present time, it should be assumed that these tables reside on
local disk in known locations (i.e., there is no need that they are
downloaded from the internet and parsed by PSLib), containing the
minimum required information in a format that may be read quickly by
PSLib as required.
The location of these files, their priority order, and the from
and to dates of applicability will be known beforehand.
\tbd{Later, the location of these files, as well as the order of their
specification, will be made configurable.}
When a value is required, the table with the highest priority shall be
checked to see if the date is within the range of applicability for
the table. If not, the table with the next highest priority shall be
checked. If a table is found that is applicable, then the appropriate
value shall be derived from linear interpolation between the nearest
entries in the table. If no table is found that is applicable, and
the required date is later than those in the table, a warning shall be
generated, and a formula shall be applied (specifically, the formula
contained in the Bulletin A,
\code{ftp://maia.usno.navy.mil/ser7/ser7.dat}); the formula must be
easily configurable (i.e., not requiring recompilation, as the formula
will likely change with each Bulletin A). For dates prior to those
covered in the tables, the function shall generate a warning and
assume that TDT is identical to UTC (which, from Reingold \&
Dershowitz Figure 12.2 appears accurate to $\sim 10$ sec to about
1700), and that the polar motion ($x_p,y_p$) are zero.
Archeoastronomy is not a perceived PSLib application, so there is no
need for high precision at such early dates.
The tables shall be read in only when required by the user, and shall
remain in memory until the termination of the program. An additional
function, \code{psTimeTableReset} should be provided in order to force
the reloading of the time tables.
Attachments (5)
Change History (10)
comment:1 by , 22 years ago
| Status: | new → assigned |
|---|
by , 22 years ago
| Attachment: | psLibSDRS_pp9-10.pdf added |
|---|
Section of the revised SDRS showing the changes to psLibInit.
by , 22 years ago
| Attachment: | psLibSDRS_pp52-54.pdf added |
|---|
Section of the revised SDRS showing the specification of psTimeTable and related functions.
by , 22 years ago
| Attachment: | eopc01_1900_2004.40.dat added |
|---|
An example time table file, eopc01_1900_2004.40.dat
by , 22 years ago
| Attachment: | bulletinA_09Sep2004.dat added |
|---|
An example time table file, bulletinA_09Sep2004.dat
by , 22 years ago
| Attachment: | psTime.config added |
|---|
An example configuration file for psTime, psTime.config
comment:3 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
psTimeTable has been replaced by psLookupTable.
comment:4 by , 22 years ago
| Keywords: | VERIFIED added |
|---|
Closing subsequent to release of SDRS-08, ADD-07.
comment:5 by , 22 years ago
| Keywords: | VERIFIED removed |
|---|

I have now specified the internal representation of a lookup table (psTimeTable)
in the SDRS. This has necessitated a small change to another function,
psLibInit, in order for the details to be input. I will attach sections of the
SDRS here. Below I list the new APIs in the SDRS,
psTimeTable{Alloc,Load,Interpolate} (and a few additional lines which might also
help):
A table of UT1-UTC and polar coordinates
typedef struct {
} psTimeTable;
Constructor --- don't load
psTimeTable *psTimeTableAlloc(const char *filename, Filename of time table
Load a time table, return true for success
bool psTimeTableLoad(psTimeTable *table Time table to load
Interpolate on a table, return true if given MJD is within the given range
bool psTimeTableInterpolate(const psTimeTable *table, Table to interpolate on
Time tables
static psArray *timeTables;
Time predictions
static psMetadata *config;