|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Variables | |
| float | G0 = 9.80665 |
| float | PSI = 6894.757293168 |
| str | LE4 = Path(__file__).resolve().parents[1] / "configs" / "ethalox_6800N.yaml" |
| float | SITE_PA = 94069.72225005485 |
| list | LE4_SCHEDULE |
Layer X flight: the drawing's pressurant flies, the coast carries no thrust, a held vehicle reads one g, and the vehicle's stability comes back with the flight. docs/layerx/AUDIT.md 5.1 (in-flight head row), 5.2 (He drawing cannot be flown), 9.3; docs/layerx/DATA-CONTRACT.md 4 (``result.flight.stability``). Every check is against something other than the code under test: CoolProp's densities, RocketPy's own kinematics, the 1976 standard atmosphere, or the formula the flight used before the change.
|
protected |
``axial_acceleration`` as it was before the gate (flight.py at the start of 2026-10-02).
Definition at line 235 of file test_layerx_flight.py.
Referenced by test_the_burn_reads_exactly_as_before(), and test_the_coast_reads_drag_only().
| test_layerx_flight.built_flight | ( | config, | |
| payload, | |||
| loads, | |||
| ** | kw ) |
What ``flight.fly`` builds, keeping RocketPy's Flight: ``(flight config, setup_flight result)``.
Definition at line 91 of file test_layerx_flight.py.
Referenced by he_built().
| test_layerx_flight.config | ( | void | ) |
Definition at line 114 of file test_layerx_flight.py.
References le4_config().
| float test_layerx_flight.he_bottle | ( | float | copv_psia, |
| float | volume_L ) |
The He drawing's bottle at T-0, CoolProp at 293.15 K (room temperature, the audit's hand check).
Definition at line 84 of file test_layerx_flight.py.
Referenced by he_kw().
| test_layerx_flight.he_built | ( | config, | |
| he_kw ) |
Definition at line 144 of file test_layerx_flight.py.
References built_flight(), le4_loads(), and le4_payload().
| test_layerx_flight.he_derived | ( | config | ) |
The hot-fire drawing as Layer X reads it: its pressurant species and its bottle.
Definition at line 119 of file test_layerx_flight.py.
| test_layerx_flight.he_flown | ( | config, | |
| he_kw ) |
Definition at line 139 of file test_layerx_flight.py.
References le4_loads(), and le4_payload().
| test_layerx_flight.he_kw | ( | he_derived | ) |
Definition at line 133 of file test_layerx_flight.py.
References he_bottle().
| test_layerx_flight.le4_arrays | ( | ) |
(t, thrust [N], mdot_O, mdot_F) of the saved LE4 curve.
Definition at line 60 of file test_layerx_flight.py.
Referenced by le4_loads(), le4_payload(), test_rail_exit_against_an_independent_ascent(), and test_the_burn_reads_exactly_as_before().
| test_layerx_flight.le4_config | ( | ) |
Definition at line 78 of file test_layerx_flight.py.
Referenced by config().
| test_layerx_flight.le4_loads | ( | ) |
What the curve burns, plus a gram: the flight caps each load to its tank as it would.
Definition at line 72 of file test_layerx_flight.py.
References le4_arrays().
Referenced by he_built(), he_flown(), test_liftoff_mass_books_the_vehicle_as_the_flight_does(), test_the_configs_own_gas_changes_nothing(), and test_without_the_species_the_helium_bottle_is_refused_as_before().
| test_layerx_flight.le4_payload | ( | ) |
Definition at line 66 of file test_layerx_flight.py.
References le4_arrays().
Referenced by he_built(), he_flown(), test_the_configs_own_gas_changes_nothing(), and test_without_the_species_the_helium_bottle_is_refused_as_before().
| test_layerx_flight.test_a_stability_block_that_cannot_be_made_says_why | ( | ) |
Definition at line 400 of file test_layerx_flight.py.
| test_layerx_flight.test_a_vehicle_held_on_the_rail_reads_one_g | ( | config | ) |
A curve whose thrust dips below the weight before the vehicle leaves the rail: RocketPy holds it (u_dot_rail1 clamps the axial acceleration to zero), the rail carries the difference, and the liquid columns feel g0 sin(90 deg) = g0, the pad's value, not T/m. Once thrust exceeds the weight again it reads T/m as before.
Definition at line 280 of file test_layerx_flight.py.
| test_layerx_flight.test_coolprop_names | ( | ) |
Definition at line 226 of file test_layerx_flight.py.
| test_layerx_flight.test_cp_is_barrowmans_by_hand | ( | he_built, | |
| he_flown ) |
The CP the block reports, by hand from the flown layout (Barrowman 1967, Mach 0, slender body): nose normal-force slope 2 at X_N = L - V/A_base from its tip, V integrated here from the von Karman (Haack C = 0) shape rather than taken as 0.5 L; fins CN = (1 + r/(s + r)) 4N (s/d)^2 / (1 + sqrt(1 + (2 l_m/(Cr + Ct))^2)), l_m the mid-chord line, at X = m (Cr + 2Ct)/(3(Cr + Ct)) + (Cr + Ct - Cr Ct/(Cr + Ct))/6 aft of the root's leading edge (sweep m = Cr - Ct, RocketPy's default: a square trailing edge). Positions from the tail. A fin set placed by its trailing edge instead of its leading edge, or a nose CP off by 1 cm, fails.
Definition at line 335 of file test_layerx_flight.py.
| test_layerx_flight.test_liftoff_mass_books_the_vehicle_as_the_flight_does | ( | config, | |
| he_kw, | |||
| he_flown ) |
The mass the inline ascent starts from, without building RocketPy: the same booking as the flight's own (RocketPy's total_mass(0)), helium bottle and all; a weighed vehicle wins.
Definition at line 214 of file test_layerx_flight.py.
References le4_loads().
| test_layerx_flight.test_max_q_is_half_rho_v_squared_at_its_time | ( | config, | |
| he_flown ) |
Hand check: q = 1/2 rho v^2 with rho from the 1976 standard atmosphere at the reported altitude and the reported speed (no wind: the free stream is the vehicle's speed). Max-Q comes at burnout on LE4 (fastest, still low).
Definition at line 368 of file test_layerx_flight.py.
| test_layerx_flight.test_rail_exit_against_an_independent_ascent | ( | config, | |
| he_flown ) |
The 1-DOF ascent (not RocketPy) on the same curve, mass and drag reaches the rail's length at the speed RocketPy reports at rail exit (no rail buttons declared: the full rail is flown).
Definition at line 385 of file test_layerx_flight.py.
References le4_arrays().
| test_layerx_flight.test_stability_has_the_contract_shape | ( | he_flown | ) |
Definition at line 303 of file test_layerx_flight.py.
| test_layerx_flight.test_static_margin_is_cg_less_cp_over_the_diameter | ( | he_flown | ) |
Positions from the tail: CG ahead of CP is stable, margin = (CG - CP) / D. As the LOX tank (aft of the fuel) drains the CG moves forward and the margin grows (AUDIT 9.3 3: 7.7 -> 8.7 cal on the GN2 run).
Definition at line 322 of file test_layerx_flight.py.
References min.
| test_layerx_flight.test_the_burn_reads_exactly_as_before | ( | he_built | ) |
The gate must not touch the burn: every firing instant, both ends included, is the old formula bit for bit (the burn uses these through Setup.body_acceleration).
Definition at line 261 of file test_layerx_flight.py.
References _ungated(), and le4_arrays().
| test_layerx_flight.test_the_coast_reads_drag_only | ( | he_built | ) |
After burnout the motor gives nothing: the specific force is the drag over the mass, which is RocketPy's own vertical acceleration plus gravity (no wind, vertical rail: the axis stays vertical), and zero at apogee where the vehicle stops. Before the gate it read +0.40 g there.
Definition at line 247 of file test_layerx_flight.py.
References _ungated().
| test_layerx_flight.test_the_configs_own_gas_changes_nothing | ( | config | ) |
Turned on with the gas the config already says, nothing moves: same config, same flight, bit for bit (the GN2 drawing's flights are unchanged by this fix).
Definition at line 198 of file test_layerx_flight.py.
References le4_loads(), and le4_payload().
| test_layerx_flight.test_the_fly_trajectory_coast_is_drag_only | ( | he_flown | ) |
Definition at line 274 of file test_layerx_flight.py.
| test_layerx_flight.test_the_helium_drawing_flies_and_its_budget_is_helium | ( | he_derived, | |
| he_kw, | |||
| he_flown ) |
AUDIT 5.2: the He drawing's bottle (0.209 kg) was priced as the config's nitrogen, needed 0.52 kg and was refused. Flown as the drawing's gas it flies, and says which gas it flew.
Definition at line 151 of file test_layerx_flight.py.
| test_layerx_flight.test_the_refill_and_the_ullage_are_priced_as_helium | ( | config, | |
| he_built ) |
The COPV's loss is the gas that fills the volume the liquid leaves, at tank pressure and the ullage temperature: sum of rho_He(p, T) / rho_liquid x liquid burned (CoolProp), and nothing else. Priced as nitrogen it would be ~7x larger.
Definition at line 163 of file test_layerx_flight.py.
| test_layerx_flight.test_without_the_species_the_helium_bottle_is_refused_as_before | ( | config, | |
| he_kw ) |
``pressurant_gas=None`` is the previous behaviour exactly: the config's nitrogen prices the refill and the 0.209 kg helium bottle cannot hold it (AUDIT 9.3 7.1: 'needs 0.521 kg').
Definition at line 189 of file test_layerx_flight.py.
References le4_loads(), and le4_payload().
| float test_layerx_flight.G0 = 9.80665 |
Definition at line 23 of file test_layerx_flight.py.
| str test_layerx_flight.LE4 = Path(__file__).resolve().parents[1] / "configs" / "ethalox_6800N.yaml" |
Definition at line 25 of file test_layerx_flight.py.
| list test_layerx_flight.LE4_SCHEDULE |
Definition at line 32 of file test_layerx_flight.py.
| float test_layerx_flight.PSI = 6894.757293168 |
Definition at line 24 of file test_layerx_flight.py.
| float test_layerx_flight.SITE_PA = 94069.72225005485 |
Definition at line 27 of file test_layerx_flight.py.