Scenarios – ephemerista.scenarios
¶
The scenarios.py module.
This module provides the Scenario class which collects all required inputs such as assets, communications channels, points and areas of interest for orbit propagation and analyses.
- pydantic model ephemerista.scenarios.Ensemble¶
The Ensemble model.
This class collects the resulting trajectories from propagating the state of all assets within a scenario.
- Fields:
-
field ephemerides:
dict
[str
,Trajectory
] = {}¶
-
field trajectories:
dict
[Annotated
[UUID
],Trajectory
] [Required]¶ Dictionary of trajectories indexed by asset IDs
- add_earth_attitude()¶
Add attitude quaternions for Earth to the ensemble.
- class ephemerista.scenarios.Rectangle(coords)¶
A rectangle type that has a simple Geo JSON interface.
Created so we don’t use the costly to create Shapely. Polygon objects that are not needed. We only need the __geo_interface__ implementation. Note that we are checking nothing here, as we expect a well-formed rectangle.
Reference https://gist.github.com/sgillies/2217756#__geo_interface
- pydantic model ephemerista.scenarios.Scenario¶
The Scenario model.
- Fields:
-
field areas_of_interest:
list
[Feature[Polygon, dict]
] = [] (alias 'areasOfInterest')¶ List of areas of interest
-
field auto_discretize:
bool
= True (alias 'autoDiscretize')¶ Whether to automatically discretize areas of interest
-
field constellations:
list
[Constellation
] = []¶ List of constellations
-
field discretization_method:
Literal
['rectangles'
,'h3'
] = 'rectangles' (alias 'discretizationMethod')¶ Method for discretizing areas of interest
-
field discretization_resolution:
int
|float
= 1 (alias 'discretizationResolution')¶ Resolution for discretization (degrees for rectangles, h3 resolution for h3)
-
field frame:
ReferenceFrame
= ReferenceFrame(abbreviation='ICRF')¶ Reference frame of the coordinate system
-
field name:
str
= 'Scenario'¶ The name of the scenario
-
field points_of_interest:
list
[Feature[Point, dict]
] = [] (alias 'pointsOfInterest')¶ List of points of interest
-
field scenario_id:
Annotated
[UUID
] [Optional] (alias 'id')¶ Scenario ID
- Constraints:
uuid_version = 4
-
field time_step:
float
= 60 (alias 'timeStep')¶ Time step in seconds
- classmethod load_from_file(path)¶
Load a scenario from a JSON file.
- Return type:
Self
- get_discretized_to_original_mapping()¶
Get mapping from discretized polygon ID to original area ID.
- Returns:
Dictionary mapping discretized polygon index to original area index
- Return type:
dict[int, int]
- get_original_to_discretized_mapping()¶
Get mapping from original area ID to list of discretized polygon IDs.
- Returns:
Dictionary mapping original area index to list of discretized polygon indices
- Return type:
dict[int, list[int]]
- propagate()¶
Propagate the state of all assets in the scenario.
- Returns:
A collection of all propagated trajectories
- Return type:
- property discretized_areas: list[Feature[Polygon, dict]]¶
Discretized areas of interest.
- Type:
list[Feature[Polygon, dict]]
- property ground_locations: list[GroundLocation]¶
All ground locations from areas of interest.
- Type:
list[GroundLocation]
- ephemerista.scenarios.polygonize_aoi(aoi_geom_dict, res, min_elevation_deg=0.0)¶
Polygonize an area of interest using h3.
- Parameters:
aoi_geom_dict (dict) – A GeoJSON-compatible dict containing a “coordinates” key, usually from a __geo_interface__
res (int) – h3 res parameter
min_elevation_deg (float) – Minimum elevation in degrees to compute the visibility between a spacecraft and the ground cells
- Return type:
list
[Feature[Polygon, dict]
]
- ephemerista.scenarios.polygonize_aoi_rectangles(aoi_geom_dict, vertex_degrees, min_elevation_deg=0.0)¶
Polygonize an area of interest using rectangles of equal lat/long degrees.
Polygons crossing the antimeridian are divided in two, so no malformed features are created.
- Parameters:
aoi_geom_dict (dict) – A GeoJSON-compatible dict containing a “coordinates” key, usually from a __geo_interface__ The AOI is the bounding box of this polygon, so the rectangles are arranged as a grid.
vertex_degrees (int | float) – Size of the latitude and longitude vertexes in degrees
min_elevation_deg (float) – Minimum elevation in degrees to compute the visibility between a spacecraft and the ground cells
- Return type:
list
[Feature[Polygon, dict]
]