File tree Expand file tree Collapse file tree
tests/integration/simulation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,3 +301,25 @@ def test_weathercock_anti_aligned_uses_perp_axis_and_evolves(flight_weathercock_
301301 assert e_dot_magnitude > 1e-6 , (
302302 "Quaternion derivatives should be non-zero for anti-aligned"
303303 )
304+
305+
306+ def test_3dof_net_thrust_available (flight_3dof ):
307+ """Tests that net_thrust property is available in 3 DOF mode.
308+ The net_thrust property is required for energy plots and should be
309+ available in both 3 DOF and 6 DOF modes.
310+ Parameters
311+ ----------
312+ flight_3dof : rocketpy.simulation.flight.Flight
313+ A Flight object configured for 3-DOF simulation.
314+ """
315+ # Check that net_thrust can be accessed
316+ assert hasattr (flight_3dof , "net_thrust" ), "net_thrust attribute not found"
317+
318+ # Check that it returns a Function object with data
319+ net_thrust = flight_3dof .net_thrust
320+ assert len (net_thrust ) > 0 , "net_thrust should have data points"
321+
322+ # Verify that thrust_power can be computed (uses net_thrust internally)
323+ assert hasattr (flight_3dof , "thrust_power" ), "thrust_power attribute not found"
324+ thrust_power = flight_3dof .thrust_power
325+ assert len (thrust_power ) > 0 , "thrust_power should have data points"
You can’t perform that action at this time.
0 commit comments