latom.analyzer.analyzer

@authors: Alberto FOSSA’ Giuliana Elena MICELI

Functions

save(obj, filename)

Save an object.

time()

Return the current time in seconds since the Epoch.

Classes

Analyzer(body, sc)

Analyzer class defines the methods to analyze the results of a simulation.

class latom.analyzer.analyzer.Analyzer(body, sc)[source]

Bases: object

Analyzer class defines the methods to analyze the results of a simulation.

Parameters
  • body (Primary) – Instance of Primary class describing the central attracting body

  • sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics

Variables
  • body (Primary) – Instance of Primary class describing the central attracting body

  • sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics

  • phase_name (str) – Describes the phase name in case of multi-phase trajectories

  • nlp (NLP) – Instance of NLP object describing the type of Non Linear Problem solver used

  • tof (float) – Value of the time of flight resulting by the simulation [s]

  • tof_exp (float) – Value of the time of flight of the explicit simulation [s]

  • err (float) – Value of the error between the optimized simulation results and the explicit simulation results

  • rm_res (float) – Value of the central body radius [- or m]

run_driver()[source]

Runs the optimization.

Returns

failed – Returns the result of the optimization 0 or 1

Return type

int

get_time_series(p, scaled=False)[source]

Access the time series of the simulation.

Parameters
  • p (Problem) – Instance of Problem class

  • scaled (bool) – Scales the simulation results

get_solution_dictionary(p, scaled=False)[source]
Parameters
  • p (Problem) – Instance of Problem class

  • scaled (bool) – Scales the simulation results

Returns

sol – Dictionary containing the NLP solution

Return type

dict

get_solutions(explicit=True, scaled=False)[source]

Access the simulation solution.

Parameters
  • explicit (bool) – Computes also the explicit simulation. Default is True

  • scaled (bool) – Scales the simulation results. Default is False

save(rec_file)[source]

Pickle the whole Analyzer class.

Parameters

rec_file (str) – Directory path to the file where the Analyzer is serialized