Comments (15)
The North-West-Up (NWU) describes the axis directions relative to the Earth as X = North, Y = West, and Z = Up.
from fusion.
thanks for your reply, I means why to set the North-West-Up coordinate. In general, we can use the one piece of acc and mag data to calculate transformation matrix based on ENU or NWU between the earth coordinate and imu coordinate, and set this transformation as the intial pose q0. In fusion algorithm, we set the initial quaternion pose as identity matrix, and the output pose will be correct with the feed of acc and mag data, that is why the "ahrs->rampedGain" coefficient is large, because we use the acc and mag data to converge into right pose. and during this convergence process, we make sure the NWU coordinate, not ENU coordinate, is the viewpoint right ?
following codes are related with the decision with the NWU coordinate, is it right ?
const FusionVector halfGravity = {
.axis.x = Q.x * Q.z - Q.w * Q.y,
.axis.y = Q.y * Q.z + Q.w * Q.x,
.axis.z = Q.w * Q.w - 0.5f + Q.z * Q.z,
};
ahrs->halfAccelerometerFeedback = FusionVectorCrossProduct(FusionVectorNormalise(accelerometer), halfGravity);
const FusionVector halfWest = {
.axis.x = Q.x * Q.y + Q.w * Q.z,
.axis.y = Q.w * Q.w - 0.5f + Q.y * Q.y,
.axis.z = Q.y * Q.z - Q.w * Q.x
};
ahrs->halfMagnetometerFeedback = FusionVectorCrossProduct(FusionVectorNormalise(FusionVectorCrossProduct(halfGravity, magnetometer)), halfWest);
from fusion.
I am sorry but I do not understand your description and question. NWU and ENU are conventions. Fusion uses NWU.
from fusion.
Sorry for confusing you, i change my question to another. if I want to change the output quaternion pose to be based on ENU ? what should i do ?
from fusion.
I am sorry but I do not understand your description and question. NWU and ENU are conventions. Fusion uses NWU.
Sorry for giving this uncomfortable understanding for you. I want to give further explanations for you. In your thesis, you mentioned that your output is based the North-West coordinate. My question is that which step in your algorithm is based on the North-West coordinate.
Thanks for your patience and hope your reply. Cheers!
from fusion.
A change from NWU to ENU would only affect line 164. If you are only using a gyroscope and accelerometer then no change is required. In this case, NWU and ENU are identical because the algorithm would have no reference of heading.
from fusion.
I see, and if i want to change the NWU to ENU, how can i revise the line 164 to change into ENU ? can you give me an example or some related materials ?
Thanks for your patience and hope your reply. Cheers!
from fusion.
My previous comment was incorrect, several other changes would be required. The changes are too complex to guide you through here. I will consider this a feature request for Fusion to support NWU, NED, and ENU. I cannot suggest a completion date at this time. However, you can access the WIP once the feature branch is available.
from fusion.
Cool, thanks a lot.
from fusion.
ENU and NED support has been added in axes-convention.
from fusion.
Wonderful !! very thankful !!
from fusion.
One more question, i want to know the theory behind the Ned or END calculation code, can you give me some documents or advice about that ? thanks.
from fusion.
Hello, I check the axes-convention branch code, and discover that the code realization about function named by "HalfGravity(const FusionAhrs *const ahrs)" is not complete. the "case FusionConventionNwu" is not realized.
static FusionVector HalfGravity(const FusionAhrs *const ahrs) {
#define Q ahrs->quaternion.element
switch (ahrs->settings.convention) {
case FusionConventionNwu:
case FusionConventionEnu:
return (FusionVector) {
.axis.x = Q.x * Q.z - Q.w * Q.y,
.axis.y = Q.y * Q.z + Q.w * Q.x,
.axis.z = Q.w * Q.w - 0.5f + Q.z * Q.z,
}; // third column of transposed rotation matrix scaled by 0.5
case FusionConventionNed:
return (FusionVector) {
.axis.x = -1.0f * (Q.x * Q.z - Q.w * Q.y),
.axis.y = -1.0f * (Q.y * Q.z + Q.w * Q.x),
.axis.z = -1.0f * (Q.w * Q.w - 0.5f + Q.z * Q.z),
}; // third column of transposed rotation matrix scaled by -0.5
default:
return FUSION_VECTOR_ZERO; // avoid compiler warning
}
#undef Q
}
Thanks for your patience and hope your reply. Cheers!
from fusion.
North-West-Up (NWU), East-North-Up (ENU), and North-East-Down (NED) describe the alignment of the Earth XYZ axes. I do not have any documentation for how calculations differ for each. It should be clear from the code and comments, assuming the reader is familiar with the underlying mathematics. For example, the acceleration of gravity is in the up direction. For NWU and ENU, up is aligned with +Z and so gravity must be equal to the third column of a rotation matrix. For NED, up is aligned with -Z and so gravity must be equal to the negated third column of a rotation matrix.
The code is complete. The value of halfGravity
is the same for FusionConventionNwu
and FusionConventionEnu
so the switch statement implements a fall through.
from fusion.
Thanks for your reply. I check the theory from chapter 7 of Madgwick's PhD thesis combined with your explanation, and i understand the calculation of "HalfGravity" vector based on different axe conversions. thanks again.
from fusion.
Related Issues (20)
- TEST data HOT 1
- Python "No code object available for imufusion" with Setup.py or pip install HOT 4
- Measurement convention for sensors other than x-imu HOT 3
- How to use the magnetometer data with different sampling frequency from the inertial sensors? HOT 1
- Gyroscope Offset Algorithm HOT 7
- Link to dissertation is broken HOT 1
- Q: Influence of motion and external acceleration HOT 3
- Very noisy Roll Pitch Yaw data HOT 5
- Recommended sampling rate? HOT 2
- yaw value changes while rotating on only roll or pitch axis. HOT 3
- 5 seconds delay in real-time operation (python) HOT 2
- Need some help setting up the algorithm. HOT 14
- Application Questions HOT 25
- Integration of GPS data to estimate position and velocity HOT 1
- Proper way of calling FusionAhrsUpdate with accel, gyro and mag all having different update rates HOT 2
- What is the difference between this algorithm and madwick gradient algorithm? Can it still be called gradient descent algorithm? HOT 7
- 做过这块IMU融合的加一下我微信 HOT 1
- data advice request HOT 1
- Anomaly quaternion when applying realtime calculating by sensor data from UDP connection HOT 5
- Overshooting and slow stabilisation pitch value HOT 7
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 fusion.