How to set a local frame for rotation measurments

3 views (last 30 days)
Hello everybody,
I have a set of IMU data which unfortunately was not calibrated before measurments of paddle movement. It includes warm up and the test itself, but while putting it on, the paddle was at a different position in every trial and because of that the orientation of the coordinate system ist different at each trial.
Now my idea is to set a reference frame at the initial water contact and take the orientation of this specific coordinate system as reference frame and calculate the rotation from this.
Until now I wrote following code, but it is a huge difference for each trial:
% Quaternion
quat = [C{6} C{7} C{8} C{9}];
quat(1,:)=[];
A = cellfun(@str2double,quat);
% Rotation um Z
vecInit = [0, 0, 1];
vecBar = quatrotate(A, vecInit);
rotation = -1 * atan2(vecBar(:,1), vecBar(:,2));
figure ('Name','Rotation um Z')
plot(date, rotation)
% xlim([90 100])
xlabel('t [sec]')
Alternatively it maybe can be solved with Euler or rotation matrix...
Do you have ideas to set reference frames?

Answers (1)

Matt J
Matt J on 26 Aug 2020
If you can come up with 3 corresponding points for each trial, you can use this FEX file to register the coordinate frames

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!