paparazzi-devel
[Top][All Lists]
Advanced

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

[Paparazzi-devel] BMP085 sensor


From: Helge Walle
Subject: [Paparazzi-devel] BMP085 sensor
Date: Wed, 3 Aug 2011 10:37:53 +0200

Hi,

I have studied baro_bmp.c trying to find the reason why readings from the BMP085 sensor seems to wander in steps of up to +/- 0.5 hPa around “center”. This amounts to approx +/- 4m at sea level. No luck so far, however.

The program selects a high resolution setting of the sensor. As far as the BMP085 datasheet goes I would expect values in the SENSOR_SYNC_SEND message to have a higher resolution. I want to look more at this, but a few questions arise.

In .../var/<my_aircraft>/generated/modules.h there is this code:

…..
static inline void modules_init(void) {
   baro_bmp_init();
}
static inline void modules_periodic_task(void) {
   static uint8_t i7; i7++; if (i7>=7) i7=0;
   if (i7 == 0) {
      baro_bmp_periodic();
   }
}
static inline void modules_event_task(void) {
   baro_bmp_event();
}
…..

I suppose this code is based on .../conf/modules/baro_bmp.xml. But what is the effect of i7 and how/where is it generated?
It looks to me as if baro_bmp_event() is run 8 times as often as baro_bmp_periodic(). Is this correct?

Could someone please explain a little about this?

Thanks for any help,

Helge.





reply via email to

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