Code covered by the BSD License  

Highlights from
Inertial Measurement Unit position calculator

3.5 | 2 ratings Rate this file 68 Downloads (last 30 days) File Size: 237 KB File ID: #25730 Version: 1.2

Inertial Measurement Unit position calculator



04 Nov 2009 (Updated )

This program decodes the data from an IMU.

| Watch this File

File Information

this program takes the data from an IMU as the input and calculates the body's trajectory ,velocity and attitude .
it plots the velocities and euler angles vs time and the body's trajectory.

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
21 Jul 2015 JITU SANWALE

How the earth rotation has taken into account?

Comment only
06 Jun 2014 Farrokh

1) What rotations do phi, theta, and psi represent? Standard z-x-z rotation?
2) In which direction is gravity supposed to be? Is it in the -Z (negative Z) direction?

Comment only
24 Feb 2014 Abhilash Harpale

@Dario: IMU unit mounted on a centrifuge was used to generate the example file, as far as I can remember

Comment only
28 Nov 2013 Akash

Akash (view profile)

Can we use the function to plot trajectory in real time? Also can you give us the source of the equations used in the function find_position?

Comment only
04 Oct 2013 mostafa mohamed

can any one help me to run the program when i try to run it i have errors

19 Aug 2013 Dario

Dario (view profile)

Nice Work!
can i ask you what have you used to generate the example data?
Thank you

Comment only
12 Mar 2013 Michael c


Can I know which equations did you use? can you give me any references to look at? I'm trying to build an INS that outputs position based on accelerometer and gyroscope data.

Thanks for your help,


Comment only
12 Jan 2013 Pavla

Pavla (view profile)

information about physical units for velocity would be usefull. There is a typing error in Line #29 "data(1,3)" might be "data(i,3).
Are you sure with formula for dY? Item [2,2] in rotation matrix is "sin(phi)*sin(theta)*sin(psi)+cos(phi)*cos(psi)".

Comment only
16 Dec 2012 Paulo Silas Silva

Great Job!!!

14 Aug 2012 Abhilash Harpale

@Jong Kim: Yes, u,v,w are velocities in the body frame.
u,v,w can be obtained from x_dot,y_dot,z_dot by a frame transformation.

Comment only
12 Aug 2012 Jong Kim

Jong Kim (view profile)

I understand that Phi, theta, Psi are representing angles of x, y, z axis and x, y, z are position from virtual global frame. However, I don't understand that what u, v, w are representing. They are velocity? Could you explain for detail? Thanks

Comment only
14 Jun 2012 1.1

Bug fixes and included an example file.

25 Feb 2014 1.2

bug fix.

Contact us