dircos

ssapy.compute.dircos(orbit, time, obsPos=None, obsVel=None, observer=None, propagator=KeplerianPropagator(), obsAngleCorrection=None)[source][source]

Calculate observed direction-cosines of orbiting objects as viewed at specified times and positions.

The direction cosines are the cosines of the angles between the vector pointing towards the orbiting object and the x, y, z axes. An equivalent description is that they are the components of the unit vector pointing towards the orbiting object.

Parameters:
  • orbit (Orbit or list of Orbit (n,)) – Orbit(s) for which to calculate direction cosines.

  • 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

  • obsPos (array_like (m, 3), optional) – Position of observer at given time.

  • obsVel (array_like (m, 3), optional) – Velocity of observer at given time. Only required if correcting for diurnal aberration.

  • observer (Observer or list of Observers (m,), optional) – Observer(s) used to calculate obsPos and obsVel.

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

  • obsAngleCorrection ({None, "linear", "exact"}, optional) – Correct actual angle to observed angle, meaning account for light-time delay, and aberration due to the observer’s velocity. None means don’t do any correction. “linear” means do an aberration correction and first order light-time correction. “exact” means do an aberration correction and iteratively solve for the exact light-time correction. (The “linear” correction is almost always sufficiently accurate).

Notes

Exactly 1 of obsPos and observer must be supplied. observer and obsPos follow similar broadcasting rules as detailed below explicitly only for obsPos.

The length of time and obsPos must match or be broadcastable to match. If orbit is scalar-valued (an Orbit instead of a list of Orbit), then that dimension will be squeezed out in the return value. Likewise, if both time and obsPos are scalar, that dimension 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.

When doing light time corrections, the time argument is the arrival time of the photons at the observer, as opposed to the emission time at the satellite.

Returns:

dircos – Direction cosines on the outer product of orbit(s) and time/obsPos.

Return type:

array_like (n, m, 3)