rv

ssapy.compute.rv(orbit, time, propagator=KeplerianPropagator(), *, return_times=False)[source][source]

Calculate positions and velocities on the outer product of all supplied orbits and times.

Parameters:
  • orbit (Orbit or list of Orbit (n,)) – Desired orbit(s)

  • time (array_like or astropy.time.Time (m,)) – If float (array), then should correspond to GPS seconds; i.e., seconds since 1980-01-06 00:00:00 UTC

  • propagator (Propagator, optional) – The propagator instance to use.

  • return_times (bool, optional) – Also return the one-dimensional array of GPS epochs corresponding to the returned states. Useful when a numerical propagator terminates.

Notes

If orbit or time is scalar valued (as opposed to a list of Orbit, e.g.) then the corresponding dimension of the output will be squeezed out.

For Keplerian orbit propagation it is more efficient to use a “vector Orbit” instead of a list of single scalar Orbits.

Numerical termination can remove requested epochs at either end. A batch retains only epochs valid for every orbit, preserving the requested order (including duplicates). Use return_times=True to identify those epochs; a shortened result is not necessarily a prefix of the requested grid.

Returns:

  • r (array_like (n, m, 3)) – Position in meters.

  • v (array_like (n, m, 3)) – Velocity in meters per second.

  • times (ndarray (m,), optional) – Retained GPS epochs when return_times=True; always one-dimensional.