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

Multiple initial rotations in setInitDisp() method #586

Closed
akeeste opened this issue May 17, 2021 · 1 comment · Fixed by #591
Closed

Multiple initial rotations in setInitDisp() method #586

akeeste opened this issue May 17, 2021 · 1 comment · Fixed by #591
Assignees
Labels
Body Class Body Class (bodyClass.m) Constraint Class Constraint Class (constraintClass.m) Feature new feature request Mooring Class Mooring Class (mooringClass.m) PTO Class Power Take-off Class (ptoClass.m)

Comments

@akeeste
Copy link
Contributor

akeeste commented May 17, 2021

Note: italicized text below is include as an example and should be updated before submission. If you feel any section is not applicable to your request, please replace with 'N/A' rather than delete a section.

Is your feature request related to a problem? Please describe.
It is difficult (though possible) to set-up multiple initial rotations in WEC-Sim. Equations are complicated for an individual user to setup.

Describe the solution you'd like
It would be nice if we can incorporate the alternate solution below into the body(#).setInitDisp() method so that users do not need to set-up axis-to-matrix and matrix-to-axis rotation scripts themselves. The body(#).setInitDisp() method could iterate through multiple axis/angle inputs and multiply all rotation matrices together to get a net rotation matrix, then the net axis-angle.

Describe alternatives you've considered
My current solution is to use custom scripts that given two axis-angle rotations (e.g. in pitch and yaw) will calculate:

  1. Axis-angle rotations to rotation matrices
  2. Net rotation matrix = rotMat1 * rotMat2 * ...
  3. Back out net axis-angle rotation from a net rotation matrix

Then the net axis-angle rotation is input to body(#).setInitDisp() method.

Part of this workflow could maybe be done with existing functions (eulXYZ2RotMat.m) but I believe we still need a rotMat2AxisAngle function to convert a net rotation into axis-angle format for Simulink.

Personal project context
Discuss TEAMER internally. Another example of this could include a passive yaw OSWEC which could have initial rotations in both pitch and yaw.

Additional context
I have already created a rotMat2AxisAngle function, we just need to discuss how/if this can be implemented robustly.

@akeeste akeeste added Body Class Body Class (bodyClass.m) Feature new feature request labels May 17, 2021
@akeeste
Copy link
Contributor Author

akeeste commented May 19, 2021

Per our team discussion, I will input a PR for this issue that allows users to input 3 angles to setInitDisp and requires an angle convention of XYZ in the fixed global frame. I'll also investigate how multiple XYZ extrinsic angles will affect the cg initial position

@akeeste akeeste self-assigned this May 19, 2021
@akeeste akeeste linked a pull request May 26, 2021 that will close this issue
@akeeste akeeste added Constraint Class Constraint Class (constraintClass.m) Mooring Class Mooring Class (mooringClass.m) PTO Class Power Take-off Class (ptoClass.m) labels May 26, 2021
@kmruehl kmruehl closed this as completed Jun 9, 2021
@kmruehl kmruehl added this to FY21 Q2/Q3 in WEC-Sim Development Roadmap Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Body Class Body Class (bodyClass.m) Constraint Class Constraint Class (constraintClass.m) Feature new feature request Mooring Class Mooring Class (mooringClass.m) PTO Class Power Take-off Class (ptoClass.m)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants