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

Required Reading


   CSPICE_SPKW03  write a type 3 SPK segment to a SPK file.

   For important details concerning this module's function, please refer to
   the CSPICE routine spkw03_c.


      handle   a scalar integer referring to an SPK file opened
               with write access
      body     a scalar integer NAIF ID identifying the body 
               trajectory to record in the SPK file
      center   the scalar integer NAIF ID for the center of motion 
               associated with body
      frame    a string variable holding the reference frame name
               used to reference the states, e.g. "J2000"
      first    the scalar double precision starting epoch, in TDB 
               seconds past J2000, of the ephemeris data
      last     the double precision ending epoch, in TDB 
               seconds past J2000, of the ephemeris data
      segid    a string variable holding to the segment identifier
               (an SPK segment identifier may contain up to 40 
               printing ASCII characters )
      intlen   a double precision scalar describing the time
               interval in seconds covered by the Chebyshev 
               coefficient set
      n        the integer number of coefficient sets
      polydg   the integer degree of the Chebyshev polynomials,
               i.e. the number of Chebyshev coefficients minus one
      cdata    an array of double precision values containing
               the sets of Chebyshev polynomial coefficients to
               write to the SPK segment
                  the (degree + 1) coefficients for the first 
                  coordinate of the first logical record 
                  the coefficients for the second coordinate 
                  the coefficients for the third coordinate 
                  the coefficients for the derivative of the first 
                  the coefficients for the derivative of the 
                  second coordinate 
                  the coefficients for the derivative of the third 
                  the coefficients for the first coordinate for 
                  the second logical record, ... 
                  and so on. 
   the call:
      cspice_spkw03, handle, body, center, frame, first, last, $
                     segid, intlen, n, polydg, cdata, btime
   writes to the SPK file referred to by 'handle' a type 3 SPK segment
   containing the data listed in 'cdata'.


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      ;; Define the segment identifier parameters.
      BODY          = 3
      CENTER        = 10
      REF           = 'J2000'
      N_RECORDS     = 4
      SPK3          = "test3.bsp"
      CHBDEG        = 2
      ;; A set of Chebyshev coefficients.
      CHEBYCOEFFS03 = [  1.0101d, 1.0102d, 1.0103d, $
                         1.0201d, 1.0202d, 1.0203d, $
                         1.0301d, 1.0302d, 1.0303d, $
                         1.0401d, 1.0402d, 1.0403d, $
                         1.0501d, 1.0502d, 1.0503d, $
                         1.0601d, 1.0602d, 1.0603d, $
                         2.0101d, 2.0102d, 2.0103d, $
                         2.0201d, 2.0202d, 2.0203d, $
                         2.0301d, 2.0302d, 2.0303d, $
                         2.0401d, 2.0402d, 2.0403d, $
                         2.0501d, 2.0502d, 2.0503d, $
                         2.0601d, 2.0602d, 2.0603d, $
                         3.0101d, 3.0102d, 3.0103d, $
                         3.0201d, 3.0202d, 3.0203d, $
                         3.0301d, 3.0302d, 3.0303d, $
                         3.0401d, 3.0402d, 3.0403d, $
                         3.0501d, 3.0502d, 3.0503d, $
                         3.0601d, 3.0602d, 3.0603d, $
                         4.0101d, 4.0102d, 4.0103d, $
                         4.0201d, 4.0202d, 4.0203d, $
                         4.0301d, 4.0302d, 4.0303d, $
                         4.0401d, 4.0402d, 4.0403d, $
                         4.0501d, 4.0502d, 4.0503d, $
                         4.0601d, 4.0602d, 4.0603d  $
      ;; A set of epochs. 
      DISCRETEEPOCHS = [ 100.d, 200.d, 300.d, 400.d, 500.d, $ 
                         600.d, 700.d, 800.d, 900.d         $
      ;; Create a segment identifier.
      segid = 'SPK type 3 test segment'
      ;; Open a new SPK file.
      if ( cspice_exists(SPK3) ) then begin
         file_delete, SPK3
      cspice_spkopn, SPK3, 'Type 3 SPK internal file name.', 4, handle
      ;; Create a type 3 segment.
      cspice_spkw03, handle,                    $
                     BODY,                      $
                     CENTER,                    $
                     REF,                       $
                     DISCRETEEPOCHS[0],         $
                     DISCRETEEPOCHS[N_RECORDS], $
                     segid,                     $
                     intlen,                    $
                     N_RECORDS,                 $
                     CHBDEG,                    $
                     CHEBYCOEFFS03,             $ 
      ;; Close the SPK file.
      cspice_spkcls, handle



Required Reading



   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)


   write spk type_3 data segment 

Wed Apr  5 17:58:03 2017