BUG: Incorrect vector rotation in GenericSurface.compute_forces_and_moments

Đang mở
#932 4 bình luận 2 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@MateusStano đang làm issue này rồi.

Từ ngày 21/3/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Aerodynamics Bug

Describe the bug

Incorrect vector rotation in GenericSurface.compute_forces_and_moments().
Here, we want to represent the black L, D, Q vectors in the blue body frame.

The M_BA matrix should be direction cosine matrix (DCM), however it is given in vector rotation matrices. Vector rotation matrices rotate the vector without changing/rotating reference frame.

Current implementation rotates the force vectors to match body axis, but results are however presented in aero frame.

If it is intended to use rotation matrix instead of DCM, the rotation should be:

  • Start with the Q, L, D vectors matching +X, -Y, -Z in body frame (i.e. Vector([side, -lift, -drag]) )
  • Rotate the vector by -alpha on X axis and beta on Y axis.
  • The results will match the black Q, L, D vectors and presented in body frame

Another POV:

  • Only focus on blue Zb axis and body frame.
  • Rotate the Zb axis by -alpha on X axis and beta on Y axis.
  • the result will match the black V vector
Image Image

To Reproduce & Expected behavior & Screenshots

Image

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Ngôn ngữ chính
Python
Star
1.1k
Fork
280
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RocketPy-Team/RocketPy

Tất cả issue của RocketPy-Team/RocketPy

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.