Orientation 3-axis accelerometer from x y z only
17 views (last 30 days)
i was wondering if it's possible to get an estimation of the orientation of the accelerometer, from x y z
I have a 3-axis accelerometer, with x(t), y(t) and z(t).
From just those 3 components, is it possible to determine the orientation of my accelerometer, eventually with respect to gravity?
Please find attached also a copy of x, y and z
Thanks a lot in advance for your time
Prabhan Purwar on 28 Jul 2021
Rough estimate of the Position and orientation of the device can be predicted by making use of Kinematic equations.
It's under the assumtion that there is no collision taking place and the sampling rate is high to assume a linear motion model.
% Motion Equation
s = @(dt,u,a) u*dt + 0.5*a*dt^2;
v = @(dt,u,a) u + a*dt;
Once velocity components are obtained make use of the following code to get orientation and visualization
velocityAngle = atan2d(velocityY,velocityX);
[u, v] = pol2cart(deg2rad(velocityAngle), 1);
w = zeros(size(u,1),1);
% Trajectory obtained using motion model
plot3(trajectoryX, trajectoryY, trajectoryZ);
quiver3(trajectoryX, trajectoryY, trajectoryZ,u,v,w,'LineWidth',0.75,'AutoScaleFactor',1)
Some manual adjustments will need to be made according to the setup condition assumed.
Hope it helps!!