mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
Fix BMP085 pressure calculation
This commit is contained in:
committed by
Martin Mueller
parent
d8b9289422
commit
1e539bf133
@@ -157,7 +157,7 @@ void baro_bmp_event( void ) {
|
||||
if (bmp_b7 < 0x80000000)
|
||||
bmp_p = (bmp_b7 * 2) / bmp_b4;
|
||||
else
|
||||
bmp_p = (bmp_b7 * bmp_b4) * 2;
|
||||
bmp_p = (bmp_b7 / bmp_b4) * 2;
|
||||
bmp_x1 = (bmp_p / (1<<8)) * (bmp_p / (1<<8));
|
||||
bmp_x1 = (bmp_x1 * 3038) / (1<<16);
|
||||
bmp_x2 = (-7357 * bmp_p) / (1<<16);
|
||||
|
||||
Reference in New Issue
Block a user