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

Fixed crv2rotation #281

Closed
wants to merge 1 commit into from
Closed

Fixed crv2rotation #281

wants to merge 1 commit into from

Conversation

ben-l-p
Copy link
Collaborator

@ben-l-p ben-l-p commented Feb 26, 2024

Found a bug in the conversion from a $\boldsymbol{\Psi}$ vector to a rotation matrix $\mathbf{R}$. This only applies for larger $\Psi$ angles, as the small angle correction (which most "normal" cases will use) is correct.

Intended expression:
$$\mathbf{R} = \mathbf{I} + \sin||{\boldsymbol{\Psi}||} \tilde{\boldsymbol{\Psi}} + \frac{1-\cos{||\boldsymbol{\Psi}||}}{||\boldsymbol{\Psi}||^2}\tilde{\boldsymbol{\Psi}} \tilde{\boldsymbol{\Psi}}$$

Used expression:
$$\mathbf{R} = \mathbf{I} + \frac{\sin||\boldsymbol{\Psi}||}{||\boldsymbol{\Psi}||} \tilde{\boldsymbol{\Psi}} + (1-\cos{||\boldsymbol{\Psi}||})\tilde{\boldsymbol{\Psi}} \tilde{\boldsymbol{\Psi}}$$

@ben-l-p ben-l-p added the bug label Feb 26, 2024
Copy link
Collaborator

@kccwing kccwing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ben-l-p! Note line 561 normalises the vector - then referring to eq C10 in Dynamics of Flexible Aircraft - the existing expression seems to be correct.

Screenshot 2024-02-26 at 20 37 12

@ben-l-p ben-l-p closed this Feb 26, 2024
@ben-l-p ben-l-p deleted the fix_crv2rotation branch February 26, 2024 18:08
@ben-l-p
Copy link
Collaborator Author

ben-l-p commented Feb 26, 2024

I'm bad at maths, back to the drawing board...

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

Successfully merging this pull request may close these issues.

None yet

2 participants