Constellation
- class dsns.constellation.OrbitalCenter(name: str, position: ndarray = array([0., 0., 0.]))
Orbital center class. Used to represent a body around which satellites orbit.
- __init__(name: str, position: ndarray = array([0., 0., 0.]))
Initialize the orbital center with a fixed position.
- Parameters:
name – Name of the orbital center.
position – Position of the orbital center (m).
- update(time: float)
Update the orbital center.
- Parameters:
time – Time in seconds since the epoch.
- class dsns.constellation.PlanetOrbitalCenter(name: str, center: ndarray | tuple[float, float, float] | OrbitalCenter, radius: float, rotation_period: float, angle_offset: float = 0.0)
Orbital center class for a planet with a fixed rotation period. We assume the orbit is a perfect circle centered on the origin, in the x-y plane.
- __init__(name: str, center: ndarray | tuple[float, float, float] | OrbitalCenter, radius: float, rotation_period: float, angle_offset: float = 0.0)
Initialize the orbital center.
- Parameters:
name – Name of the orbital center.
center – Center of the orbit (m).
radius – Radius of the orbit (m).
rotation_period – Rotation period of the planet (s).
angle_offset – Initial angle of the planet (degrees).
- update(time: float)
Update the orbital center.
- Parameters:
time – Time in seconds since the epoch.
- class dsns.constellation.Satellite(name: str, sat_id: int, constellation_name: str, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Satellite class. Used to represent a satellite in a constellation.
- __init__(name: str, sat_id: int, constellation_name: str, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
- class dsns.constellation.Satellites(satellites: list[Satellite])
List of satellites, with helper functions for lookup by name/ID.
- property ids: list[int]
Get a list of all satellite IDs.
- property names: list[str]
Get a list of all satellite names.
- append(satellite: Satellite)
Add a satellite to the list.
- Parameters:
satellite – Satellite to add.
- extend(satellites: Self | list[Satellite])
Add multiple satellites to the list.
- Parameters:
satellites – List of satellites to add.
- index(satellite: Satellite) int
Get the index of a satellite in the list.
- Parameters:
satellite – Satellite to get the index of.
- Returns:
Index of the satellite.
- class dsns.constellation.ISLHelper
Base class for ISL (Inter-Satellite Link) helper classes.
- abstractmethod get_isls(satellites: Satellites, positions: ndarray) list[tuple[int, int]]
Compute the ISLs between all satellites in the constellation, given their positions.
- Parameters:
satellites – List of satellites in the constellation.
positions – Satellite positions (num_sats, 3).
- Returns:
List of ISLs, where each ISL is a tuple of satellite IDs.
- class dsns.constellation.MultiISLHelper(isl_helpers: list[ISLHelper])
Helper class allowing the use of multiple ISL helpers at the same time.
- get_isls(satellites: Satellites, positions: ndarray) list[tuple[int, int]]
Compute the ISLs between all satellites in the constellation, given their positions.
- Parameters:
satellites – List of satellites in the constellation.
positions – Satellite positions (num_sats, 3).
- Returns:
List of ISLs, where each ISL is a tuple of satellite IDs.
- class dsns.constellation.Constellation
Base satellite constellation class.
- name: str
- satellites: Satellites
- satellite_positions: ndarray
- isls: list[tuple[int, int]]
- orbital_center: OrbitalCenter
- is_relay: bool = False
- property num_sats: int
- abstractmethod update_positions(time: float)
Update the positions of all satellites in the constellation at a given time.
- Parameters:
time – Time in seconds since the epoch.
- update_isls()
Update the ISLs for the constellation.
- update(time: float)
Update the constellation.
- class dsns.constellation.WalkerConstellation(name: str, num_planes: int, sats_per_plane: int, inclination: float, semi_major_axis: float, eccentricity: float, ascending_node_arc: float, phase_offset: float, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, host_mass: float = 5.9722e+24, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>, right_ascending_node: float = 0.0)
Walker constellation class.
- __init__(name: str, num_planes: int, sats_per_plane: int, inclination: float, semi_major_axis: float, eccentricity: float, ascending_node_arc: float, phase_offset: float, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, host_mass: float = 5.9722e+24, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>, right_ascending_node: float = 0.0)
Initialize the Walker constellation.
- Parameters:
name – Name of the constellation.
num_planes – Number of orbital planes.
sats_per_plane – Number of satellites per orbital plane.
inclination – Orbital plane inclination (degrees).
semi_major_axis – Semi-major axis of the orbit (m).
eccentricity – Orbital eccentricity (0.0 - 1.0).
ascending_node_arc – Angle of arc along which to space ascending nodes (degrees). Setting to 360 results in a standard Walker constellation. 180 results in a “Pi” constellation like Iridium.
phase_offset – Phase offset between planes (degrees).
isl_helper – ISL helper class.
id_helper – ID helper class.
host_mass – Mass of the central body (kg).
orbital_center – Orbital center of the constellation.
right_ascending_node – Longitude of the right ascending node in the first plane (degrees).
- update_positions(time)
Update the positions of all satellites in the constellation at a given time.
- Parameters:
time – Time in seconds since the epoch.
- class dsns.constellation.FixedConstellation(name: str, satellite_positions: ~numpy.ndarray, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Constellation class for satellites with fixed positions.
- __init__(name: str, satellite_positions: ~numpy.ndarray, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Initialize the fixed constellation.
- Parameters:
name – Name of the constellation.
satellite_positions – Array of satellite positions (x/y/z (m)).
isl_helper – ISL helper class.
id_helper – ID helper class.
orbital_center – Orbital center of the constellation.
- update_positions(time)
Update the positions of all satellites in the constellation at a given time.
- Parameters:
time – Time in seconds since the epoch.
- class dsns.constellation.TLEConstellation(name: str, tles: list[tuple[str, str]], isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, epoch: ~datetime.datetime | None = None, ignore_errors: bool = False, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Constellation composed of satellites described by TLEs. The SGP4 orbital propagator is used to compute satellite positions.
- __init__(name: str, tles: list[tuple[str, str]], isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, epoch: ~datetime.datetime | None = None, ignore_errors: bool = False, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Initialize the TLE constellation.
- Parameters:
name – Name of the constellation.
tles – List of TLEs.
isl_helper – ISL helper class.
id_helper – ID helper class.
epoch – Epoch of the TLEs - the real time corresponding to simulation time 0.0.
ignore_errors – Ignore errors from the SGP4 propagator.
orbital_center – Orbital center of the constellation.
- classmethod from_url(name: str, tle_url: str, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, epoch: ~datetime.datetime | None = None, ignore_errors: bool = False, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Initialize the TLE constellation from a URL (e.g. Celestrak).
- Parameters:
name – Name of the constellation.
tle_url – URL of the TLE file.
isl_helper – ISL helper class.
id_helper – ID helper class.
epoch – Epoch of the TLEs - the real time corresponding to simulation time 0.0.
ignore_errors – Ignore errors from the SGP4 propagator.
orbital_center – Orbital center of the constellation.
- classmethod from_file(name: str, tle_file: str, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, epoch: ~datetime.datetime | None = None, ignore_errors: bool = False, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Initialize the TLE constellation from a file.
- Parameters:
name – Name of the constellation.
tle_file – Path to the TLE file.
isl_helper – ISL helper class.
id_helper – ID helper class.
epoch – Epoch of the TLEs - the real time corresponding to simulation time 0.0.
ignore_errors – Ignore errors from the SGP4 propagator.
orbital_center – Orbital center of the constellation.
- update_positions(time)
Update the positions of all satellites in the constellation at a given time.
- Parameters:
time – Time in seconds since the epoch.
- class dsns.constellation.GroundConstellation(name: str, ground_station_positions: ~numpy.ndarray, host_radius: float, rotation_period: float | None, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Constellation class for ground stations. These are simulated as satellites with a fixed position.
- __init__(name: str, ground_station_positions: ~numpy.ndarray, host_radius: float, rotation_period: float | None, isl_helper: ~dsns.constellation.ISLHelper, id_helper: ~dsns.helpers.IDHelper, orbital_center: ~dsns.constellation.OrbitalCenter = <dsns.constellation.OrbitalCenter object>)
Initialize the ground constellation.
- Parameters:
name – Name of the constellation.
ground_station_positions – Array of ground station positions (lat/lon/alt (deg, deg, m)).
host_radius – Radius of the central body (m).
rotation_period – Rotation period of the body on which the ground stations are orbiting (s).
isl_helper – ISL helper class.
id_helper – ID helper class.
orbital_center – Orbital center of the constellation.
- update_positions(time)
Update the positions of all satellites in the constellation at a given time.
- Parameters:
time – Time in seconds since the epoch.
- class dsns.constellation.WalkerISLHelper(num_planes: int, sats_per_plane: int, intra_layer_links: bool, inter_layer_links: int | None, disable_cross_seam_links: bool = False)
Walker ISL helper class.
- __init__(num_planes: int, sats_per_plane: int, intra_layer_links: bool, inter_layer_links: int | None, disable_cross_seam_links: bool = False)
Initialize the Walker ISL helper class.
- Parameters:
num_planes – Number of orbital planes.
sats_per_plane – Number of satellites per orbital plane.
intra_layer_links – Include intra-layer links (links between adjacent satellites on the same layer).
inter_layer_links – Include inter-layer links (links between adjacent satellites on adjacent layers). If None, no inter-layer links are included. Otherwise, specify the offset between layers.
disable_cross_seam_links – Disable inter-layer links between satellites on opposite sides of the seam. Only relevant for polar constellations.
- get_isls(satellites: Satellites, positions: ndarray) list[tuple[int, int]]
Compute the ISLs between all satellites in the constellation, given their positions.
- Parameters:
satellites – List of satellites in the constellation.
positions – Satellite positions (num_sats, 3).
- Returns:
List of ISLs, where each ISL is a tuple of satellite IDs.
- class dsns.constellation.FixedISLHelper(isls: list[tuple[int, int]])
ISL helper class with fixed ISLs.
- __init__(isls: list[tuple[int, int]])
Initialize the fixed ISL helper class.
- Parameters:
isls – List of ISLs.
- classmethod from_names(isls: list[tuple[str, str]], id_helper: IDHelper)
Initialize the fixed ISL helper class from a list of ISL names.
- Parameters:
isls – List of ISL names.
- get_isls(satellites: Satellites, positions: ndarray) list[tuple[int, int]]
Compute the ISLs between all satellites in the constellation, given their positions.
- Parameters:
satellites – List of satellites in the constellation.
positions – Satellite positions (num_sats, 3).
- Returns:
List of ISLs, where each ISL is a tuple of satellite IDs.
- class dsns.constellation.NullISLHelper
Null ISL helper class - no ISLs are returned.
- __init__()
Initialize the Null ISL helper class.
- get_isls(satellites: Satellites, positions: ndarray) list[tuple[int, int]]
Compute the ISLs between all satellites in the constellation, given their positions.
- Parameters:
satellites – List of satellites in the constellation.
positions – Satellite positions (num_sats, 3).
- Returns:
List of ISLs, where each ISL is a tuple of satellite IDs.
- class dsns.constellation.AdHocISLHelper(max_range: float, max_links: int | None, min_altitude: float | None)
Ad-Hoc ISL helper class. Satellites are connected to the nearest satellite(s) within a specified range.
- __init__(max_range: float, max_links: int | None, min_altitude: float | None)
Initialize the Ad-Hoc ISL helper class.
- Parameters:
max_range – Maximum range for ISLs (m).
max_links – Maximum number of links per satellite. If None, no maximum is enforced.
min_altitude – Minimum altitude for line-of-sight between satellites (m). If None, no line-of-sight checks are performed.
- get_isls(satellites: Satellites, positions: ndarray) list[tuple[int, int]]
Compute the ISLs between all satellites in the constellation, given their positions.
- Parameters:
satellites – List of satellites in the constellation.
positions – Satellite positions (num_sats, 3).
- Returns:
List of ISLs, where each ISL is a tuple of satellite IDs.