[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paparazzi-devel] Booz attitude estimation
From: |
antoine drouin |
Subject: |
Re: [Paparazzi-devel] Booz attitude estimation |
Date: |
Sat, 5 Jun 2010 00:01:15 +0200 |
Hi Marko
What the accelerometer senses is the non gravitational acceleration,
in the inertial frame, and expressed in the sensor frame... that is :
[ax ay az] = Xdotdot - g
What the filter does, is assume that Xdotdot is zero ( which is more
or less true for a hovering vehicle ). Then the accelerometer is only
sensing.... the opposite of gravity. Knowing that the gravity is [0 0
9.81] in inertial frame, you can express the first two euler angles as
phi = -atan(ay/az)
theta = asin(ax/|a|)
( use of atan and asin is in order to constrain phi to -180:180 and
theta to -90:90, but it's not important )
the formula you show in your post is just a linearization of that.
Also, if you're trying to understand the value of ACC_AMP, please note
that i did not compute the slope of the linearization at the origin,
but at pi/8 ( so that the value is exact at pi/8)
It's a bit hard to explain all that without drawings and formulas. If
that doesn't do the trick, ask again and I'll make some drawings.
hth
Poine
On Fri, Jun 4, 2010 at 11:37 PM, Marko Thaler <address@hidden> wrote:
> Hello everybody!
>
> I am building my first Booz quad and studying it's code. One thing that
> puzzles me is the implementation of the Complementary Euler Attitude Filter.
>
> On lines 159 and 160 in
> sw/airborne/booz/ahrs/booz2_filter_attitude_cmpl_euler.c we estimate the
> body attitude angles based on the accelerometer measurements:
>
> measurement.phi = -booz_imu.accel.y * ACC_AMP;
> measurement.theta = booz_imu.accel.x * ACC_AMP;
>
> Quadrotor flight dynamics dictate that x and y acceleration in the body
> coordinate system (imu) are always zero. Non-zero values are only produced
> by sensor noise, external wind force, IMU not in the center of gravity etc.
> Additionally, IMU measurements can directly be used for attitude estimation
> only when the system is not accelerating (in hover or constant speed
> condition). If we ignore the extreme cases this condition can only be
> achieved when phi and theta are 0.
>
> Based on this I can not see the value of direct attitude estimation based
> only on the accelerometer data.
>
> I would really appreciate if somebody can explain the purpose of this part
> of the code or show me if I have missed something.
>
> Thank you very much for your help!
>
> Kind regards,
>
> Marko Thaler
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>