latom.plots.trajectories¶
@authors: Alberto FOSSA’ Giuliana Elena MICELI
Classes
|
Plot the two-dimensional simulation’s altitude profile over spawn angle. |
|
Plots the two-dimensional trajectories from a Low Lunar Orbit to a Near rectilinear Halo Orbit. |
|
Plots the two-dimensional trajectories from the Moon surface to a Low Lunar Orbit and vice versa. |
|
Plots the two-dimensional trajectories in the xy plane. |
-
class
latom.plots.trajectories.TwoDimAltProfile(r, states, states_exp=None, thrust=None, threshold=1e-06, r_safe=None, labels=('powered', 'coast'))[source]¶ Bases:
objectPlot the two-dimensional simulation’s altitude profile over spawn angle.
- Parameters
r (float) – Equatorial radius of central attracting body [m] or [-]
states (ndarray) – States time series for implicit NLP solution as [r, theta, u, v, m]
states_exp (ndarray or
None, optional) – States time series for explicit simulation as [r, theta, u, v, m] orNone. Default isNonethrust (ndarray or
None, optional) – Thrust magnitude time series orNone. Default isNonethreshold (float or
None, optional) – Threshold value to determine the on/off control structure orNone. Default is1e-6r_safe (ndarray or
None, optional) – Time series for minimum safe altitude [m] or [-] orNone. Default isNonelabels (iterable, optional) – Labels for the different phases. Default is (‘powered’, ‘coast’)
- Variables
R (float) – Equatorial radius of central attracting body [m] or [-]
scaler (float) – Value to scale the distances
units (str) – Measurement unit for distances
r (ndarray) – Position time series for implicit NLP solution [m] or [-]
theta (ndarray) – Angle time series for implicit NLP solution [rad]
r_pow (ndarray) – Position time series for implicit NLP solution corresponding to powered phases [m] or [-]
theta_pow (ndarray) – Angle time series for implicit NLP solution corresponding to powered phases [m] or [-]
r_coast (ndarray) – Position time series for implicit NLP solution corresponding to coasting phases [m] or [-]
theta_coast (ndarray) – Angle time series for implicit NLP solution corresponding to coasting phases [m] or [-]
r_exp (ndarray) – Position time series for explicit simulation [m] or [-]
theta_exp (ndarray) – Angle time series for explicit simulation [m] or [-]
r_safe (ndarray or
None) – Time series for minimum safe altitude [m] or [-] orNonelabels (iterable, optional) – Labels for the different phases
-
class
latom.plots.trajectories.TwoDimTrajectory(r_moon, r_llo, states, kind='ascent', nb=2000)[source]¶ Bases:
objectPlots the two-dimensional trajectories in the xy plane.
- Parameters
r_moon (float) – Moon radius [m] or [-]
r_llo (float) – Initial Low Lunar Orbit radius [m] o [-]
states (dict) – Dictionary that maps states values obtained from the simulation
kind (str, optional) – Defines the kind of trajectory. It can be ‘ascent’ or ‘descent’. Default is ascent
nb (float, optional) – Number of points in which the Moon surface and the initial orbits are discretized. Default is
2000
- Variables
scaler (float) – scaler for lengths
units (str) – Unit of measurement for lengths
x_moon (ndarray) – x coordinates for the Moon surface [km] or [-]
y_moon (ndarray) – y coordinates for the Moon surface [km] or [-]
x_llo (ndarray) – x coordinates for the initial orbit [km] or [-]
y_llo (ndarray) – y coordinates for the initial orbit [km] or [-]
x (dict) – x coordinates for the ascent trajectories [km] or [-]
y (dict) – y coordinates for the ascent trajectories [km] or [-]
kind (str) – Defines the kind of trajectory. It can be ‘ascent’ or ‘descent’
-
static
get_scalers(r)[source]¶ Defines the scaling parameter for lengths and corresponding measurement unit.
- Parameters
r (float) – Moon radius in dimensional or non-dimensional units [m] or [-]
- Returns
scaler (float) – Scaler value [-]
units (str) – Measurement unit
-
static
polar2cartesian(r, scaler=1.0, **kwargs)[source]¶ Transforms the polar coordinates into cartesian coordinates.
- Parameters
r (ndarray) – Position series [km] or [-]
scaler (float) – Scaler value [-]
- Other Parameters
nb (int) – Number of equally spaced points between
0and2*piin which the x and y coordinates are computedangle (ndarray) – Angles for which the x and y coordinates are computed
- Returns
x (ndarray) – X coordinates series [km] or [-]
y (ndarray) – X coordinates series [km] or [-]
-
class
latom.plots.trajectories.TwoDimSurface2LLO(r_moon, states, kind='ascent', nb=2000)[source]¶ Bases:
latom.plots.trajectories.TwoDimTrajectoryPlots the two-dimensional trajectories from the Moon surface to a Low Lunar Orbit and vice versa.
- Parameters
r_moon (float) – Moon radius [m] or [-]
states (dict) – Dictionary that maps states values obtained from the simulation
kind (str, optional) – Defines the kind of trajectory. It can be ‘ascent’ or ‘descent’. Default is ascent
nb (float, optional) – Number of points in which the Moon surface and the initial orbits are discretized. Default is
2000
-
static
get_scalers(r)¶ Defines the scaling parameter for lengths and corresponding measurement unit.
- Parameters
r (float) – Moon radius in dimensional or non-dimensional units [m] or [-]
- Returns
scaler (float) – Scaler value [-]
units (str) – Measurement unit
-
plot()¶ Plots the two-dimensional trajectories in the xy plane.
-
static
polar2cartesian(r, scaler=1.0, **kwargs)¶ Transforms the polar coordinates into cartesian coordinates.
- Parameters
r (ndarray) – Position series [km] or [-]
scaler (float) – Scaler value [-]
- Other Parameters
nb (int) – Number of equally spaced points between
0and2*piin which the x and y coordinates are computedangle (ndarray) – Angles for which the x and y coordinates are computed
- Returns
x (ndarray) – X coordinates series [km] or [-]
y (ndarray) – X coordinates series [km] or [-]
-
static
set_axes_decorators(ax, title, units)¶ Sets the plot axes decorators.
- Parameters
ax (Axes) – Instance of Axes class
title (str) – Title of the plot
units (str) – Measurement units
-
class
latom.plots.trajectories.TwoDimLLO2NRHO(r_moon, a_nrho, e_nrho, states, kind='ascent', nb=2000)[source]¶ Bases:
latom.plots.trajectories.TwoDimTrajectoryPlots the two-dimensional trajectories from a Low Lunar Orbit to a Near rectilinear Halo Orbit.
- Parameters
r_moon (float) – Moon radius [m] or [-]
a_nrho (float) – Semi-major axis of the NRHO [m] or [-]
e_nrho (float) – Eccentricity of the NRHO [-]
states (dict) – Dictionary that maps states values obtained from the simulation
kind (str, optional) – Defines the kind of trajectory. It can be ‘ascent’ or ‘descent’. Default is ascent
nb (float, optional) – Number of points in which the Moon surface and the initial orbits are discretized. Default is
2000
- Variables
x_nrho (ndarray) – X coordinate series for the NRHO [km] or [-]
y_nrho (ndarray) – Y coordinate series for the NRHO [km] or [-]
-
static
get_scalers(r)¶ Defines the scaling parameter for lengths and corresponding measurement unit.
- Parameters
r (float) – Moon radius in dimensional or non-dimensional units [m] or [-]
- Returns
scaler (float) – Scaler value [-]
units (str) – Measurement unit
-
plot()¶ Plots the two-dimensional trajectories in the xy plane.
-
static
polar2cartesian(r, scaler=1.0, **kwargs)¶ Transforms the polar coordinates into cartesian coordinates.
- Parameters
r (ndarray) – Position series [km] or [-]
scaler (float) – Scaler value [-]
- Other Parameters
nb (int) – Number of equally spaced points between
0and2*piin which the x and y coordinates are computedangle (ndarray) – Angles for which the x and y coordinates are computed
- Returns
x (ndarray) – X coordinates series [km] or [-]
y (ndarray) – X coordinates series [km] or [-]
-
static
set_axes_decorators(ax, title, units)¶ Sets the plot axes decorators.
- Parameters
ax (Axes) – Instance of Axes class
title (str) – Title of the plot
units (str) – Measurement units