Trajectories – ephemerista.coords.trajectories

The trajectories.py module.

This module provides the Trajectory class.

pydantic model ephemerista.coords.trajectories.Event

The Event class.

Fields:
field crossing: Literal['up', 'down'] [Required]
field time: Time [Required]
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 origin: Origin = Origin(name='Earth')

Origin of the coordinate system

field start_time: Time [Required] (alias 'startTime')
field states: Annotated[Union[ndarray[tuple[int, int], dtype[float64]], Annotated[Path], MultiArrayNumpyFile]] [Required]
Constraints:
  • dimensions = 2

  • data_type = <class ‘numpy.float64’>

  • strict_data_typing = False

  • serialize_numpy_array_to_json = <function pd_np_native_numpy_array_to_data_dict_serializer at 0x7945b2f7e520>

  • json_schema_from_type_data = <function pd_np_native_numpy_array_json_schema_from_type_data at 0x7945b2f7e840>

  • __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.

Parameters:

time (Time) – Time at which to interpolate the state

Returns:

Interpolated state of the trajectory

Return type:

Cartesian

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:

Trajectory

to_origin(origin)

Translate all states of the trajectory to a different coordinate origin.

Return type:

Trajectory

property cartesian_states: list[Cartesian]

List of states in the trajectory.

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.

property times: list[Time]

List of times in the trajectory.