Rotating Angular Velocity Vector By A Quaternion











up vote
2
down vote

favorite












I'm working on an AHRS system and I have 3 axis gyros and they are not in alignment with the frame of the vehicle. This means that integrating the raw output from the gyros produces an orientation that does not reflect the true orientation of the vehicle. Changing heading for example will result in movement around the pitch and roll axes.



The difference in orientation between gyros and frame of the vehicle is known and is in the form of a unit quaternion.



How can I rotate the angular velocity from the gyros so it is aligned with the vehicle?










share|cite|improve this question


























    up vote
    2
    down vote

    favorite












    I'm working on an AHRS system and I have 3 axis gyros and they are not in alignment with the frame of the vehicle. This means that integrating the raw output from the gyros produces an orientation that does not reflect the true orientation of the vehicle. Changing heading for example will result in movement around the pitch and roll axes.



    The difference in orientation between gyros and frame of the vehicle is known and is in the form of a unit quaternion.



    How can I rotate the angular velocity from the gyros so it is aligned with the vehicle?










    share|cite|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I'm working on an AHRS system and I have 3 axis gyros and they are not in alignment with the frame of the vehicle. This means that integrating the raw output from the gyros produces an orientation that does not reflect the true orientation of the vehicle. Changing heading for example will result in movement around the pitch and roll axes.



      The difference in orientation between gyros and frame of the vehicle is known and is in the form of a unit quaternion.



      How can I rotate the angular velocity from the gyros so it is aligned with the vehicle?










      share|cite|improve this question













      I'm working on an AHRS system and I have 3 axis gyros and they are not in alignment with the frame of the vehicle. This means that integrating the raw output from the gyros produces an orientation that does not reflect the true orientation of the vehicle. Changing heading for example will result in movement around the pitch and roll axes.



      The difference in orientation between gyros and frame of the vehicle is known and is in the form of a unit quaternion.



      How can I rotate the angular velocity from the gyros so it is aligned with the vehicle?







      rotations






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 21 '14 at 11:06









      user2627202

      112




      112






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You can use the procedure used in Android devices:
          http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-gyro






          share|cite|improve this answer





















          • I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation.
            – user2627202
            Jan 21 '14 at 12:12










          • Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. starlino.com/imu_guide.html
            – CAGT
            Jan 21 '14 at 12:29










          • Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle.
            – user2627202
            Jan 21 '14 at 13:11










          • I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers
            – user2627202
            Jan 21 '14 at 13:19










          • Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position.
            – CAGT
            Jan 21 '14 at 13:35











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f646088%2frotating-angular-velocity-vector-by-a-quaternion%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          You can use the procedure used in Android devices:
          http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-gyro






          share|cite|improve this answer





















          • I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation.
            – user2627202
            Jan 21 '14 at 12:12










          • Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. starlino.com/imu_guide.html
            – CAGT
            Jan 21 '14 at 12:29










          • Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle.
            – user2627202
            Jan 21 '14 at 13:11










          • I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers
            – user2627202
            Jan 21 '14 at 13:19










          • Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position.
            – CAGT
            Jan 21 '14 at 13:35















          up vote
          0
          down vote













          You can use the procedure used in Android devices:
          http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-gyro






          share|cite|improve this answer





















          • I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation.
            – user2627202
            Jan 21 '14 at 12:12










          • Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. starlino.com/imu_guide.html
            – CAGT
            Jan 21 '14 at 12:29










          • Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle.
            – user2627202
            Jan 21 '14 at 13:11










          • I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers
            – user2627202
            Jan 21 '14 at 13:19










          • Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position.
            – CAGT
            Jan 21 '14 at 13:35













          up vote
          0
          down vote










          up vote
          0
          down vote









          You can use the procedure used in Android devices:
          http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-gyro






          share|cite|improve this answer












          You can use the procedure used in Android devices:
          http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-gyro







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Jan 21 '14 at 11:52









          CAGT

          721617




          721617












          • I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation.
            – user2627202
            Jan 21 '14 at 12:12










          • Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. starlino.com/imu_guide.html
            – CAGT
            Jan 21 '14 at 12:29










          • Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle.
            – user2627202
            Jan 21 '14 at 13:11










          • I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers
            – user2627202
            Jan 21 '14 at 13:19










          • Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position.
            – CAGT
            Jan 21 '14 at 13:35


















          • I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation.
            – user2627202
            Jan 21 '14 at 12:12










          • Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. starlino.com/imu_guide.html
            – CAGT
            Jan 21 '14 at 12:29










          • Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle.
            – user2627202
            Jan 21 '14 at 13:11










          • I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers
            – user2627202
            Jan 21 '14 at 13:19










          • Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position.
            – CAGT
            Jan 21 '14 at 13:35
















          I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation.
          – user2627202
          Jan 21 '14 at 12:12




          I had a look through it and it's basically what I'm already doing. The problem is the axis of the sensors don't line up with the phone/vehicle. Holding the phone level and pointing north should result in no rotation. In my situation it doesn't, because the sensors inside the phone/vehicle are in a different orientation.
          – user2627202
          Jan 21 '14 at 12:12












          Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. starlino.com/imu_guide.html
          – CAGT
          Jan 21 '14 at 12:29




          Here is a procedure to align accelerometer axis vs gyro axis. Part 3 will show you what you need. I would suggest reading it all though. starlino.com/imu_guide.html
          – CAGT
          Jan 21 '14 at 12:29












          Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle.
          – user2627202
          Jan 21 '14 at 13:11




          Thanks. That's an interesting page. However my accelerometers and gyros are aligned together on a 9dof IMU breakout board. The problem is the breakout board isn't aligned with the axis of the vehicle.
          – user2627202
          Jan 21 '14 at 13:11












          I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers
          – user2627202
          Jan 21 '14 at 13:19




          I know the orientation of the board vs vehicle (I'll call it the offset), and I can correct accelerometer / magnetometer vectors by making them pure quaternions and rotating by the conjugate of the offset. This technique doesn't appear to work for angular velocity. I'd like to know why and how I can correct it. Cheers
          – user2627202
          Jan 21 '14 at 13:19












          Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position.
          – CAGT
          Jan 21 '14 at 13:35




          Angular velocity needs to be integrated to obtain a difference in angular position. The integration needs to be done in a fixed time sample. In this way, you will get a delta-position. Now you have a delta in angular position for each axis (on the gyro coordinate reference), so then you can rotate it to your orientation and add the delta angle to your actual (angular) position.
          – CAGT
          Jan 21 '14 at 13:35


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f646088%2frotating-angular-velocity-vector-by-a-quaternion%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to change which sound is reproduced for terminal bell?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Can I use Tabulator js library in my java Spring + Thymeleaf project?