opengnc.edl package
Module contents
Entry, Descent, and Landing (EDL) dynamics and utilities.
- opengnc.edl.aerocapture_guidance(state: ndarray, target_apoapsis: float, cd: float, area: float, mass: float, planet_params: dict[str, float], rho_model: Any, cl: float = 0.0) float[source]
Predictive-Corrector Aerocapture Guidance.
Determines the required bank angle to achieve a target exit apoapsis by numerically integrating internal trajectories.
- Parameters:
state (np.ndarray) – Current spacecraft state $[r, v]$.
target_apoapsis (float) – Desired apoapsis altitude after atmospheric exit (m).
cd (float) – Vehicle ballistic parameters.
area (float) – Vehicle ballistic parameters.
mass (float) – Vehicle ballistic parameters.
planet_params (Dict[str, float]) – Dictionary containing ‘mu’ and ‘r_planet’.
rho_model (Any) – Atmospheric density model.
cl (float, optional) – Lift coefficient. Defaults to 0 (ballistic).
- Returns:
Optimized bank angle (rad).
- Return type:
float
- opengnc.edl.ballistic_entry_dynamics(t: float, state: ndarray, cd: float, area: float, mass: float, mu: float = 398600000000000.0, r_planet: float = 6371000.0, rho_model: Any | None = None) ndarray[source]
Ballistic Atmospheric Entry Dynamics (3-DOF).
Calculates the ECI state derivative for a non-lifting entry vehicle subject to spherical gravity and aerodynamic drag.
- Parameters:
t (float) – Elapsed time (s).
state (np.ndarray) – ECI State vector $[x, y, z, v_x, v_y, v_z]$ (m, m/s).
cd (float) – Drag coefficient.
area (float) – Reference aerodynamic area ($m^2$).
mass (float) – Vehicle mass (kg).
mu (float, optional) – Gravitational parameter ($m^3/s^2$).
r_planet (float, optional) – Planetary reference radius (m).
rho_model (Optional[Any]) – Atmospheric density model providing get_density(r, jd).
- Returns:
State derivative $[dot{r}, dot{v}]$ (m/s, $m/s^2$).
- Return type:
np.ndarray
- opengnc.edl.calculate_g_load(acc_vec: ndarray) float[source]
Calculate instantaneous G-load.
- Parameters:
acc_vec (np.ndarray) – Net non-gravitational acceleration vector ($m/s^2$).
- Returns:
Load in Earth g-units.
- Return type:
float
- opengnc.edl.hazard_avoidance(r: ndarray, v: ndarray, hazards: list[ndarray], safety_margin: float = 50.0) ndarray[source]
Reactive Hazard Avoidance Maneuver logic.
- Parameters:
r (np.ndarray) – Current spacecraft landing state.
v (np.ndarray) – Current spacecraft landing state.
hazards (List[np.ndarray]) – Coordinates of detected obstacles.
safety_margin (float, optional) – Minimum separation distance (m).
- Returns:
Correction $Delta V$ vector (m/s).
- Return type:
np.ndarray
- opengnc.edl.lifting_entry_dynamics(t: float, state: ndarray, cl: float, cd: float, bank_angle: float, area: float, mass: float, mu: float = 398600000000000.0, r_planet: float = 6371000.0, rho_model: Any | None = None) ndarray[source]
Lifting Atmospheric Entry Dynamics with Bank Angle Modulation.
Calculates the ECI state derivative for a vehicle with non-zero Lift-over-Drag (L/D) ratios.
- Parameters:
t (float) – Elapsed time (s).
state (np.ndarray) – ECI State vector (m, m/s).
cl (float) – Lift and Drag coefficients.
cd (float) – Lift and Drag coefficients.
bank_angle (float) – Rotation of the lift vector about the velocity vector (rad).
area (float) – Reference area ($m^2$).
mass (float) – Mass (kg).
mu (float) – Planetary parameters.
r_planet (float) – Planetary parameters.
rho_model (Optional[Any]) – Density model.
- Returns:
State derivative.
- Return type:
np.ndarray
- opengnc.edl.sutton_grave_heating(rho: float, v: float, rn: float) float[source]
Stagnation Point Heat Flux via Sutton-Grave Correlation.
Estimates the convective heat transfer at the vehicle nose during hypersonic atmospheric entry. Equation: $dot{q} = k sqrt{rho / r_n} v^3$.
- Parameters:
rho (float) – Atmospheric density ($kg/m^3$).
v (float) – Relative velocity (m/s).
rn (float) – Nose/Stagnation region radius (m).
- Returns:
Stagnation heat flux ($W/m^2$).
- Return type:
float