utils package
Submodules
utils.astropy_util module
- utils.astropy_util.get_body_position(time: int, body: utils.constants.BodyEnum) Tuple[float, float, float]
Gets position vector of [body] based on [time]
- Parameters
time (float) – the current time being queried
body (BodyEnum) – body (earth, moon, sun)
- Returns
position vector of the specified body
- Return type
Tuple[float, float, float]
utils.constants module
- class utils.constants.BodyEnum(value)
Bases:
enum.IntEnumAn enumeration.
- Earth = 0
- Moon = 1
- Sun = 2
- class utils.constants.ModelEnum(value)
Bases:
utils.constants.StringEnumAn enumeration.
- AttitudeModel = 'att'
- GyroModel = 'gyro'
- PositionModel = 'pos'
- UnittestModel = 'unittest'
- class utils.constants.StringEnum(value)
Bases:
str,enum.EnumSimilar to the built-in IntEnum, but with strings! See https://docs.python.org/3/library/enum.html#others for inspiration.
utils.data_handling module
- utils.data_handling.df_to_csv(dataframe: pandas.core.frame.DataFrame, path: Optional[Union[str, pathlib.Path]] = None)
Creates and writes the data in [dataframe] into a csv file at [path]
- Parameters
dataframe (pd.DataFrame) – Pandas DataFrame containing state data
path (Optional[Union[str, Path]]) – path of the CSV to write the state data to
- utils.data_handling.states_to_df(states: List[core.state.statetime.PropagatedOutput]) pandas.core.frame.DataFrame
Converts [states] to a DataFrame to use for plotting
- Parameters
states (List[PropagatedOutput]) – the current state
- Returns
a Pandas DataFrame containing the states’ data
- Return type
pd.DataFrame