- #1
mitchjp
- 3
- 0
Hi all,
I am currently working on a project and have a problem. I am using a 3 axis accelerometer and attempting to measure distance with it. (Yes, I know, the double integration of doom..)
My problem is not with the integration so to speak but is just with some compensations.
The accelerometer will be mounted so that the x-axis is always pointing in the direction of motion. The y and z axis will be subject to angle changes up to about 20 degrees. Similar to mounting in on top of a car. (X is forward, Y is side to side, Z is up and down).
Obviously if the car was driving up a hill the acceleration you read in the x will be different as there is now a gravity component involved. I can calculate this using the Z axis to find the tilt angle and then some trig to remove the gravity component from the x axis.
But if the car was driving on a cambered road up a hill, then the y-axis will have a gravity component, as will the x and the z axis will be some amount with its angle being a combination of the two. This is what I am having trouble with.
How can I decide which part of the z axis accel is caused from the y-axis tilt, and which is from the x axis?
An example:
Car going up a hill on 10 degree slope. No camber in the road.
Z axis now shows an 80 degree angle, and the acceleration in the x direction will just be whatever it is measured and then minus/plus(depending on the sensors config) the sin(10 degrees).
This is working in g's then multiply through to get to m/s/s.
Now if you add cambered road, the z will show the y tilt and the x tilt and I can't work out how to do it.
Any ideas?
And yes I am aware tracking distance with accelerometer is frowned upon, but it is most likely just going to be used for short intervals between gps locks.
Also, is there an easy MATLAB function for integrating the acceleration in 3 axes with respect to time?
Thanks
I am currently working on a project and have a problem. I am using a 3 axis accelerometer and attempting to measure distance with it. (Yes, I know, the double integration of doom..)
My problem is not with the integration so to speak but is just with some compensations.
The accelerometer will be mounted so that the x-axis is always pointing in the direction of motion. The y and z axis will be subject to angle changes up to about 20 degrees. Similar to mounting in on top of a car. (X is forward, Y is side to side, Z is up and down).
Obviously if the car was driving up a hill the acceleration you read in the x will be different as there is now a gravity component involved. I can calculate this using the Z axis to find the tilt angle and then some trig to remove the gravity component from the x axis.
But if the car was driving on a cambered road up a hill, then the y-axis will have a gravity component, as will the x and the z axis will be some amount with its angle being a combination of the two. This is what I am having trouble with.
How can I decide which part of the z axis accel is caused from the y-axis tilt, and which is from the x axis?
An example:
Car going up a hill on 10 degree slope. No camber in the road.
Z axis now shows an 80 degree angle, and the acceleration in the x direction will just be whatever it is measured and then minus/plus(depending on the sensors config) the sin(10 degrees).
This is working in g's then multiply through to get to m/s/s.
Now if you add cambered road, the z will show the y tilt and the x tilt and I can't work out how to do it.
Any ideas?
And yes I am aware tracking distance with accelerometer is frowned upon, but it is most likely just going to be used for short intervals between gps locks.
Also, is there an easy MATLAB function for integrating the acceleration in 3 axes with respect to time?
Thanks