Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
j2000_c

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version
Index_Entries

Procedure

   j2000_c ( Julian Date of 2000 JAN 1.5 ) 

   SpiceDouble j2000_c ( void )

Abstract

   Return the Julian Date of 2000 JAN 01 12:00:00 (2000 JAN 1.5).

Required_Reading

   None.

Keywords

   CONSTANTS


Brief_I/O

   The function returns the Julian Date of 2000 JAN 01 12:00:00
   (2000 JAN 1.5).

Detailed_Input

   None.

Detailed_Output

   The function returns 2451545.0, the Julian Date corresponding
   to 2000 JAN 01 12:00:00 (2000 JAN 1.5).

Parameters

   None.

Exceptions

   Error free.

Files

   None.

Particulars

   The function always returns the constant value shown above.

Examples

   The numerical results shown for these examples may differ across
   platforms. The results depend on the SPICE kernels used as
   input, the compiler and supporting libraries, and the machine
   specific arithmetic implementation.

   1) Display the double precision value for the J2000 date.


      Example code begins here.


      /.
         Program j2000_ex1
      ./
      #include <stdio.h>
      #include "SpiceUsr.h"

      int main( )
      {
         /.
         Display the J2000 date in 16.8 floating point format
         ./
         printf ( "J2000 date: %16.8f\n", j2000_c() );

         return ( 0 );
      }


      When this program was executed on a Mac/Intel/cc/64-bit
      platform, the output was:


      J2000 date: 2451545.00000000


   2) Convert an input time in UTC format to TDB seconds past the
      following reference epochs:

         - Besselian date 1900 and 1950; and

         - Julian date 1900, 1950, 2000 and 2100.

      Use the LSK kernel below to load the leap seconds and time
      constants required for the conversions.

         naif0012.tls


      Example code begins here.


      /.
         Program j2000_ex2
      ./
      #include <stdio.h>
      #include "SpiceUsr.h"

      int main( )
      {
         /.
         Local constants.
         ./
         #define        UTCSTR        "1991-NOV-26"

         /.
         Local variables.
         ./
         SpiceDouble             et;
         SpiceDouble             jed;

         /.
         Load the LSK file.
         ./
         furnsh_c ( "naif0012.tls" );

         /.
         Convert input UTC string to Ephemeris Time.
         ./
         str2et_c ( UTCSTR, &et );
         printf ( "Input ephemeris time  : %20.3f\n\n", et );

         /.
         Convert the Ephemeris Time to Julian ephemeris date, i.e.
         Julian date relative to TDB time scale.
         ./
         jed = unitim_c ( et, "ET", "JED" );

         /.
         Convert Julian Date to TDB seconds past the reference epochs
         and output the results.
         ./
         printf ( "TDB seconds past B1900: %20.3f\n",
                  ( jed - b1900_c() ) * spd_c()     );
         printf ( "TDB seconds past B1950: %20.3f\n",
                  ( jed - b1950_c() ) * spd_c()     );
         printf ( "TDB seconds past J1900: %20.3f\n",
                  ( jed - j1900_c() ) * spd_c()     );
         printf ( "TDB seconds past J1950: %20.3f\n",
                  ( jed - j1950_c() ) * spd_c()     );
         printf ( "TDB seconds past J2000: %20.3f\n",
                  ( jed - j2000_c() ) * spd_c()     );
         printf ( "TDB seconds past J2100: %20.3f\n",
                  ( jed - j2100_c() ) * spd_c()     );

         return ( 0 );
      }


      When this program was executed on a Mac/Intel/cc/64-bit
      platform, the output was:


      Input ephemeris time  :       -255614341.817

      TDB seconds past B1900:       2900118570.055
      TDB seconds past B1950:       1322272271.321
      TDB seconds past J1900:       2900145658.183
      TDB seconds past J1950:       1322265658.183
      TDB seconds past J2000:       -255614341.817
      TDB seconds past J2100:      -3411374341.817

Restrictions

   None.

Literature_References

   None.

Author_and_Institution

   J. Diaz del Rio     (ODC Space)
   W.L. Taber          (JPL)
   I.M. Underwood      (JPL)
   E.D. Wright         (JPL)

Version

   -CSPICE Version 1.0.3, 10-AUG-2021 (JDR)

       Edited the header to comply with NAIF standard. Added
       complete code examples.

   -CSPICE Version 1.0.2, 16-JAN-2008 (EDW)

       Corrected typos in header titles:

       Detailed Input to -Detailed_Input
       Detailed Output to -Detailed_Output

   -CSPICE Version 1.0.1, 10-NOV-2006 (EDW)

       Added -Parameters section header.

   -CSPICE Version 1.0.0, 08-FEB-1998 (EDW) (WLT) (IMU)

Index_Entries

   julian date of 2000 jan 1.5
Fri Dec 31 18:41:08 2021