earthShadowCoords

ssapy.compute.earthShadowCoords(r, time)[source][source]

Determine components of position r parallel and perpendicular to sun unit vector.

The sun unit vector points from the center of the sun through the center of the Earth. Decomposing a satellite position into these coordinates yields a simple model of whether or not the satellite is in Earth’s shadow:

r_par, r_perp = earthShadowCoords(r, time) inShadow = r_par > 0 and r_perp < EARTH_RADIUS

Parameters:
  • r (ndarray (3,)) – Position (GCRF) in meters

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

Returns:

  • r_par (float) – Position of satellite projected onto the sun unit vector in meters.

  • r_perp (float) – Distance of satellite from Earth-Sun line in meters.