Page 1 of 1

how to get position x,y and z from the CF acceleration

Posted: Thu Nov 26, 2015 5:31 pm
by anasios
hello everyone,

I have been developing a python script which can retrieve the CF acceleration following x,y and z, and i wanna know how to calculate position by focusing on these measurements.

Thank you in advance.

Re: how to get position x,y and z from the CF acceleration

Posted: Thu Nov 26, 2015 6:08 pm
by Che.
hi,
calculating position must be relative to something. you want to calculate the position of the crazyflie in relation to what?

greets

Re: how to get position x,y and z from the CF acceleration

Posted: Thu Nov 26, 2015 8:40 pm
by anasios
In fact, we have to plot the Crazyflie trajectory in 3D on Matlab (i did it by getting the acceleration). However, I have to do it by getting the position x,y,z . Have I to calculate the second derivative of my x,y and z acceleratio values ?

thanks in advance.

Re: how to get position x,y and z from the CF acceleration

Posted: Mon Nov 30, 2015 10:17 am
by arnaud
Hi,

The acceleration is not enough because the platform is rotating as well so if you want to calculate the position in the frame of the room you also need the platform orientation, you can also get it from the log subsystem.

I guess the doing two integration on the acceleration translated in the room frame of reference will give you some result. Though it will not be precise. If you get any results on that I am curious to know about it.

Re: how to get position x,y and z from the CF acceleration

Posted: Mon Nov 30, 2015 7:16 pm
by anasios
I have managed to get position along the x,y and z axis. However, this trajectory is relative to the body frame(the CF frame) and in order to get it in the inertial frame which it's relative to the ground, I think we have to multiply it by the rotation matrix . It seems complicated to calculte upon having 300 data position to handle !!

Re: how to get position x,y and z from the CF acceleration

Posted: Wed Dec 02, 2015 10:06 am
by arnaud
The amount of data point should not be a problem, for each step of the integration I guess you can calculate the rotation matrix and apply a rotated acceleration.