astro.Logger#

class hohmannpy.astro.Logger#

A logger is used to store data regarding a Orbit generated on each timestep by Propagator . 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:

  1. Allocate space using numpy.zeros() where the data is stored column-wise with N + 2M columns where N = the number of timesteps stored in the Propagator’s timestep attribute and M is the number of burns scheduled for the Satellite whose data is being logged.

  2. 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_anomaly for KeplerPropagator, have been set. This is typically towards the start of a propagators’ propagate() method. This is why setup() is separated from __init__().