2. SUMMARY OF ROUTINES
5. BUILDING INSTRUCTIONS
Click here for a text-only version of this file.
|DUTC||the integer number of days elapsed since January 1, 2000. Negative numbers refer to earlier dates.|
|secs||the floating-point (double precision) number of seconds since the beginning of a particular UTC day. For most days, 0 <= secs < 86400; however, some days have leap seconds, in which case 0 <= secs < 86401.|
|year||An integer calendar year (CE). Years are numbered sequentially so, since there was no year 0, 1 BCE is indicated by year=0, 2 BCE by year=-1, N BCE by year=-(N-1).|
|month||A numeric month value, 1=January, 2=February, ... 12=December. Within the toolkit, there is no restriction on the numeric range of month values; hence month=0 refers to December of the previous year and month=13 refers to January of the following year.|
|day||A numeric day value within a given month or year, where 1 is the first day. There is no restriction on the numeric range of day values; hence January 32 is equivalent to February 1.|
|J2000||noon, January 1, 2000. This is the epoch reference time for TAI and ET values, chosen for consistency with the SPICE Toolkit.|
|TAI||the number of seconds elapsed since J2000 Atomic Time (TAI). In the TAI time system, every day has exactly 86400 seconds; hence, times TAI and UTC differ by a whole number of seconds, where the number changes each time a leap second occurs.|
|ET||the number of seconds elapsed since J2000 Ephemeris Time (ET). This is the time frame on which planetary ephemerides are calculated (including the SPICE Toolkit). It differs from TAI times by a constant plus small periodic terms related to relativistic variations in the ticks of an Earth-based clock.|
|JDN||a Julian day number, equal to the whole number of elapsed days since since January 1, 4713 BCE.|
|JD||a Julian date. The integer part is the number Julian days elapsed since noon January 1, 4713 BCE; the fractional part gives the fraction of a day from one noon to the next. Julian dates can be based on times UTC, TAI or ET.|
|MJD||a UTC Modified Julian Date, defined as JD - 2400000.5.|
|(F)Jul_DUTCofYMD||converts year, month and day to DUTC.|
|(F)Jul_YDofDUTC||converts DUTC to year and day-of-year.|
|(F)Jul_YMDofDUTC||converts DUTC to year, month and day.|
|(F)Jul_Gregorian||lets the user specify the date at which the Gregorian calendar was adopted. This varied from country to country.|
|(F)Jul_IsLeapYear||determines whether a given year is a leap year.|
|(F)Jul_YearDays||returns the number of days in a given year.|
|(F)Jul_MonthDays||returns the number of days in a given month of a given year.|
|(F)Jul_DUTCofJDN||converts JDN to DUTC.|
|(F)Jul_JDNofDUTC||converts DUTC to JDN.|
|(F)Jul_SecofDHMS||converts days, hours, minutes and seconds to total seconds.|
|(F)Jul_DSofSec||converts a number of seconds to days and seconds-into- day.|
|(F)Jul_DHMSofSec||converts a number of seconds to days, hours, minutes and seconds (excluding possible leap seconds).|
|(F)Jul_HMSofSec||converts a number of seconds to hours, minutes and seconds (including possible leap seconds).|
|(F)Jul_TAIofJD||converts floating-point (double precision) JD to TAI.|
|(F)Jul_JDofTAI||converts TAI to floating-point (double precision) JD.|
|(F)Jul_TAIofMJD||converts floating-point (double precision) MJD to TAI.|
|(F)Jul_MJDofTAI||converts TAI to floating-point (double precision) MJD.|
|(F)Jul_LeapSecs||returns the number of leap seconds elapsed before a given day.|
|(F)Jul_IsLeapDay||determines whether a given day contains a leap second.|
|(F)Jul_DaySecs||returns the number of seconds in a given day.|
|(F)Jul_InitLeaps||reads a list of leap seconds from a file. A sample file leapsecs.lis is provided.|
|(F)Jul_TAIofJD||converts from JD to TAI.|
|(F)Jul_JDofTAI||converts from TAI to JD.|
|(F)Jul_TAIofMJD||converts from MJD of TAI.|
|(F)Jul_MJDofTAI||converts from TAI to MJD.|
|(F)Jul_FormatDate||formats a date in a specified style.|
|(F)Jul_FormatTime||formats a time in a specified style.|
|(F)Jul_FormatPDS||formats a date and time in PDS style.|
|(F)Jul_FormatSQL||formats a date and time in SQL style.|
|(F)Jul_ParseDT||interprets a character string as a date and time in arbitrary format.|
|(F)Jul_ParseDate||interprets a character string as a date.|
|(F)Jul_ParseTime||interprets a character string as a time.|
|fjulian.for||FORTRAN interfaces to Julian Library routines that pass character strings as arguments.|
|rlmemory.c||RingLib routines to manage memory.|
|rlerrors.c||RingLib routines to handle errors.|
|ringlib.h||C header file for RingLib.|
|fortran.c||Ringlib routines to convert between FORTRAN integers and C pointers.|
|fstrings.for||Ringlib routines to convert string representations between FORTRAN and C.|
|fortran.h||C header file for fortran.c and fstrings.for.|
|RL_INT4||a four-byte signed integer.|
|RL_BOOL||an integer taking on only values TRUE=1 and FALSE=0.|
|RL_FLT4||a single-precision (four-byte) floating point number.|
|RL_FLT8||a double-precision (eight-byte) floating point number.|
|RL_CHAR||a one-byte character.|
|RL_VOID||used in the context of "void *" as a pointer to a structure of arbitrary type.|
chmod +x makesun.com ./makesun.comTo build the library and binaries on a system by DEC or Silicon Graphics, type
chmod +x makedec.com ./makedec.comTo build the library and binaries on a Macintosh under OS X, type
chmod +x makemac.com ./makemac.comTo build the library and binaries under LINUX using the g77 compiler, type
chmod +x makeg77.com ./makeg77.comIn each case, the script file "make*.com" will compile each file and build an archive file called "make*.com". (Note that any pre-existent file called "julian.a" should be removed first). The sample program binary is called "tconvert".
The commands "cc" and "f77" are used by these scripts (except makeg77, where "g77" is called in place of "f77"). Be sure that your command search path includes these before executing the script.
To use the library, include "julian.a" among the files that appear on a cc or f77 command line. Note that for C programs, you must also include the "-lm" option to load in the C math libraries.
@MAKEVMS.COMThis will compile each file and build an object library called JULIAN.OLB. The sample program binary is called TCONVERT.EXE.
To use the library, include JULIAN/LIBRARY among the files in a LINK command. For programs written in FORTRAN, you must also include SYS$LIBRARY:VAXCRTL/LIBRARY because the C libraries are not linked in by default.
Version 1.2 (7/97) incorporates the leap second of June 30, 1997 into "leapsecs.c" and "leapsecs.lis". It also fixes a minor bug in Jul_FormatPDS().
Version 1.3 (6/98) contains extensive, mostly cosmetic changes, so that naming conventions better conform to those of the rest of the RingLib. It also incorporates HTML tags into the source code so that code may be easily inspected online.
Version 1.3.1 (12/98) contains the new leap second of December 31, 1998.
Version 1.3.2 (2/04) includes support for Macintosh OS X. It also provides a detached PDS label file "JULIAN.LBL" and a software catalog file "SOFTWARE.CAT", making the library suitable for archiving on any PDS volume.
Version 1.3.3 (2/05) includes support for LINUX and the g77 compiler.