From 4f25f8119aa92c2311af088cceabfc2dd1002f0e Mon Sep 17 00:00:00 2001 From: zuorenchen Date: Thu, 5 Mar 2026 01:13:47 +0000 Subject: [PATCH] Fix the rotation of aero force vector to body frame --- rocketpy/rocket/aero_surface/generic_surface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rocketpy/rocket/aero_surface/generic_surface.py b/rocketpy/rocket/aero_surface/generic_surface.py index d1982ae04..ef979ed3e 100644 --- a/rocketpy/rocket/aero_surface/generic_surface.py +++ b/rocketpy/rocket/aero_surface/generic_surface.py @@ -292,14 +292,14 @@ def compute_forces_and_moments( rotation_matrix = Matrix( [ [1, 0, 0], - [0, math.cos(alpha), -math.sin(alpha)], - [0, math.sin(alpha), math.cos(alpha)], + [0, math.cos(alpha), math.sin(alpha)], + [0, -math.sin(alpha), math.cos(alpha)], ] ) @ Matrix( [ - [math.cos(beta), 0, -math.sin(beta)], + [math.cos(beta), 0, math.sin(beta)], [0, 1, 0], - [math.sin(beta), 0, math.cos(beta)], + [-math.sin(beta), 0, math.cos(beta)], ] ) R1, R2, R3 = rotation_matrix @ Vector([side, -lift, -drag])