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_CKGPAV returns pointing (attitude) and angular velocity 
   for a specified spacecraft clock time.

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


      inst     the scalar NAIF integer ID for the instrument, 
               spacecraft, or other structure for which pointing 
               is being requested
      sclkdp   the double precision scalar encoded spacecraft 
               clock time for which pointing is being requested
      tol      the double precision scalar time tolerance in 
               ticks (+/-), the units of encoded spacecraft
               clock time,  about 'sclkdp'
                  The C-matrix returned by cspice_ckgpav is the one whose
                  time tag is closest to 'sclkdp' and within 'tol' units
                  of 'sclkdp'.
               In general, because using a non-zero tolerance affects 
               selection of the segment from which the data is obtained, 
               users are strongly discouraged from using a non-zero 
               tolerance when reading CKs with continuous data. Using 
               a non-zero tolerance should be reserved exclusively to 
               reading CKs with discrete data because in practice 
               obtaining data from such CKs using a zero tolerance is 
               often not possible due to time round off. 

      ref      the scalar string name of the desired reference 
               frame for the returned pointing
   the call:
      cspice_ckgpav, inst  , sclkdp, tol, ref, cmat, av, $
                     clkout, found
      cmat     a double precision, 3x3 rotation matrix that transforms 
               the components of a vector expressed in the frame 
               specified by `ref' to components expressed in the frame 
               tied to the instrument, spacecraft, or other structure 
               at time 'clkout'
      av       the double precision angular velocity 3-vector measured
               in radians per second (this is the axis about which the 
               reference frame tied to the instrument is rotating in 
               the right-handed sense at time 'clkout')
      clkout   the scalar double precision encoded spacecraft clock 
               time associated with the returned C-matrix (this value 
               may differ from the requested time, but never by more 
               than the input tolerance 'tol')
      found    a scalar boolean with value TRUE when requested 
               pointing is found
   If 'vec_ref' is a double-precision 3-vector defined in reference
   frame 'ref', rotate 'vec_ref' into the instrument frame via:
      vec_inst = cmat ## vec_ref              ;; column vector
      vec_inst = transpose(cmat) # vec_ref    ;; row vector
      cspice_mxv, cmat, vec_ref, vec_inst     ;; row vector


   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.

   Retrieve pointing and angular velocity data from a Cassini 
   CK kernel.
      ;; Constants for this program:
      ;; -- The code for the Cassini spacecraft is -82
      ;; -- The code for the Cassini spacecraft bus is -82000.
      ;; -- The spacecraft clock ticks every 1/256 of a second. 
      ;; -- The reference frame we want is J2000.
      ;; -- The bus boresight has direction ( 0, 0, 1 ) in the
      ;;    bus (instrument) frame.
      SC     =   -82
      INST   =   -82000
      REF    =  'J2000'
      TICS   =  256.d
      NPICS  =   2
      BORE   = [ 0.d, 0.d, 1.d]
      CK     = '/kernels/cassini/ck/030810_031019_c39_port1_pa.bc'
      SCLK   = '/kernels/cassini/sclk/cas00082.tsc' 
      SCLKCH =  [ '1440000000.000' , '1445000000.000' ]
      ;; Load the CK pointing file. 
      cspice_furnsh, CK
      ;; Need to load a Cassini SCLK kernel to convert from 
      ;; clock string to ticks and the leapseconds kernel.
      cspice_furnsh, SCLK
      cspice_furnsh, ''
      ;; Calculate a tolerance for pointing data. Use 5 seconds,
      ;; convert to ticks by multiplying by the number of ticks
      ;; per second.
      toltik = 5.d * TICS
      for i = 0, (NPICS-1) do begin
         ;; cspice_ckgp requires encoded spacecraft clock time. 
         cspice_scencd, SC, SCLKCH[i], sclkdp  
         ;; Retrieve the 'REF' reference frame to 'INST' reference frame
         ;; transformation matrix at time sclkdp with a tolerance 
         ;; 'toltik'.
         ;;   [INST] = [cmat][ref]
         cspice_ckgpav, INST, sclkdp, toltik, REF, cmat, av, clkout, found
         ;; Did we find pointing information within (+/-) 'toltik' of the
         ;; requested time.
         if ( found ) then begin
            ;; Transform the 'BORE' vector from 'INST' reference frame to
            ;; 'REF' frame.
            ;;                T
            ;;  [ref] = [cmat] [INST]
            cspice_mtxv, cmat, BORE, bore_ref
            print, 'At SCLK time               : ', sclkch[i]
            print, 'The boresight vector       : ', bore_ref
            print, 'The angular velocity vector: ', av
         endif else begin
            print, 'Pointing not found for SCLK time: ', sclkch[i]
   IDL outputs (for SCLK = 1440000000.000):
      At SCLK time               : 1440000000.000
      The boresight vector       : -0.25517775      0.88933091     0.37944018
      The angular velocity vector: -3.1532789e-13  -7.8841788e-09  1.7857623e-08
   IDL outputs (for SCLK = 1445000000.000):
      At SCLK time               : 1445000000.000
      The boresight vector       : -0.31149356      0.87452887     0.37171362
      The angular velocity vector: -8.0798136e-11  -7.1102943e-10  1.5325493e-09



Required Reading



   -Icy Version 1.0.2, 03-JUN-2010, BVS (JPL)

       Edits to header. Added warning regarding non-zero tolerance.

   -Icy Version 1.0.1, 09-JUN-2006, EDW (JPL)

       Edits to header. Improved argument descriptions.

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


   get ck pointing and angular velocity 

Wed Apr  5 17:57:59 2017