Skip to content

Commit ed85b3e

Browse files
BUG: Corrected calculation of beta angle in aerodynamic computations
Co-authored-by: kevin-alcaniz <[email protected]>
1 parent c512c40 commit ed85b3e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rocketpy/rocket/aero_surface/generic_surface.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def compute_forces_and_moments(
273273

274274
# Angles of attack and sideslip
275275
alpha = np.arctan2(stream_velocity[1], stream_velocity[2])
276-
beta = np.arctan2(-stream_velocity[0], stream_velocity[2])
276+
beta = np.arctan2(stream_velocity[0], stream_velocity[2])
277277

278278
# Compute aerodynamic forces and moments
279279
lift, side, drag, pitch, yaw, roll = self._compute_from_coefficients(
@@ -283,9 +283,9 @@ def compute_forces_and_moments(
283283
beta,
284284
stream_mach,
285285
reynolds,
286-
omega[0],
287-
omega[1],
288-
omega[2],
286+
omega[0], # q
287+
omega[1], # r
288+
omega[2], # p
289289
)
290290

291291
# Conversion from aerodynamic frame to body frame

rocketpy/simulation/flight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,7 @@ def angle_of_sideslip(self):
26992699
# Stream velocity in standard aerodynamic frame
27002700
stream_velocity = -self.stream_velocity_body_frame
27012701
beta = np.arctan2(
2702-
-stream_velocity[:, 0],
2702+
stream_velocity[:, 0],
27032703
stream_velocity[:, 2],
27042704
) # x-z plane
27052705
return np.column_stack([self.time, np.rad2deg(beta)])

0 commit comments

Comments
 (0)