|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| Dict[str, Any] | run_layer4_flight_simulation (PintleEngineConfig optimized_config, Dict[str, np.ndarray] pressure_curves, np.ndarray time_array, np.ndarray P_tank_O_array, np.ndarray P_tank_F_array, float target_burn_time, float target_apogee, float apogee_tol, Callable update_progress, Callable log_status, Callable run_flight_simulation_func) |
Layer 4: Flight Simulation and Validation Run flight simulation to validate trajectory performance and adjust tank fills (propellant masses) to hit apogee targets. This layer: 1. Starts from the current optimized engine configuration (Layers 1–3) 2. Runs flight simulation with **full** pressure curves 3. Lets `flight_sim.py` handle truncation when tanks run out 4. Iteratively reduces propellant masses if apogee is too high 5. Accepts the best match if apogee is below target and masses cannot be increased beyond their initial values We optimize tank fills, not burn time. Burn time naturally follows from propellant mass and the thrust / mdot curves.
| Dict[str, Any] engine.optimizer.layers.layer4_flight_simulation.run_layer4_flight_simulation | ( | PintleEngineConfig | optimized_config, |
| Dict[str, np.ndarray] | pressure_curves, | ||
| np.ndarray | time_array, | ||
| np.ndarray | P_tank_O_array, | ||
| np.ndarray | P_tank_F_array, | ||
| float | target_burn_time, | ||
| float | target_apogee, | ||
| float | apogee_tol, | ||
| Callable | update_progress, | ||
| Callable | log_status, | ||
| Callable | run_flight_simulation_func ) |
Run Layer 4: Flight Simulation with tank-fill iteration. We: - Keep the full time history of thrust / mdot curves - Let the flight sim detect when tanks run out and truncate internally - Iteratively reduce LOX/fuel masses if apogee is too high
Definition at line 29 of file layer4_flight_simulation.py.