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

   tyear_c ( Seconds per tropical year ) 

   SpiceDouble tyear_c ( void )

Abstract

   Return the number of seconds in a tropical year.

Required_Reading

   None.

Keywords

   CONSTANTS


Brief_I/O

   The function returns the number of seconds per tropical year.

Detailed_Input

   None.

Detailed_Output

   The function returns the number of seconds per tropical
   year. This value is taken from the 1992 Explanatory Supplement
   to the Astronomical Almanac (see [1]).

Parameters

   None.

Exceptions

   Error free.

Files

   None.

Particulars

   The tropical year is often used as a fundamental unit
   of time when dealing with older 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 double precision value of the number of seconds in a
      tropical year.

      Example code begins here.


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

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

         return ( 0 );
      }


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


      Seconds per tropical year:    31556925.97470000


   2) Suppose you wish to compute the number of tropical centuries
      that have elapsed since the ephemeris epoch B1950 (beginning
      of the Besselian 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 tyear_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 ( b1950_c(), "JED", "ET" ) );
         centur = centur / ( 100.0 * tyear_c() );

         printf ( "Tropical centuries past B1950: %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
      Tropical centuries past B1950:     0.9458128731

Restrictions

   None.

Literature_References

   [1]  P. Kenneth Seidelmann (Ed.), "Explanatory Supplement to the
        Astronomical Almanac," p 80, 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, 05-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 tropical year
Fri Dec 31 18:41:14 2021