2. GroundStation#
- class GroundStation(name: str, spice_id: int | str = None)#
Bases:
BodyRepresents a ground station in Scarabaeus. Contains values and methods necessary for modeling spacecraft communication.
- Parameters:
See also
scarabaeus.CelestialBodyGroundStation objects are placed on planetary bodies, defined by CelestialBody.
Attributes
Stored constant or polynomial mass profile.
The name of the Body object.
The SPICE ID of the Body object.
Methods
fit_mass_profile_from_data(t_array, m_array, ...)Fits a polynomial to a mass time history and sets it as the new mass profile.
get_mass(t)Evaluates the time-varying mass profile at specified epochs.
get_state(epoch_0[, reference_frame, origin])Retrieves the state of the body relative to a given origin in a specified reference frame.
mass([t])Returns the mass of the body.
set_mass_profile(poly, units)Sets the mass profile of the body using a polynomial function and associated units.
station_visibility(observer, target[, ...])Determines if a ground station can see a spacecraft with some elevation mask (defined by vis_angle).
- fit_mass_profile_from_data(t_array: ndarray, m_array: ndarray, domain: tuple, units: Units)#
Fits a polynomial to a mass time history and sets it as the new mass profile.
- Parameters:
t_array (
np.ndarray) – Time values in seconds (ephemeris time).m_array (
np.ndarray) – Corresponding mass values.deg (
int) – Degree of the polynomial.domain (
tuple) – Domain [t0, tf] for the polynomial conversion.units (
ArrayWUnits) – Units to assign to the mass profile. If None, uses existing mass profile units.
- Return type:
- get_mass(t: EpochArray) ArrayWUnits#
Evaluates the time-varying mass profile at specified epochs.
- Parameters:
t (
EpochArray) – Time(s) in ephemeris seconds (TDB).- Returns:
Evaluated mass at each input epoch.
- Return type:
- get_state(epoch_0, reference_frame: str = 'J2000', origin: str = 'EARTH')#
Retrieves the state of the body relative to a given origin in a specified reference frame.
- Parameters:
epoch_0 (
EpochArray) – The epoch times for which the state is to be computed.reference_frame (
str) – The reference frame in which the state is desired. Defaults to ‘J2000’.origin (
str) – The origin body relative to which the state is computed. Defaults to'EARTH'.
- Returns:
state_vector – The state vector of the body relative to the origin.
- Return type:
- mass(t: EpochArray | float | ndarray = None) ArrayWUnits#
Returns the mass of the body. If the mass is time-varying, evaluates it at time t. If the mass is constant, returns the same value regardless of t.
- Parameters:
t (
EpochArray,float, ornp.ndarray, optional) – Time(s) in ephemeris seconds (TDB) at which to evaluate the mass. Or None for constant mass.- Returns:
Mass at time t or constant mass.
- Return type:
- set_mass_profile(poly: SCBPolynomial, units: Units)#
Sets the mass profile of the body using a polynomial function and associated units. :param poly: A polynomial object representing the mass profile. :type poly:
SCBPolynomial:param units: The units associated with the mass profile. :type units:Units- Returns:
None
- station_visibility(observer, target, elevation_mask: float = 10.0)#
Determines if a ground station can see a spacecraft with some elevation mask (defined by vis_angle). The elevation mask is defined as degrees above the horizon.
- Parameters:
observer (
Instrument) – Ground station sensor.target (
Spacecraft) – Spacecraft for measurements to be taken of.elevation_mask (
float, optional) – Elevation mask defined in degrees above the horizon, defaults to10.0.
- Returns:
visibility_tag –
Trueif the station can see the spacecraft.False`if the station cannot see the spacecraft.- Return type:
- property mass_profile: ArrayWUnits | SCBPolynomial#
Stored constant or polynomial mass profile.