IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2194


Ignore:
Timestamp:
Oct 25, 2004, 11:41:40 AM (22 years ago)
Author:
Paul Price
Message:

psTimeMath replaces psTime{Add,Subtract}. Specified that time
differences are SI --- not including leap seconds.

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r2193 r2194  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.39 2004-10-25 20:59:03 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.40 2004-10-25 21:41:35 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    354354\item Added \code{psLookupTable} section, and removed
    355355  \code{psTimeTableInterpolate} (now redundant).
    356 \item Inputs to \code{psTimeAdd}, \code{psTimeSubtract},
    357   \code{psTimeDelta} no longer need to be TAI --- the functions will
    358   convert as required.  API and requirement changes.
     356\item \code{psTimeAdd} and \code{psTimeSubtract} merged to
     357  \code{psTimeMath}.  Specified that time differences are expressed in
     358  SI seconds (i.e., not including leap seconds).  Inputs to
     359  \code{psTimeMath} and \code{psTimeDelta} no longer need to be TAI
     360  --- the functions will convert from and to UTC as required.
    359361\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r2193 r2194  
    1 %%% $Id: psLibSDRS.tex,v 1.143 2004-10-25 20:59:03 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.144 2004-10-25 21:41:40 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    34433443
    34443444\begin{verbatim}
    3445 psTime *psTimeAdd(const psTime *time, psF64 delta);
    3446 psF64 psTimeSubtract(const psTime *time, psF64 delta);
     3445psTime *psTimeMath(const psTime *time, psF64 delta);
    34473446psF64 psTimeDelta(const psTime *time1, const psTime *time2);
    34483447\end{verbatim}
    3449 \code{psTimeAdd} adds some time to a \code{psTime}.
    3450 \code{psTimeSubtract} subtracts two times.  \code{psTimeDelta} gives
     3448\code{psTimeMath} adds the \code{delta} (in seconds; may be negative)
     3449to a \code{psTime}.  \code{psTimeDelta} gives
    34513450the difference between times \code{time1} and \code{time2} (which may
    34523451be negative).
    34533452
     3453Note that in both these, the difference between two times is to be
     3454expressed in \textit{SI} seconds, and not inclusive of leap seconds.
     3455For example, if we add 30 seconds to 1998-12-31T23:59:45Z, the result
     3456is 1999-01-01T00:00:14Z, since a leap second was introduced at
     34571999-01-01T00:00:00Z.
     3458
    34543459Time math may only be done on the \code{psTime} TAI type, and so the
    34553460functions shall internally convert the \code{psTime} inputs to TAI
    3456 before performing the math.  The type of the time returned by
    3457 \code{psTimeAdd} and \code{psTimeSubtract} shall be the same as that
    3458 of the input \code{time}.
     3461before performing the math; this is in order that leap seconds are
     3462accounted for.
     3463
     3464The type of the time returned by \code{psTimeMath} shall be the same
     3465as that of the input \code{time}.
     3466
    34593467
    34603468\subsubsection{Time Tables}
Note: See TracChangeset for help on using the changeset viewer.