Analyzers Subpackage¶
Inheritance Diagram¶

Modules List¶
@authors: Alberto FOSSA’ Giuliana Elena MICELI |
|
@authors: Alberto FOSSA’ Giuliana Elena MICELI |
|
@authors: Alberto FOSSA’ Giuliana Elena MICELI |
Documentation¶
@authors: Alberto FOSSA’ Giuliana Elena MICELI
-
class
latom.analyzer.analyzer.Analyzer(body, sc)[source] Bases:
objectAnalyzer 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
0or1- 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
Truescaled (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
@authors: Alberto FOSSA’ Giuliana Elena MICELI
-
class
latom.analyzer.analyzer_2d.TwoDimAnalyzer(body, sc)[source] Bases:
latom.analyzer.analyzer.AnalyzerTwoDimAnalyzer class defines the methods to analyze the results of a two dimensional 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
-
get_time_series_phase(p, phase_name, scaled=False)[source] Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_discretization_phase(p, phase_name, scaled=False)[source] Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of the simulation.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimSinglePhaseAnalyzer(body, sc, alt)[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAnalyzerTwoDimSinglePhaseAnalyzer class defines the methods to analyze the results of a two dimensional single phase simulation.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
get_time_series(p, scaled=False)[source] Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscAnalyzer(body, sc, alt)[source] Bases:
latom.analyzer.analyzer_2d.TwoDimSinglePhaseAnalyzerTwoDimAscAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscConstAnalyzer(body, sc, alt, theta, tof, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='lower')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAscAnalyzerTwoDimAscConstAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at constant thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default islower
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscVarAnalyzer(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='lower')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAscAnalyzerTwoDimAscVarAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at variable thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default islower
- 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) –
of NLP object describing the type of Non Linear Problem solver used (Instance) –
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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimAscVToffAnalyzer(body, sc, alt, alt_safe, slope, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='lower')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAscVarAnalyzerTwoDimAscVToffAnalyzer class defines the methods to analyze the results of a two dimensional ascent simulation from the Moon surface to a given Low Lunar Orbit performed at variable thrust with vertical take-off.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_safe (float) – Value of the minimun safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [-]
t_bounds (float) – Value for the time of flight bounds [s]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default islower
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
alt_safe (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
r_safe (float) – Value of the minimum orbit radius to be compliant with the constraints [m]
-
get_solutions(explicit=True, scaled=False)[source] Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescAnalyzer(body, sc, alt)[source] Bases:
latom.analyzer.analyzer_2d.TwoDimSinglePhaseAnalyzerTwoDimDescAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
- 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]
= ndarray (states_scalers) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescConstAnalyzer(body, sc, alt, alt_p, theta, tof, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='upper')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimDescAnalyzerTwoDimDescConstAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at constant thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_p (float) – Value of the orbit periselene altitude [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default isupper
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
alt_p (float) – Value of the final orbit altitude [m]
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescVarAnalyzer(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='upper')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimDescAnalyzerTwoDimDescVarAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at variable thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default isupper
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescVLandAnalyzer(body, sc, alt, alt_safe, slope, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='upper')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimDescVarAnalyzerTwoDimDescVarAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface performed at variable thrust with vertical landing.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_safe (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default isupper
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
alt_safe (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
slope (float) – Value of the slope of the constraint on minimum safe altitude [-]
r_safe (float) – Value of the minimum orbit radius to be compliant with the constraints [m]
-
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
- Returns
tof (float) – Time of flight resulting from the optimized simulation [s]
t (ndarray) – Time of flight time series for the optimized simulation [s]
states (ndarray) – States time series for the optimized simulation
controls (ndarray) – Controls time series for the optimized simulation
-
get_solutions(explicit=True, scaled=False)[source] Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_2d.TwoDimDescTwoPhasesAnalyzer(body, sc, alt, alt_p, alt_switch, theta, tof, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, fix='alt')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAnalyzerTwoDimDescTwoPhasesAnalyzer class defines the methods to analyze the results of a two dimensional descent simulation from a given Low Lunar Orbit to the Moon surface composed by two subsequent phases.
Firstly, the spacecraft is injected in a ballistic arc (Hohmann transfer) to move from the initial Low Lunar Orbit to a lower altitude. Starting from the periselene of the Hohmann transfer, the spacecraft performs a powered descent at constant thrust and free attitude (first phase) until the final vertical descent (second phase) is triggered at a given altitude or time-to-go.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
alt_switch (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
theta (float) – Value for the guessed angle spawn during the trajectory [rad]
tof (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falsefix (str) – Chooses to switch from the optimized phase to the vertical one at a specific altitude or time. Can be
altortime. Default isalt
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
alt_p (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
alt_switch (float) – Value of the minimum safe altitude to avoid geographical constraints [m]
ht (Guess_2d) – Instance of Guess_2d class to define an Hohmann transfer trajectory
deorbit_burn (Guess_2d) – Instance of Guess_2d class to define an an impulsive burn
-
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
- Returns
tof (float) – Time of flight resulting from the optimized simulation [s]
t (ndarray) – Time of flight time series for the optimized simulation [s]
states (ndarray) – States time series for the optimized simulation
controls (ndarray) – Controls time series for the optimized simulation
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
@authors: Alberto FOSSA’ Giuliana Elena MICELI
-
class
latom.analyzer.analyzer_heo_2d.TwoDimLLO2HEOAnalyzer(body, sc, alt, rp, t, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False, u_bound='lower')[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAscAnalyzerTwoDimLLO2HEOAnalyzer class defines the methods to analyze the results of a two dimensional simulation from a Low Lunar Orbit to an Highly Elliptical Orbit.
The Highly Elliptical Orbit is chosen as first planar approximation of a three-dimensional Near Rectilinear Halo Orbit. The transfer is modelled as a single phase trajectory performed at variable thrust.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics alt : float
alt (float) – Value of the initial LLO altitude [m]
rp (float) – Value for the target HEO periselene radius [m]
t (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
Falseu_bound (str) – Sets the bound of the radial velocity. Can be
lower,upperorNone. Default islower
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time. The semi-major axis and the eccentricity of the HEO are also displayed.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_heo_2d.TwoDimLLO2ApoAnalyzer(body, sc, alt, rp, t, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False)[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAscAnalyzerTwoDimLLO2HEOAnalyzer class defines the methods to analyze the results of a two dimensional simulation from a Low Lunar Orbit to an Highly Elliptical Orbit.
The Highly Elliptical Orbit is chosen as first planar approximation of a three-dimensional Near Rectilinear Halo Orbit. The optimal control problem is solved for a single phase trajectory performed at constant thrust that injects the spacecraft from the Low Lunar Orbit to an intermediate transfer trajectory whose aposelene radius coincides with the one of the target Highly Elliptical Orbit. The final insertion manoeuvre is then modelled as an ideal impulsive burn due to its limited dV magnitude.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
rp (float) – Value for the target HEO periselene radius [m]
t (float) – Value for the target HEO period [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
False
- 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]
= ndarray (states_scalers) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
transfer (HohmannTransfer) – Instance of HohmannTransfer computing the keplerian parameters of the transfer orbit
insertion_burn (ImpulsiveBurn) – Instance of ImpulsiveBurn defining the delta v required for an impulsive burn
dv_dep (float) – Delta v required for a manoeuvre [m/s]
-
compute_solution(nb=200)[source] Retrieves the optimization results and computes the spacecraft states along the ballistic arc as well as the final insertion burn.
- Parameters
nb (int, optional) – Number of points in which the spacecraft states along the ballistic arc are computed. Default is
200
-
get_solutions(explicit=True, scaled=False, nb=200)[source] Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
Falsenb (int) – Number of points where the coasting arch is computed
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time. The semi-major axis and the eccentricity of the HEO are also displayed.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_heo_2d.TwoDimLLO2ApoContinuationAnalyzer(body, sc, alt, rp, t, t_bounds, twr_list, method, nb_seg, order, solver, snopt_opts=None, check_partials=False, log_scale=False, significant_figures=4)[source] Bases:
latom.analyzer.analyzer_heo_2d.TwoDimLLO2ApoAnalyzerTwoDimLLO2ApoContinuationAnalyzer class defines the methods to analyze the results of a two dimensional simulation from a Low Lunar Orbit to an Highly Elliptical Orbit using a continuation method over several thrust/weight ratios.
The Highly Elliptical Orbit is chosen as first planar approximation of a three-dimensional Near Rectilinear Halo Orbit. The optimal control problem is solved for a single phase trajectory performed at constant thrust that injects the spacecraft from the Low Lunar Orbit to an intermediate transfer trajectory whose aposelene radius coincides with the one of the target Highly Elliptical Orbit. The final insertion manoeuvre is then modelled as an ideal impulsive burn due to its limited dV magnitude.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics
alt (float) – Value of the final orbit altitude [m]
rp (float) – Value for the target HEO periselene radius [m]
t (float) – Value for the target HEO period [s]
t_bounds (float) – Value for the time of flight bounds [-]
twr_list (iterable) – List of thrust/weight ratios over which the continuation of the solutions is performed [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict, optional) – Sets some SNOPT’s options. Default is
Nonecheck_partials (bool, optional) – Checking of partial derivatives. Default is
Falselog_scale (bool, optional) –
Trueif twr_list is provided in logarithmic scale,Falseotherwise. Default isFalsesignificant_figures (int, optional) – Significant figures to be considered while casting the list of thrust/weight ratios. Default is
4
- 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
alt (float) – Value of the final orbit altitude [m]
phase_name – Name assigned to the problem phase
transfer (HohmannTransfer) – Instance of HohmannTransfer computing the keplerian parameters of the transfer orbit
insertion_burn (ImpulsiveBurn) – Instance of ImpulsiveBurn defining the delta v required for an impulsive burn
dv_dep (float) – Delta v required for a manoeuvre [m/s]
twr_list (ndarray) – List of thrust/weight ratios over which the continuation is performed [-]
m_prop_list (ndarray) – List of propellant masses corresponding to twr_list [kg]
energy_list (ndarray) – List of specific energies of the spacecraft along the ballistic arc corresponding to twr_list [m^2/s^2]
sol_list (dict) – Dictionary of optimal solutions corresponding to twr_list
-
compute_energy_mprop(r, u, v, m_coast)[source] Computes the specific energy of the spacecraft on the ballistic arc and the total propellant mass including the final insertion burn.
- Parameters
r (float) – Radius at the end of the first powered phase [m]
u (float) – Radial velocity at the end of the first powered phase [m/s]
v (float) – Tangential velocity at the end of the first powered phase [m/s]
m_coast (float) – Spacecraft mass on the ballistic arc [kg]
- Returns
en (float) – Specific energy of the spacecraft on the ballistic arc [m/s]
m_prop (float) – Total propellant mass including the final insertion burn [kg]
-
run_continuation(rec_file=None)[source] Iterative solution of all optimal control problems corresponding to the different thrust/weight ratios in twr_list using a continuation method in which the solution of the problem
iis set as initial guess for the problemi + 1. The first solution is computed using the initial guess provided by TwoDimLLO2HEOGuess class.- Parameters
rec_file (str or None, optional) – Directory path for the file in which the thrust/weight ratios, propellant masses, specific energies and solutions are recorded or
None. Default isNone
-
plot(labels=None)[source] Plots the propellant fraction and spacecraft energy wrt thrust/weight ratio, the initial powered phases for different thrust/weight ratios and the last solution (smallest thrust/weight ratio) as for TwoDimLLO2ApoAnalyzer.
- Parameters
labels (iterable or None, optional) – List of labels for the different trajectories displayed by TwoDimTrajectoryContinuation class or
None. Default isNone
-
compute_solution(nb=200) Retrieves the optimization results and computes the spacecraft states along the ballistic arc as well as the final insertion burn.
- Parameters
nb (int, optional) – Number of points in which the spacecraft states along the ballistic arc are computed. Default is
200
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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, nb=200) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
Falsenb (int) – Number of points where the coasting arch is computed
-
get_time_series(p, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_heo_2d.TwoDimMultiPhasesLLO2HEOAnalyzer(body, sc)[source] Bases:
latom.analyzer.analyzer_2d.TwoDimAnalyzerAnalyzer class defines the methods to analyze the results of a two dimensional multi phases LLO to HEO 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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
transfer (HohmannTransfer) – Instance of HohmannTransfer computing the keplerian parameters of the transfer orbit
dv (float) – Delta v required for a manoeuvre [m/s]
-
plot()[source] Plots the states and controls resulting from the simulation and the ones from the explicit computation in time. The semi-major axis and the eccentricity of the HEO are also displayed.
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - 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) Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False
-
get_time_series(p, scaled=False) Access the time series of the simulation.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
class
latom.analyzer.analyzer_heo_2d.TwoDim3PhasesLLO2HEOAnalyzer(body, sc, alt, rp, t, t_bounds, method, nb_seg, order, solver, snopt_opts=None, rec_file=None, check_partials=False)[source] Bases:
latom.analyzer.analyzer_heo_2d.TwoDimMultiPhasesLLO2HEOAnalyzerAnalyzer class defines the methods to analyze the results of a two dimensional 3 phases LLO to HEO simulation.
It gives the results of an optimal trajectory from a Low Lunar Orbit of chosen altitude to an High Elliptical Orbit which can represent a transposition of an Halo orbit in 2D. The trajectory is modeled as the succession of three different phases: a first powered phase for departure, a coasting arch and a final powered phase for the injection.
- Parameters
body (Primary) – Instance of Primary class describing the central attracting body
sc (Spacecraft) – Instance of Spacecraft class describing the spacecraft characteristics alt : float
alt (float) – Value of the initial LLO altitude [m]
rp (float) – Value for the target HEO periselene radius [m]
t (float) – Value for the guessed trajectory time of flight [s]
t_bounds (float) – Value for the time of flight bounds [-]
method (str) – NLP transcription method
nb_seg (int) – Number of segments for the transcription
order (int) – Transcription order
solver (str) – NLP solver
snopt_opts (dict) – Sets some SNOPT’s options. Default is
Nonerec_file (str) – Directory path for the solution recording file. Default is
Nonecheck_partials (bool) – Checking of partial derivatives. Default is
False
- 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. Can be
dep,coastorarr.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]
states_scalers (ndarray) – Reference values of the states with which perform the scaling
controls_scalers (ndarray) – Reference values of the controls with which perform the scaling
-
get_discretization_phase(p, phase_name, scaled=False) Access the time of flight, the states on the states discretization nodes and the controls on the control discretization nodes for a given Problem and Phase.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
states (ndarray) – States values on the state discretization nodes for the optimized simulation phase
controls (ndarray) – Controls values on the controls discretization nodes for the optimized simulation phase
-
get_solution_dictionary(p, scaled=False) - Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
sol – Dictionary containing the NLP solution
- Return type
dict
-
get_time_series(p, scaled=False)[source] Access the time series of the problem.
- Parameters
p (Problem) – Instance of Problem class
scaled (bool) – Scales the simulation results
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
get_time_series_phase(p, phase_name, scaled=False) Access the time series of one of the problem phases.
- Parameters
p (Problem) – Instance of Problem class
phase_name (str) – Name defined for the problem phase
scaled (bool, optional) – If
Truescales the simulation results. Default isFalse
- Returns
tof (float) – Time of flight resulting from the optimized simulation phase [-] or [s]
t (ndarray) – Time of flight time series for the optimized simulation phase [-] or [s]
states (ndarray) – States time series for the optimized simulation phase
controls (ndarray) – Controls time series for the optimized simulation phase
-
plot() Plots the states and controls resulting from the simulation and the ones from the explicit computation in time. The semi-major axis and the eccentricity of the HEO are also displayed.
-
run_driver() Runs the optimization.
- Returns
failed – Returns the result of the optimization
0or1- Return type
int
-
save(rec_file) Pickle the whole Analyzer class.
- Parameters
rec_file (str) – Directory path to the file where the Analyzer is serialized
-
get_solutions(explicit=True, scaled=False)[source] Access the simulation solution.
- Parameters
explicit (bool) – Computes also the explicit simulation. Default is
Truescaled (bool) – Scales the simulation results. Default is
False