Trajectories – ephemerista.coords.trajectories¶
The trajectories.py module.
This module provides the Trajectory class.
- class ephemerista.coords.trajectories.Event(*, time, crossing)¶
The Event class.
- 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.coords.trajectories.Trajectory(trajectory=None, *, type='spacecraft', startTime, origin=Origin(name='Earth'), frame=ReferenceFrame(abbreviation='ICRF'), states, attitude=None, name=None)¶
Generic trajectory model.
- property datetimes: list[datetime]¶
Return the time steps of the trajectory as a list of datetime.datetime objects.
- find_events(func)¶
Find events along the trajectory.
This method will find all zero-crossings of the provided callback function.
- Return type:
list[Event]
- 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
- interpolate(time)¶
Interpolates the state of the trajectory at a given time.
- interpolate_batch(times)¶
Interpolates the state of the trajectory at multiple times.
- 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].
- plot_3d()¶
Plot a 3D representation of the trajectory.
- Return type:
Scatter3d
- property simulation_time: list[float]¶
Array of simulation time steps.
- 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: