Skip to content

added setReorientation function #15

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LazaroFilm
Copy link

Added a setReorientation function that takes a quaternion and applies it to the rotation vector output as an offset.

This can be used in conjunction to the tare functions to offset the output manually.
To reset, simply send a zeroed out quaternion to the function.

Details on SH2 documentation 6.4.3.3 Set Reorientation (0x02)

@lewispg228
Copy link
Member

Hey @LazaroFilm ,
Thanks for this PR! Looks good. Happy to pull it in as is.

Would you be interested in also writing an example? No pressure, of course, but it could be very helpful to see how to actually implement this in some example code.

We currently don't have any examples that expose the sh2_Quaternion_t data type in the example code. We typically strive to keep the examples as accessible as possible. We often create additional functions that allow the user to send "simpler" arguments than a pointer to a complex data-type like a struct.

Either way, thanks again and we'll be pulling this in shortly!
-Pete

@LazaroFilm
Copy link
Author

LazaroFilm commented Dec 1, 2023

Good point I'll make one and add it to the PR. And I'll look into simplifying the data struct access. Maybe inputing the quaternion values as variables to the function.

@lewispg228
Copy link
Member

Sounds good and thank you! Looking forward to seeing your example!

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

Successfully merging this pull request may close these issues.

2 participants