# Xsens sensor.

Discussion in 'Sensors and Actuators' started by evol_w10lv, Feb 23, 2015.

1. ### evol_w10lv

73
0
Feb 19, 2013
I'm doing project using xsens MTi-G.

Data file (gyroscope, accelerometer, magnetometer, Euler angles, GPS data):

I can get direction in degrees (heading) from magnetometer, using magnetometer coordinates.
What else I could explore, calculate, compare?

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,482
2,830
Jan 21, 2010
Altitude, acceleration, rate of rotation, tracking position by dead reckoning...

3. ### evol_w10lv

73
0
Feb 19, 2013
I'm trying to plot motion in x, y coordinate system in meters. I can integrate twice resulting acceleration vector to get distance in meters. And I have got bearing angles calculated from magnetometer.
I want to understand principle, how to plot this graph.

If X1=0, Y1=0 (initial conditions) I can calculate X2, Y2, using angle and hypotenuse (distance). As we have got right triangles, using X(i-1), Y(i-1), angle and distance is the way, how to plot all motion in plane and calculate coordinates using sin and cos? So.. important thing is to know where (quadrant) is the heading angle to understand whether I have to sum or subtract triangle sides and X(i-1), Y(i-1) to get X(i) and Y(i). It means that I have to use couple 'if' statements to check it. Am I right?

4. ### davennModerator

13,802
1,941
Sep 5, 2009
try again ... no image

5. ### evol_w10lv

73
0
Feb 19, 2013
Hmm..
d - distance.
If angle is in I quadrant, I can calculate next coordinates like this:

Let's imagine, that angle is in other quadrant, for example, 320 degrees.

I see, that I can't sum x y to get next coordinates, here I must subtract. I can calculate 'green' X Y using sin and cos like before.Only way is to check every angle to plot graph corectly?
I have got distance and angle values in file and I'm going to write Matlab code to plot that graph.