Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacecraft rotated around the wrong axes #1

Open
MStefan99 opened this issue Feb 23, 2022 · 1 comment
Open

Spacecraft rotated around the wrong axes #1

MStefan99 opened this issue Feb 23, 2022 · 1 comment

Comments

@MStefan99
Copy link

Hello,

It seems like the model in the mavsim_simulink/chap2/drawSpacecraft.m is rotated around the wrong axes. In the provided file, the model is always rotated around the axes of inertial system (k^v, j^v and i^v), however yaw, pitch and roll are defined as rotations around the axes k^v, j^v1 and i^v2, respectively. As an example, if you add a yaw angle followed by pitch, you will observe the model rolling even if a roll angle is set to zero (see example below).
example
Is this the intended behavior?

Thank you.

@kingdom-l
Copy link

kingdom-l commented Nov 12, 2023

I solved. In mavsim_simulink/chap2/drawSpacecraft.m , there is an error in the function XYZ=rotate(XYZ,phi,theta,psi) . It should be R = R_yaw * R_pitch * R_roll, instead of R = R_roll * R_pitch * R_yaw;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants