Copyright (c) 2014, Abhilash Harpale
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Samer Karam (view profile)
Hi Abhilash,
If I already have velocity on x,y,z instead of accleleration. What should I edit in the code find position.
Regards,
Eugen Lange (view profile)
Moacir Fonseca (view profile)
Moacir Fonseca (view profile)
Ben (view profile)
software (view profile)
I would like to know the exact meaning of each of the initial data into the input.
Ax, Ay, Az, and the acceleration values p, q, r is the angular velocity, right?
Also, phi, theta, psi initial data of the data values of a 3x3 matrix is the Euler angle, (x y z) is correct, the initial coordinates?
u, v, w I do not know exactly what is meant by the.
Maël Abidine (view profile)
Hello, i download the zip file IMU position calculator. And i have several question. First, the raw data in the array data are the acceleration in g and the angular velocity in °/s?
Secondly, the input data in the matrix input, i put xyz as i want in my own markler? and phi theta psi are they the euler angle? and finally, what are representing the u v w values?
Thanks
Na Du (view profile)
Hello, Abhilash, I have read your IMU-calculator algorithm and I have learnt a lot through it. But there is one question confusing me that how did you set the initial values to [0.0 0.218893 0.0 ;35.156 -0.79 7.598; 0.0 0.0 609.6].I think the initial values are different under different conditions. Then how can I get my initial values?
Mohammed AFTATAH (view profile)
plz how can we calculate euler angles from trajectory (x,y,z) ?
NAGA VBN (view profile)
Hi Abhilash,
Very good example but I have an IMU which gives acceleration and quaternion data as output.Then how can I use your code.Please suggest.
mkranz (view profile)
If I apply a constant acceleration in each axis, but keep rotational rates equal to zero in all axes, I get the expected velocities in all axes, but get the expected positions in only x and z, while y has zero displacement
The issue may be this:
line 32 currently reads:
change(3,2)=current(2,1)*cos(current(1,2))*sin(current(1,3))+current(2,2)*(sin(current(1,1))*sin(current(1,2))*sin(current(1,3))+cos(current(1,1))*sin(current(1,3)))+current(2,3)*(cos(current(1,1))*sin(current(1,2))*sin(current(1,3))-sin(current(1,1))*cos(current(1,3)));
It might be this instead, which involves changing only one sin to a cos:
change(3,2)=current(2,1)*cos(current(1,2))*sin(current(1,3))+current(2,2)*(sin(current(1,1))*sin(current(1,2))*sin(current(1,3))+cos(current(1,1))*cos(current(1,3)))+current(2,3)*(cos(current(1,1))*sin(current(1,2))*sin(current(1,3))-sin(current(1,1))*cos(current(1,3)));
JITU SANWALE (view profile)
How the earth rotation has taken into account?
Farrokh (view profile)
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?
Abhilash Harpale (view profile)
@Dario: IMU unit mounted on a centrifuge was used to generate the example file, as far as I can remember
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?
mostafa mohamed (view profile)
can any one help me to run the program when i try to run it i have errors
Dario (view profile)
Nice Work!
can i ask you what have you used to generate the example data?
Thank you
Michael c (view profile)
hello,
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,
Michael
Pavla (view profile)
Hello,
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)".
Paulo Silas Silva (view profile)
Great Job!!!
Abhilash Harpale (view profile)
@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.
Jong-Hwan Kim (view profile)
Hi,
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