-
Notifications
You must be signed in to change notification settings - Fork 44
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
Inconsistency in quaternion to roll, pitch, yaw conversion and vice versa in InterpolatedMovingPlatform #453
Comments
Hi @zoltantorok, thank you for sharing your findings. We have updated the implementation to use the same format for input and output trajectories when using the ARINC 705 specification. We will include the fix in a future release. In the meantime, you can find the update available in this PR: #455 I hope this solves the issue. If not, please let us know so we can work on further fixes. |
Hi Alberto, thank your the quick response. Your changes indeed fix the inconsistency. |
Indeed, that is an excellent idea. We will update the tests after the new release because we are currently preparing a major update. |
Hi @albertoesmp,
Using the following leg:
This roll, pitch, yaw angle
However, when I print the rotation matrix using your changes in
This means that internally in Helios the roll and pitch angles are swapped and negated. |
Hi again @zoltantorok I've swapped and negated the roll and pitch angles. The new update should be available here: #455 Could you confirm that this works as expected for you? |
Thanks @albertoesmp for your latest fix. I can confirm that the rotation matrix is now as expected. |
The problem
I noticed that roll and pitch angles are swapped in the trajectory output compared to the trajectory input converted by using RotationSpec::ARINC_705 in
InterpolatedMovingPlatform::InterpolatedMovingPlatform
How to reproduce
Add the following log lines to InterpolatedMovingPlatform::InterpolatedMovingPlatform() and use an interpolated trajectory.
This produces the following log lines in my case:
roll, pitch, yaw = -0.551372, -4.36025, 91.3625
q = [0.698005, 0.0300172, -0.0238576, 0.715066]
roll, pitch, yaw = -4.36025, -0.551372, 91.3625
If necessary, provide simulation XML files, XML code snippets or pyhelios code snippets.
I assume that the bug can be reproduced using any configuration. Just make sure to use an external trajectory.
Your environment (please complete the following information):
Ideas for possible solutions (Optional)
It seems that the roll, pitch, yaw angle conversion to quaternion using RotationSpec::ARINC_705 is incosistent with the quaternion to Euler ZYX conversion.
The text was updated successfully, but these errors were encountered: