[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Bug found in nav_catapult.c

From: Felix Ruess
Subject: Re: [Paparazzi-devel] Bug found in nav_catapult.c
Date: Tue, 25 Sep 2012 11:52:19 +0200


The fix is really simple, just rotate the measurements to body frame. Fixed for nav_catapult and energy_control in master:

IMU accelerometers are not converted too Body by default, only AHRS is. This probably needs extra code. Maybe the state interface will help here.

I don't think that we should start adding sensor measurements to the state interface... and doesn't make sense to convert all IMU measurements to body frame all the time if it's not needed in most configurations.

And here is how we always have our IMU x pointing forward:

Again, will only work if your IMU axes are aligned with your body axis. (Ok, these 90deg mounting rotations are the most common ones).

Cheers, Felix
On Sep 22, 2012 5:46 PM, "Mitchell SLOWER" <address@hidden> wrote:
Dear all,

I probably found a bug in sw/airborne/modules/nav/nav_catapult.c

What happened is that motor was not starting automatically on a catapult launch.
I checked the code and found that we are using imu.accel.x for the acceleration threshold detection.
It might work on some cases, but not on others (eg: if we set the IMU in a different orientation - what I did).
I have a BODY_TO_IMU_PSI set to -90°, so x axis becomes y axis and vice versa.

As usual, here is the screenshot of the situation:
As a reference, at 638s, I'm rolling the plane left and right, and bungee start is done at 647s.

Quick and dirty fix (will work only in SOME cases too): I replaced ACCEL_FLOAT_OF_BFP(imu.accel.x) with ACCEL_FLOAT_OF_BFP(imu.accel.y)

It would be better if we could use the body longitudinal acceleration instead of imu.accel.x, but I'm not sure where it is stored.


Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]