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_EL2CGV converts an Icy ellipse to a center vector and
   two generating vectors. The selected generating vectors are
   semi-axes of the ellipse.

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



      ellipse   a structure describing a SPICE ellipse. The structure has
                the fields:

                   center:    dblarr(3)
                   semimajor: dblarr(3)
                   semiminor: dblarr(3)

   the call:

      cspice_el2cgv, ellipse, center, smajor, sminor


      center    the double precision 3-vector defining the center
                of 'ellipse'

      smajor    the double precision 3-vector defining the semi-major
                axis of 'ellipse'

      sminor    the double precision 3-vector defining the semi-minor
                axis of 'ellipse'. This ellipse is the set of points

                   center + cos(theta) smajor + sin(theta) sminor

                where theta ranges over the interval (-pi, pi].


   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 two arbitrary, linearly independent vectors
      ;; and a center vector.
      vec1    = [ 1.d,  1.d, 1.d ]
      vec2    = [ 1.d, -1.d, 1.d ]
      center  = [ 1.d,  1.d, 1.d ]

      ;; Calculate the semi-major and semi-minor axes of
      ;; the ellipse as generated by 'vec1' and 'vec2'.
      ;; (The cspice_saelgv call determines the orthogonal axes
      ;; of an ellipse from two generating vectors.)
      cspice_saelgv, vec1, vec2, smajor, sminor

      ;; Load the generating vectors into an ellipse structure.
      cspice_cgv2el, center, smajor, sminor, ellipse

      ;; Extract the CSPICE_ELLIPSE structure components into
      ;; variable.
      cspice_el2cgv, ellipse, cent, smaj, smin
      print, cent
      print, smaj
      print, smin

   IDL outputs for 'cent':
          1.0000000       1.0000000      1.0000000

   IDL outputs for 'smaj':
          1.4142136       1.2329564e-16  1.4142136

   IDL outputs for 'smin':
         -6.1647820e-17   1.4142136     -6.1647820e-17

   Realize, values on the order of 10E-16 are within double precision
   round-off to zero.

   The call does nothing but extract the 3-vector components of the
   CSPICE_ELLIPSE structure into individual 3-vectors.

   IDL native code to perform the same operation:

      cent =
      smaj = ellipse.semimajor
      smin = ellipse.semiminor



Required Reading



   -Icy Version 1.0.2, 07-FEB-2012, EDW (JPL)

      Clarified description of 'ellipse' output argument. A 'SPICE ellipse'
      not an 'Icy ellipse'.

   -Icy Version 1.0.1, 07-MAY-2008, EDW (JPL)

      Expanded description of Abstract, input, and output variables.

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


   ellipse to center and generating vectors

Wed Apr  5 17:58:01 2017