Comments (4)
Hi choolake! I was unaware of the method InvenSense used in MotionApps to calculate the Z component of gravity. I used code that I came across as part of a different software IMU algorithm because it's what I had, and it worked. However, if the other method also works, there is no reason not to use it if you prefer. I'm not sure if one method has a performance gain over the other.
from i2cdevlib.
Hello all,
They are actually same formula. The formula given by litterature is Jeff's :
w^2-x^2-y^2+z^2. For a normalized quaternion, we have w^2+x^2+y^2+z^2 = 1.
The z gravity can then be written
(w^2^-x^2-y^2+z^2) -1 + (w^2+x^2+y^2+z^2) = 2w^2+2z^2 - 1, which is the formula used by Invensense (scaled by 2^30).
from i2cdevlib.
Thanks, @drastef! That's great to know. I will mark this issue as closed and update the code, since it looks to be slightly less computationally intensive.
from i2cdevlib.
I got your point and i am very grateful to jrowberg and drastef
from i2cdevlib.
Related Issues (20)
- Serial Yaw Roll Pitch example of MPU6050_DMP6 lib HOT 2
- MPU DMP with 250 dps
- Upgrading DIY UAV from mega2560 to esp32 : unsuccessful after weeks of attempts HOT 1
- Yaw or Quaternion w value got unchanged eventhough my MPU6050 is rotating in place HOT 2
- IN YPR R is not changing for variable P HOT 1
- I get no output in Serial Monitor Wesmos D1 Mini HOT 7
- Calculate displacement
- How to get actual g-force values?
- publish platformio registry for MPU9250 package
- Count overflow in Arduino/I2Cdev::readBytes and I2Cdev::readWords HOT 1
- I'm trying to use your ADS1115 library for a current sensor project I'm working on right now. When i use that library it gives this error: HOT 1
- grove IMU 9dof
- Is it possible to use more than 2 adxl345 accel/gyros on an esp32?
- [FR] Project Examples for PlatformIO Registry
- Compilation error about no matching function for call to all writing and reading functions from I2Cdev.cpp
- STM32 HAL \ I2Cdev.h & I2Cdev.c compiler error : "multiple definition of `I2Cdev_readTimeout';"
- ESP32 error: i2c driver not installed
- is OUTPUT_READABLE_YAWPITCHROLL display Euler angles in degrees conversion correct? HOT 1
- Angular Velocity (Gyroscope_X deg/s, Gyroscope_Y deg/s, Gyroscope_Z deg/s,)
- Acceleration Range
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i2cdevlib.