How to get position in cartesian cordinates using mpu 6050?I am able to find roll,pitch but can find position.
data sheet
Mark
You cannot get an absolute position of mpu6050 in cartesian coordinates.
You may track the motion of the mpu6050 from a point A to a point B, and by applying a lot of math you can estimate the absolute position (in cartesian coordinates for example) of the point B relative to the point A..
What is the algorith behind this.I tried double integration but it is not working cz acceleartion measured by mpu 6050 its not linear.
Double integration of the acceleration to get coordinates is the correct approach.
How could you possibly know that the measured acceleration is not linear?
jremington:
Double integration of the acceleration to get coordinates is the correct approach.
How could you possibly know that the measured acceleration is not linear?
cz it has gravity component when it at rest horizontal acceleration on z will read 1g.in vertical at rest x will 1g and flip 90 degree vertical y will read 1g which will effect velocity and position.
You need to read up on how to use these motion sensors. If you google "AHRS tutorial" you will find several excellent introductions. Also, the DIY Drones project website has excellent introductory material on how their ArduPilot software works: Sign In - diydrones
cz it has gravity component when it at rest horizontal acceleration on z will read 1g.in vertical at rest x will 1g and flip 90 degree vertical y will read 1g which will effect velocity and position.
The last time I plotted a constant value, I got a straight line. Sounds linear to me.
Can anyone provide me .c code for direction cosine matrix to transform body frame accelerometer measurements into earth frame, and account for gravity.
jremington:
http://ardupilot.com
They are not giving solution in newbee standards.
For "newbees" there are lots of tutorials available on how to relate different coordinate systems. How you mount the accelerometer in the model you are building defines the relationship between the accelerometer axes, the model axes and eventually, the Earth frame. Until you understand the terms used and the coordinate transformation tutorials, someone else's code won't help at all.
It is clear from your question that you have much background reading to do, and I'm guessing that few people on these forums are willing to help with that.
i have the same questions
Have you read the rest of this thread?