paparazzi-devel
[Top][All Lists]
Advanced

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

[Paparazzi-devel] ArduIMU


From: Steve Joyce
Subject: [Paparazzi-devel] ArduIMU
Date: Tue, 1 Feb 2011 00:08:45 +0100

I wanted to report a few things I discovered about this ArduIMU and the module code in the paparazzi repository.

When I first tried it out I thought it worked quite well at least in auto1, but it seemed to drift a bit in auto2 especially with extended circling. I also noticed that the blue LED (gps lock) flickers on and off and the reported yaw was very noisy (or almost garbage).

After a closer look at the code, I found a couple of significant bugs:

In ins_arduimu.c line 156, the second GPS block transfers 13 bytes, but the buffer size is 14 bytes. The sol_Flags byte is missed and interpreted as whatever was left in the buffer from the first block. This is checked on the arduimu side for a valid gps fix, hence the flickering gps lock LED. This actually doesn't make any difference because the ardu code uses the gps data whether the flags are good or not.

similarly, line 135, the first GPS block transfers 28 bytes of a 29-byte buffer, missing the last byte of ground speed.

But the most significant bug is line 88 ground_course: The units on the paparazzi side are decidegrees, but it is interpreted as degrees on the arduimu side. It is converted to radians and used directly for yaw drift correction, hence the random yaw estimate. I'm surprised it doesn't totally foul up the attitude estimation.

Unfortunately after fixing these things, it performed even WORSE. But at least the yaw estimate follows the gps course now.

I also looked at the timing: The main loop on the arduIMU side runs at 50Hz, but I couldn't quite read it that fast over I2c. I have a feeling that the I2c interrupts are wreaking havoc with the timing in the main loop but I'm not sure. That's why I asked about using I2c in slave mode so the arduIMU could push the estimate at the end of the main loop. It could also be a vibration issue, but as I said it seems to work ok in auto1 without GPS compensation.

In my code I trimmed down the GPS data package to one block with only the ground_speed and ground_course and a few fix flags. As far as I can tell this is all that is used on the arduIMU for centripetal acceleration and yaw drift correction.

any ideas welcome, I'm almost ready to give up.

Cheers,
Steve



reply via email to

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