Title: Rotation convention used in MPU sources · Issue #12 · rpicopter/ArduinoMotionSensorExample · GitHub
Open Graph Title: Rotation convention used in MPU sources · Issue #12 · rpicopter/ArduinoMotionSensorExample
X Title: Rotation convention used in MPU sources · Issue #12 · rpicopter/ArduinoMotionSensorExample
Description: My task is to compare two sensors results one is xsense another is MPU 9150. I read about the quaternions to euler conversion: What I see from the source code of MPU is: *x = atan2( 2.f * ( q->x * q->w + q->y * q->z ), 1.f - 2.f * ( sqz ...
Open Graph Description: My task is to compare two sensors results one is xsense another is MPU 9150. I read about the quaternions to euler conversion: What I see from the source code of MPU is: *x = atan2( 2.f * ( q->x * ...
X Description: My task is to compare two sensors results one is xsense another is MPU 9150. I read about the quaternions to euler conversion: What I see from the source code of MPU is: *x = atan2( 2.f * ( q->x...
Opengraph URL: https://github.com/rpicopter/ArduinoMotionSensorExample/issues/12
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rotation convention used in MPU sources","articleBody":"My task is to compare two sensors results one is xsense another is MPU 9150.\nI read about the quaternions to euler conversion:\n\n\nWhat I see from the source code of MPU is: \n\n```\n *x = atan2( 2.f * ( q-\u003ex * q-\u003ew + q-\u003ey * q-\u003ez ), 1.f - 2.f * ( sqz + sqw ) );\n *y = asin( 2.f * test );\n *z = atan2( 2.f * ( q-\u003ex * q-\u003ey - q-\u003ez * q-\u003ew ), 1.f - 2.f * ( sqy + sqz ) );\n```\n\nAs you see its different. I tried to analyze the matrices of rotations with different conventions (xyz, zyx etc) but none fits this kind of formulas. \n\nDue to unknown convention I can't compare them. So I decided to use the quaternions from MPU instead. And then Using matlab to convert them into euler angles. Euler angles (yaw pitch roll) from MPU and euler angles got from MATLAB after conversion MPU quaternions to euler angles are completely different and makes no sense. MPU euler angles are OK. Showing good results but mpu quaternions to euler angles done in Matlab are completely wrong (matlab uses zyx convention but I think it doesn't matter which convention to use as I'm getting it from quaternions). \n\nSo the question is: is it possible that mpu is using it's own kind of quaternions and rotation matrix convention for euler angles or am I missing something? Could you help with that please?\n","author":{"url":"https://github.com/yerzhik","@type":"Person","name":"yerzhik"},"datePublished":"2016-01-26T06:14:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/12/ArduinoMotionSensorExample/issues/12"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:95bd8fba-6741-b141-e7e0-6e99ee63819c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D58:300F19:70FC7FE:91F39A1:69762FC8 |
| html-safe-nonce | bd347461fb322889c7234bbff612890b4af0e83ec95fa1672f225089cd107309 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDU4OjMwMEYxOTo3MEZDN0ZFOjkxRjM5QTE6Njk3NjJGQzgiLCJ2aXNpdG9yX2lkIjoiODU2ODI1MjcwOTgwMDkxNDg4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f7079261ddfd676bcbe28ad7ee55aa5850281eb112e67671cb427aa8d73099bb |
| hovercard-subject-tag | issue:128735500 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rpicopter/ArduinoMotionSensorExample/12/issue_layout |
| twitter:image | https://opengraph.githubassets.com/33d5dec87e0e6694c06b63d34aa67d56b383e6acc82e86645d535deea0c6b9a5/rpicopter/ArduinoMotionSensorExample/issues/12 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/33d5dec87e0e6694c06b63d34aa67d56b383e6acc82e86645d535deea0c6b9a5/rpicopter/ArduinoMotionSensorExample/issues/12 |
| og:image:alt | My task is to compare two sensors results one is xsense another is MPU 9150. I read about the quaternions to euler conversion: What I see from the source code of MPU is: *x = atan2( 2.f * ( q->x * ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yerzhik |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/rpicopter/ArduinoMotionSensorExample git https://github.com/rpicopter/ArduinoMotionSensorExample.git |
| octolytics-dimension-user_id | 7142449 |
| octolytics-dimension-user_login | rpicopter |
| octolytics-dimension-repository_id | 20127194 |
| octolytics-dimension-repository_nwo | rpicopter/ArduinoMotionSensorExample |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20127194 |
| octolytics-dimension-repository_network_root_nwo | rpicopter/ArduinoMotionSensorExample |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4ea235bfed58ef16c8a5642b3ac64b74f10c9f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width