Eclipse – ephemerista.analysis.eclipse

The eclipse.py module.

This module provides the Eclipse analysis: when each spacecraft is in the shadow of its central body, the beta angle of its orbit and, for spacecraft with a PowerSystem, the energy balance of its solar cells and battery.

class ephemerista.analysis.eclipse.Eclipse(*, scenario, startTime=None, endTime=None)

Eclipse and power analysis.

For every spacecraft of the scenario the analysis computes the visible fraction of the solar disk with a conical shadow model of its central body, finds the entries into and exits from the penumbra and umbra to within a millisecond, and computes the beta angle. Spacecraft with a PowerSystem also get the power of their solar cells and the state of charge of their battery.

Only the central body of each trajectory casts a shadow: for a lunar orbit that is the Moon, and eclipses by the Earth are not included.

analyze(ensemble=None)

Run the eclipse analysis.

Return type:

EclipseResults

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ephemerista.analysis.eclipse.EclipseResults(*, type='eclipse', startTime, spacecraft)

Results of the Eclipse analysis.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_dataframe(spacecraft_id)

Eclipse windows of one spacecraft as a DataFrame.

Return type:

pd.DataFrame

class ephemerista.analysis.eclipse.EclipseWindow(*, start, stop, duration, umbraStart=None, umbraStop=None, umbraDuration=0.0, truncated=False)

One passage through the shadow, from entry into the penumbra to exit from it.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ephemerista.analysis.eclipse.PowerResults(*, generatedPower, loadPower, stateOfCharge, minStateOfCharge, maxDepthOfDischarge, meanGeneratedPower, energyBalancePerOrbit, depletedDuration, powerPositive)

Energy balance of a spacecraft with a PowerSystem.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ephemerista.analysis.eclipse.SUN_RADIUS = 695700.0

Nominal solar radius in km (IAU 2015 Resolution B3).

class ephemerista.analysis.eclipse.SpacecraftEclipse(*, elapsed, illumination, betaAngle, windows, orbitalPeriod, eclipseFraction, umbraFraction, maxEclipseDuration, occultingBody, power=None)

Eclipse and power results of one spacecraft.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ephemerista.analysis.eclipse.beta_angle(r, v, s)

Angle between the direction of the Sun and the orbital plane in degrees.

Parameters:
  • r (ndarray) – Position and velocity of the spacecraft relative to its central body, shape (n, 3)

  • v (ndarray) – Position and velocity of the spacecraft relative to its central body, shape (n, 3)

  • s (ndarray) – Position of the Sun relative to the central body, shape (n, 3)

Return type:

ndarray

ephemerista.analysis.eclipse.illumination(r, s, body_radius)

Visible fraction of the solar disk (shadow function of a conical shadow model).

The Sun and the occulting body are spheres; the atmosphere and the flattening of the body are neglected. See Montenbruck and Gill, Satellite Orbits (2000), section 3.4.2.

Parameters:
  • r (ndarray) – Positions of the spacecraft relative to the occulting body in km, shape (n, 3)

  • s (ndarray) – Positions of the Sun relative to the occulting body in km, shape (n, 3)

  • body_radius (float) – Radius of the occulting body in km

Returns:

Values from 0 (umbra) to 1 (full sunlight)

Return type:

ndarray

ephemerista.analysis.eclipse.shadow_geometry(r, s, body_radius)

Apparent radii of the Sun and the occulting body and their angular separation, seen from the spacecraft.

Parameters:
  • r (ndarray) – Positions of the spacecraft relative to the occulting body in km, shape (n, 3)

  • s (ndarray) – Positions of the Sun relative to the occulting body in km, shape (n, 3)

  • body_radius (float) – Radius of the occulting body in km

Returns:

a, b, c – Apparent radius of the Sun, apparent radius of the body and the angle between their centres, in radians

Return type:

tuple[ndarray, ndarray, ndarray]