cspice_prop2b

 Abstract I/O Examples Particulars Required Reading Version Index_Entries
```
```

#### Abstract

```
CSPICE_PROP2B uses the two-body force model to propagate the
state of a massless body orbiting a primary at time t0 to
the body state at time t0 + dt.

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

```

#### I/O

```
Given:

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

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

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

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.

```

#### 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.

;;
;; In circular two-body motion, the orbital speed 's' is
;; 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.
;;
mu    =  398600.45d
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'
;;
;; Check position...
;;
print, pvinit[0:2]
print, state[0:2]

;;
;; ... and velocity.
;;
print, pvinit[3:5]
print, state[3:5]

IDL outputs for pvinit[0:2], state[0:2]:

0.0000000       70710678.       70710678.
0.0000000      -70710678.      -70710678.

IDL outputs for pvinit[3:5], state[3:5]:

0.0000000    -0.044643054     0.044643054
0.0000000     0.044643054    -0.044643054

```

```
None.

```

```
ICY.REQ

```

#### Version

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

Edits to comply with NAIF standard for Icy headers.

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

```

#### Index_Entries

```
Propagate state vector using two-body force model

```
`Wed Apr  5 17:58:02 2017`