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
jyear_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

   jyear_c ( Seconds per julian year ) 

   SpiceDouble jyear_c ( void )

Abstract

   Return the number of seconds in a julian year.

Required_Reading

   None.

Keywords

   CONSTANTS


Brief_I/O

   The function returns the number of seconds per julian year.

Detailed_Input

   None.

Detailed_Output

   The function returns the number of seconds per julian year.

Parameters

   None.

Exceptions

   Error free.

Files

   None.

Particulars

   The julian year is often used as a fundamental unit of time when
   dealing with ephemeris data. For this reason its value in terms of
   ephemeris seconds is recorded in this function.

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 number of seconds in a Julian year.

      Example code begins here.


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

      int main( )
      {
         /.
         Display the number of seconds in a Julian Year, in 16.3 floating
         point format
         ./
         printf ( "Seconds per Julian year: %16.3f\n", jyear_c() );

         return ( 0 );
      }


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


      Seconds per Julian year:     31557600.000


   2) Suppose you wish to compute the number of julian centuries
      that have elapsed since the ephemeris epoch J1950 (beginning
      of the julian year 1950) at a particular UTC epoch.

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

         naif0012.tls


      Example code begins here.


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

      int main( )
      {
         /.
         Local constants.
         ./
         #define        UTCSTR        "2044-JUL-31"

         /.
         Local variables.
         ./
         SpiceDouble             et;
         SpiceDouble             centur;

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

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


         centur = ( et - unitim_c ( j1950_c(), "JED", "ET" ) );
         centur = centur / ( 100.0 * jyear_c() );

         printf ( "Centuries past J1950 epoch: %16.10f\n", centur );

         return ( 0 );

      }


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


      Input ephemeris time      :   1406808069.183
      Centuries past J1950 epoch:     0.9457905763

Restrictions

   None.

Literature_References

   [1]  P. Kenneth Seidelmann (Ed.), "Explanatory Supplement to the
        Astronomical Almanac," Page 8, University Science Books,
        1992.

Author_and_Institution

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

Version

   -CSPICE Version 1.0.1, 06-JUL-2021 (JDR)

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

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

Index_Entries

   Number of seconds per julian year
Fri Dec 31 18:41:08 2021