Index: trunk/psLib/src/astro/psTime.h
===================================================================
--- trunk/psLib/src/astro/psTime.h	(revision 1614)
+++ trunk/psLib/src/astro/psTime.h	(revision 1788)
@@ -54,6 +54,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-25 01:37:45 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-11 00:55:13 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -68,4 +68,5 @@
 
 #include "psType.h"
+#include "psImage.h"
 
 /// @addtogroup Time
@@ -91,7 +92,7 @@
 typedef struct psTime
 {
-    psS64 sec;          ///< Seconds since epoch, Jan 1, 1970.
-    psU32 usec;         ///< Microseconds since last second.
-    psTimeType type;    ///< Type of time.
+    psS64 sec;                          ///< Seconds since epoch, Jan 1, 1970.
+    psU32 usec;                         ///< Microseconds since last second.
+    psTimeType type;                    ///< Type of time.
 }
 psTime;
@@ -105,7 +106,6 @@
  */
 psTime* psTimeGetTime(
-    psTimeType type     ///< Type of time to get (UTC or TAI).
-);
-
+    psTimeType type                     ///< Type of time to get (UTC or TAI).
+);
 
 /** Convert psTime to UTC or TAI time.
@@ -116,6 +116,6 @@
  */
 psTime* psTimeConvert(
-    psTime *time,
-    psTimeType type
+    psTime *time,                       ///< Time to be converted.
+    psTimeType type                     ///< Type to be converted to.
 );
 
@@ -128,17 +128,6 @@
  */
 double psTimeToLST(
-    psTime *time,       ///< psTime to be converted.
-    double longitude    ///< Longitude.
-);
-
-/** Convert Local Mean Sidereal Time (LST) to psTime.
- *
- *  Converts LST time to psTime.
- *
- *  @return  psTime*: Pointer to psTime.
- */
-psTime* psLSTToTime(
-    double time,       ///< LST time to be converted.
-    double longitude   ///< Longitude.
+    psTime *time,                       ///< psTime to be converted.
+    double longitude                    ///< Longitude.
 );
 
@@ -150,5 +139,5 @@
  */
 double psGetUT1Delta(
-    psTime *time      ///< psTime to be looked up.
+    psTime *time                        ///< psTime to be looked up.
 );
 
@@ -160,5 +149,5 @@
  */
 double psGetTAIDelta(
-    psTime *time      ///< psTime to be looked up.
+    psTime *time                        ///< psTime to be looked up.
 );
 
@@ -170,6 +159,17 @@
  */
 /*psSphere* psGetPoleCoords(
-    psTime *time      ///< psTime determine polar orientation.
+    psTime *time                        ///< psTime determine polar orientation.
 );*/
+
+/** Calculate the number of leapseconds between two times.
+ *
+ *  Calculates the number of leapseconds between two times.
+ *
+ *  @return  psSphere*: Spherical coordinates of Earth's polar axias.
+ */
+psF64 psTimeLeapseconds(
+    const psTime *time1,                ///< First input time.
+    const psTime *time2                 ///< Second input time.
+);
 
 /** Convert psTime to Julian date time.
@@ -215,5 +215,6 @@
 /** Convert psTime to tm time.
  *
- * Converts psTime to tm time. This function does not add or subtract leapseconds.
+ * Converts psTime to tm time. This function is based on a Perl algorithm availble in the Pan-STARRS Image
+ * processing Algorithm Design Description (ADD). This function does not add or subtract leapseconds.
  *
  *  @return  tm: tm struct time.
@@ -250,5 +251,5 @@
  */
 psTime* psISOToTime(
-    char *time                         ///< Input time to be converted.
+    char *time                          ///< Input time to be converted.
 );
 
@@ -265,10 +266,11 @@
 /** Convert tm time to psTime.
  *
- *  Converts tm time to psTime. This function does not add or subtract leapseconds.
+ *  Converts tm time to psTime. This function is based on a Perl algorithm availble in the Pan-STARRS Image
+ * processing Algorithm Design Description (ADD). This function does not add or subtract leapseconds.
  *
  *  @return  psTime*: time.
  */
 psTime* psTMToTime(
-    struct tm *time                    ///< Input time to be converted.
+    struct tm *time                     ///< Input time to be converted.
 );
 
@@ -279,7 +281,7 @@
  *  @return  psTime*: time.
  */
-psTime* psTAIAdd(
-    psTime *tai1,                    ///< First TAI time.
-    psTime *tai2                     ///< Second TAI time.
+psTime* psTimeAdd(
+    psTime *tai1,                       ///< First TAI time.
+    psTime *tai2                        ///< Second TAI time.
 );
 
@@ -290,7 +292,7 @@
  *  @return  psTime*: time.
  */
-psTime* psTAISub(
-    psTime *tai1,                    ///< First TAI time.
-    psTime *tai2                     ///< Second TAI time.
+psTime* psTimeSub(
+    psTime *tai1,                       ///< First TAI time.
+    psTime *tai2                        ///< Second TAI time.
 );
 
@@ -302,7 +304,72 @@
  *  @return  psTime*: time.
  */
-psTime* psTAIDelta(
-    psTime *tai1,                    ///< First TAI time.
-    psTime *tai2                     ///< Second TAI time.
+psTime* psTimeDelta(
+    psTime *tai1,                       ///< First TAI time.
+    psTime *tai2                        ///< Second TAI time.
+);
+
+
+/** Read TAI/UTC data file.
+ *
+ *  Reads TAI/UTC data file.
+ *
+ *  @return  psImage*: Two-dimensional array with table data.
+ */
+psImage* readTaiUtcFile(
+    char *fileName                      ///< Name of file to read.
+);
+
+
+/** Read SER7 data file.
+ *
+ *  Reads SER7 data file.
+ *
+ *  @return  psImage*: Two-dimensional array with table data.
+ */
+psImage* readSer7File(
+    char *fileName                      ///< Name of file to read.
+);
+
+/** Read finals data file.
+ *
+ *  Reads finals data file.
+ *
+ *  @return  psImage*: Two-dimensional array with table data.
+ */
+psImage* readFinalsFile(
+    char *fileName                      ///< Name of file to read.
+);
+
+/** Read EOPC data file.
+ *
+ *  Reads EOPC data file.
+ *
+ *  @return  psImage*: Two-dimensional array with table data.
+ */
+psImage* readEopcFile(
+    char *fileName                      ///< Name of file to read.
+);
+
+/** Lookup and interpolate TAI-UTC data
+ *
+ *  Interpolates TAI-UTC data, given time in MJD format.
+ *
+ *  @return  double: Interpolated value.
+ */
+double lookupTaiUtcTable(
+    psImage *table,                     ///< Table with data.
+    psTime *time                        ///< time to lookup.
+);
+
+/** Lookup and interpolate polar or UT1-UTC data
+ *
+ *  Interpolates TAI-UT1 or polar coordinate data, given time in MJD format.
+ *
+ *  @return  double: Interpolated value.
+ */
+double lookupSer7Table(
+    psImage *table,                      ///< Table with data.
+    psTime *time,                        ///< time to lookup.
+    int col                              ///< Column to lookup.
 );
 /// @}
