Skip to content

NWTC Library: Adjust subroutines for converting between DCM and small angles#3233

Open
bjonkman wants to merge 1 commit intoOpenFAST:devfrom
bjonkman:f/GetSmllRotAngs
Open

NWTC Library: Adjust subroutines for converting between DCM and small angles#3233
bjonkman wants to merge 1 commit intoOpenFAST:devfrom
bjonkman:f/GetSmllRotAngs

Conversation

@bjonkman
Copy link
Contributor

@bjonkman bjonkman commented Mar 4, 2026

Feature or improvement description
Adjusted subroutines for computing small angles from DCM and the inverse routines to compute DCMs from small angles. These equations are accurate for larger angles.

Related issue, if one exists

Impacted areas of the software

Additional supporting information

Test results, if applicable

  • r-test branch merging required?

- adjusted subroutines for computing small angles from DCM and the inverse routines to compute DCMs from small angles. These equations are accurate for larger angles.

- This may already be in the v5.0.0 code
Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

This matches what I would expect, with one change.

Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

Never mind. I see from the plan that the 2's cancel. This implementation looks correct. Thanks!

@bjonkman
Copy link
Contributor Author

bjonkman commented Mar 5, 2026

I looped through different angles, converting them to DCMs and then calling this code to get the "small" angles from of the DCM. I then plotted the difference between the starting angle and the calculated angles. As you can see, the error is small (taking into account for all 3 dimensions, the error was no larger than 1.1e-13 degrees).
image

For reference, this is the plot with the original algorithm that we have now replaced:
image

@andrew-platt
Copy link
Collaborator

I'll look review the regression test changes and update them in the next few days for merging. Thanks @bjonkman!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants