Trajectories – ephemerista.coords.trajectories¶
The trajectories.py module.
This module provides the Trajectory class.
- pydantic model ephemerista.coords.trajectories.Event¶
The Event class.
-
field crossing:
Literal['up','down'] [Required]¶
-
field crossing:
- pydantic model ephemerista.coords.trajectories.Trajectory¶
Generic trajectory model.
- Fields:
-
field attitude:
list[tuple[float,float,float,float]] |None= None¶
-
field frame:
ReferenceFrame= ReferenceFrame(abbreviation='ICRF')¶ Reference frame of the coordinate system
-
field name:
str|None= None¶ Name of the asset
-
field states:
Annotated[ndarray[tuple[int,...],dtype[float64]]] [Required]¶ - Constraints:
dimensions = 2
data_type = <class ‘numpy.float64’>
strict_data_typing = True
serialize_numpy_array_to_json = <function pd_np_native_numpy_array_to_data_dict_serializer at 0x7c43c9bb6ca0>
json_schema_from_type_data = <function pd_np_native_numpy_array_json_schema_from_type_data at 0x7c43c9bb6a20>
__module__ = pydantic_numpy.helper.annotation
-
field trajectory_type:
Literal['spacecraft','groundstation','ephemeris'] = 'spacecraft' (alias 'type')¶
- classmethod from_csv(path, scale='TAI', frame=ReferenceFrame(abbreviation='ICRF'), origin=Origin(name='Earth'), **kwargs)¶
Read a trajectory from a CSV file.
- Return type:
Self
- find_events(func)¶
Find events along the trajectory.
This method will find all zero-crossings of the provided callback function.
- Return type:
list[Event]
- interpolate(time)¶
Interpolates the state of the trajectory at a given time.
- interpolate_batch(times)¶
Interpolates the state of the trajectory at multiple times.
- plot_3d()¶
Plot a 3D representation of the trajectory.
- Return type:
Scatter3d
- to_csv(path, **kwargs)¶
Write the trajectory to a CSV file.
- to_frame(frame)¶
Rotate all states of the trajectory to a different reference frame.
- Return type:
- to_origin(origin)¶
Translate all states of the trajectory to a different coordinate origin.
- Return type:
- property datetimes: list[datetime]¶
Return the time steps of the trajectory as a list of datetime.datetime objects.
- property simulation_time: list[float]¶
Array of simulation time steps.