paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] BMP085 sensor temperature wiht large error


From: Helge Walle
Subject: Re: [Paparazzi-devel] BMP085 sensor temperature wiht large error
Date: Thu, 4 Aug 2011 00:20:40 +0200

Hi,

The temperature reading of my BMP sensor agrees with another thermometer I have in the same room. I know, however, that this is no proof of its accuracy.

I did some testing with the BMP this evening while continously comparing with the weather station at the local university (published on internet). It revealed that my pressure sensor seems accurate enough on average, but the noise is far too high. I tweaked up the periodic frequency and made every message an average of 5 readings. This reduced the noise to approx half of what it was, that is I got +/- 2m expressed in altitude noise.
 
I think I will check the code (learning some more C at the same time), but this will take some time unfortunately. Any findings will be reported.
Regards,
Helge.
 

 
2011/8/3 Prof. Dr.-Ing. Heinrich Warmers <address@hidden>
Hi,
We have used the BMP and  a humidity sensor and found that the temperature of the BMP is always 3 to 4 degree wrong.
In the data sheet the noise of the pressure is given lower than 0.4m and the maximum rate is 128/s.
Since same other projects use the same sensor  for quadrorotors i think the error is in the software.
First i will give out the raw data without correction.
 
Regards
Heinrich.




Helge Walle schrieb:
Got it, thanks for the correction!

Helge.

2011/8/3 Gautier Hattenberger <address@hidden>
I think you're not correct actually.
The main loop is written like this:

init calls
while (true) {
 if (1/60s since last periodic call) { periodic calls }
 event calls
}

So, the event calls are as fast as possible. Only the periodic functions are called with a fixed period.

Gautier

On 03/08/2011 13:50, Helge Walle wrote:
Thanks a lot for your help Gautier!

I did a few trial compilations with different frequencies between 1 and 60, and modules.h was generated in the way I expected.
Please correct me if I am wrong, but I assume that in the case of my TWOG based fixed wing aircraft the continuous polling of event functions always happen at 60hz.

Helge.


2011/8/3 Gautier Hattenberger <address@hidden>
Hi,

i7 is a prescaler mechanism that calls a function (here baro_bmp_periodic) with the correct frequency (specified in the xml file) based on the main loop frequency (60Hz for fixed wing, 512Hz for rotorcraft). You can specify any frequency lower or equal to the main loop, but if it's not a divider of it, the module's periodic function will not be called with the exact frequency.
The event functions are polled continuously when the periodic functions are not called (here, probably much more than 8 times as often as the baro_bmp_periodic...).

Gautier

On 03/08/2011 10:37, Helge Walle wrote:

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.




_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

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