astro.Logger#
- class hohmannpy.astro.Logger#
A logger is used to store data regarding a
Orbitgenerated on each timestep byPropagator.propagate().- abstractmethod concatenate()#
Takes the M history array attributes, each of length N timesteps, concatenates them into a (N, M) array, and then transposes and returns it.
- abstractmethod log(current_orbit)#
Fills in the next empty column of each history array with the orbit’s current values for each data.
- Parameters:
current_orbit (
Orbit) – The orbit which holds the data to log.
- abstractmethod setup(initial_orbit, timesteps, burns)#
Sets up a logger.
All child classes must implement this method with the following steps:
Allocate space using
numpy.zeros()where the data is stored column-wise with N + 2M columns where N = the number of timesteps stored in thePropagator’stimestepattribute and M is the number of burns scheduled for theSatellitewhose data is being logged.Fill in the 0th column of each array with the orbit’s initial values for the stored data.
- Parameters:
initial_orbit (
Orbit) – The orbit which holds the data to log.timesteps (int) – How many timesteps to log the data for.
burns (int) – How many burns to log data for. Two points are logged for each burn. For impulsive burns this is the immediately before and after the impulse (two data points on the same timestep). For continuous.rst burns this is the start and end times of the burn. These additional points are included for precision purposes.
Notes
Can’t call this till after the initial values of propagator-unique attributes, such as
eccentric_anomalyforKeplerPropagator, have been set. This is typically towards the start of a propagators’propagate()method. This is whysetup()is separated from__init__().