Skip to content

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

Merged
deslaughter merged 13 commits intoOpenFAST:devfrom
bjonkman:f/GetSmllRotAngs
Mar 12, 2026
Merged

NWTC Library: Adjust subroutines for converting between DCM and small angles#3233
deslaughter merged 13 commits intoOpenFAST:devfrom
bjonkman:f/GetSmllRotAngs

Conversation

@bjonkman
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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

@deslaughter
Copy link
Copy Markdown
Collaborator

I think this is ready to merge. The ATLAS blas seemed to give clean regression tests without having to rerun any. I say we try it and see.

@deslaughter deslaughter merged commit b05e88a into OpenFAST:dev Mar 12, 2026
13 checks passed
This was referenced Mar 12, 2026
@bjonkman bjonkman deleted the f/GetSmllRotAngs branch March 16, 2026 15:49
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.

4 participants