Commit Graph

17 Commits

Author SHA1 Message Date
Andrew Tridgell 44755bf3ce AP_Baro: improved barometer averaging
this changes the barometer calculations to floating point. On a MS5611
this is actually about twice as fast as the previous 64 bit
calculations, but gains us more accuracy as we are able to take
advantage of sub-bit precision when we average over 8 samples.
2012-07-06 15:11:30 +10:00
Andrew Tridgell 735c88e9b3 AP_Baro: added get_pressure_samples() interface
this returns how many samples were used to calculate the last pressure
2012-07-05 16:29:21 +10:00
Andrew Tridgell 53e950531e Baro: added get_altitude() and get_climb_rate() interfaces
this allows the barometer driver to calibrate and return altitude and
climb rate values. This will be used by the AHRS drift correction code
for vertical velocity

The climb rate uses a 5 point average filter
2012-06-27 16:01:50 +10:00
rmackay9 dc58c8a905 AP_Baro - change data type size of temperature's average filter to int32_t (was int16_t) 2012-03-24 23:21:11 +09:00
rmackay9 f3eb15167c AP_Baro - removed unnecessary 2 element average filtering of pressure (there is a 4 or 5 element average filter in arducopter code itself, two places is messy)
- also removed unused _offset_press variable
2012-03-18 15:18:05 +09:00
rmackay9 ed0d1da4f5 AP_Baro - added average filter for temperature to replace broken filter
- added average filter (for last two values) for raw pressure
        - changed some "long" to int32_t and "unsigned long" to uint32_t
2012-03-18 01:06:02 +09:00
Jason Short 34cf1e8fb3 Updated on Barometer - increased the Temp filtering and decreased the pressure filtering to and get less temp noise, faster response from pressure. I'm filtering the Climb rate differently now, so this higher pressure noise should not hurt the derivative calcs at all now. 2012-03-06 20:55:35 -08:00
rmackay9 0311b70004 AP_Baro - fixed small compiler warning to do with order of parameters in constructor 2012-02-29 22:46:29 +09:00
Andrew Tridgell 817e7442bd baro: fixed an integer overflow issue at high altitudes
the averaging array was using 16 bit numbers, but we are storing
numbers with 19 significant bits. That caused overflow at high
altitude, and some very interesting altitude graphs!

Thanks to Michael Oborne for spotting this in a log
2012-01-14 19:51:35 +11:00
Andrew Tridgell a7a00a35ab AP_Baro: when I2c fails, don't retry for 1s 2012-01-04 16:35:16 +11:00
Andrew Tridgell 2960abf41f I2C: convert barometer library to new I2C library
this also adds a healthy attribute and error checking
2011-12-28 20:41:53 +11:00
Pat Hickey 3d882c4d49 AP_Baro : Add init( AP_PeriodicProcess * ) method to interface & implementations
AP_Baro_MS5611 and AP_Baro_BMP085 implement the interface, with stubs only
2011-12-11 15:21:10 -08:00
Pat Hickey d5386b8bb8 AP_Baro_BMP085: move apm2_hardware flag from init to constructor. 2011-12-11 15:21:10 -08:00
Pat Hickey 41ecb0fef4 AP_Baro_BMP085: Conform to AP_Baro interface. Make the rest private. 2011-12-11 15:21:09 -08:00
Pat Hickey e8e4881da8 AP_Baro_BMP085(+_HIL): Rename classes from APM_BMP085 to AP_Baro_BMP085. 2011-12-11 15:21:09 -08:00
Pat Hickey 917418994d BMP085 fix line endings 2011-12-11 15:21:09 -08:00
Pat Hickey 7b51a2c42a AP_Baro: move all APM_BMP085 files inside AP_Baro 2011-12-11 15:21:09 -08:00