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
cspice_prop2b

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_PROP2B computes the state of a massless body at time t_0 + dt by
   applying the two-body force model to a given central mass and a given
   body state at time t_0.

I/O


   Given:

      gm       a scalar double precision defining the gravitational constant of
               the primary.

               help, gm
                  DOUBLE = Scalar

      pvinit   the double precision state 6-vector describing the initial state
               of the massless body (secondary) at some epoch.

               help, pvinit
                  DOUBLE = Array[6]

      dt       the double precision scalar time step in TDB seconds from the
               epoch.

               help, dt
                  DOUBLE = Scalar

   the call:

      cspice_prop2b, gm, pvinit, dt, pvprop

   returns:

      pvprop   a double precision 6-vector defining the state of the body at a
               time 'dt' from the epoch as determined by the classical two-body
               force model.

               help, pvprop
                  DOUBLE = Array[6]

Parameters


   None.

Examples


   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.

   1) Use the two-body force model to propagate the state of a
      massless body orbiting the Earth at 100,000,000 km after half
      a period.

      In circular two-body motion, the orbital speed is

         s     = sqrt(mu/r)

      where mu is the central mass. After tau/2 = pi*r/s seconds
      (half period), the state should equal the negative of the
      original state.

      Example code begins here.


      PRO prop2b_ex1

         ;;
         ;; Initial values.
         ;;
         mu    =  3.9860043543609598E+05
         r     =  1.d08
         speed =  sqrt( mu / r )
         t     =  cspice_pi()*r/speed

         pvinit= [  0.d, r/sqrt(2.d),      r/sqrt(2.d)   , $
                    0.d, -speed/sqrt(2.d), speed/sqrt(2.d) ]

         ;;
         ;; Calculate the state of the body at 0.5 period
         ;; after the epoch.
         ;;
         cspice_prop2b, mu, pvinit, t, state

         ;;
         ;; The 'state' vector should equal '-pvinit'
         ;;
         print, 'State at t0: '
         print, FORMAT='("   R   (km):",3F17.5)', pvinit[0:2]
         print, FORMAT='("   V (km/s):",3F17.5)', pvinit[3:5]

         print, ' '
         print, 'State at tau/2: '
         print, FORMAT='("   R   (km):",3F17.5)', state[0:2]
         print, FORMAT='("   V (km/s):",3F17.5)', state[3:5]

      END


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


      State at t0:
         R   (km):          0.00000   70710678.11865   70710678.11865
         V (km/s):          0.00000         -0.04464          0.04464

      State at tau/2:
         R   (km):         -0.00000  -70710678.11865  -70710678.11865
         V (km/s):          0.00000          0.04464         -0.04464


Particulars


   This routine uses a universal variables formulation for the
   two-body motion of an object in orbit about a central mass. It
   propagates an initial state to an epoch offset from the
   epoch of the initial state by time `dt'.

   This routine does not suffer from the finite precision
   problems of the machine that are inherent to classical
   formulations based on the solutions to Kepler's equation:

         n( t - T ) = E - e sin(E)         elliptic case
         n( t - T ) = e sinh(F) - F        hyperbolic case

   The derivation used to determine the propagated state is a
   slight variation of the derivation in Danby's book
   "Fundamentals of Celestial Mechanics" [1].

Exceptions


   1)  If `gm' is not positive, the error SPICE(NONPOSITIVEMASS) is
       signaled by a routine in the call tree of this routine.

   2)  If the position of the initial state is the zero vector, the
       error SPICE(ZEROPOSITION) is signaled by a routine in the call
       tree of this routine.

   3)  If the velocity of the initial state is the zero vector, the
       error SPICE(ZEROVELOCITY) is signaled by a routine in the call
       tree of this routine.

   4)  If the cross product of the position and velocity of `pvinit'
       has squared length of zero, the error SPICE(NONCONICMOTION)
       is signaled by a routine in the call tree of this routine.

   5)  If `dt' is so large that there is a danger of floating point
       overflow during computation, the error SPICE(DTOUTOFRANGE) is
       signaled by a routine in the call tree of this routine and a
       message is generated describing the problem. The value of `dt'
       must be "reasonable". In other words, `dt' should be less than
       10**20 seconds for realistic solar system orbits specified in
       the MKS system. (The actual bounds on `dt' are much greater but
       require substantial computation.) The "reasonableness" of `dt'
       is checked at run-time.

   6)  If any of the input arguments, `gm', `pvinit' or `dt', is
       undefined, an error is signaled by the IDL error handling
       system.

   7)  If any of the input arguments, `gm', `pvinit' or `dt', is not
       of the expected type, or it does not have the expected
       dimensions and size, an error is signaled by the Icy
       interface.

   8)  If the output argument `pvprop' is not a named variable, an
       error is signaled by the Icy interface.

Files


   None.

Restrictions


   1)  Users should be sure that `gm', `pvinit' and `dt' are all in the
       same system of units ( for example MKS ).

Required_Reading


   ICY.REQ

Literature_References


   [1]  J. Danby, "Fundamentals of Celestial Mechanics," 2nd Edition,
        pp 168-180, Willman-Bell, 1988.

Author_and_Institution


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

Version


   -Icy Version 1.0.2, 01-NOV-2021 (JDR)

       Edited -Examples section to comply with NAIF standard. Added
       example's task description.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.1, 15-AUG-2011 (EDW)

       Edits to comply with NAIF standard for Icy headers.

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

Index_Entries


    Propagate state vector using two-body force model



Fri Dec 31 18:43:06 2021