Commit Graph

70 Commits

Author SHA1 Message Date
uncrustify 5a99d6b697 uncrustify libraries/AP_Baro/AP_Baro_BMP085.cpp 2012-08-21 19:00:18 -07:00
Andrew Tridgell f501503eb0 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 c387edd74c 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 5c9dc00ae2 AP_Baro: fixed comment to clarify that every-other call updates temperature or pressure 2012-06-03 17:31:17 +09:00
rmackay9 01cc5fe938 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 7560242721 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 486c56ce41 Consolidated Barometer pressure sensing to a single filter based on Randy's new filter class. 2012-03-08 23:13:04 -08:00
Jason Short e57b91c2e2 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
Randy Mackay ed19c25a97 Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Andrew Tridgell 897d9a1c0b 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 9fb3b13af3 AP_Baro: when I2c fails, don't retry for 1s 2012-01-04 16:35:16 +11:00
Andrew Tridgell 7ba744a11a 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 d026e48032 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 a626e21e98 AP_Baro_BMP085: move apm2_hardware flag from init to constructor. 2011-12-11 15:21:10 -08:00
Pat Hickey f3ad7f3af8 Wire and SPI Init: move to sketch system.pde from libraries
* Wire.begin removed from AP_Baro_BMP085::init()
* SPI.begin  removed from AP_Baro_MS5611::init()
* SPI.begin  removed from AP_InertialSensor_MPU6000::hardware_init()

* Both Wire.begin and SPI.begin added very early in init_ardupilot in
  ArduCopter/system.pde and ArduPlane/system.pde
2011-12-11 15:21:10 -08:00
Pat Hickey 1bfab64543 AP_Baro_BMP085: Delete commented out code
* If its important to get old code back, thats why version control exists
2011-12-11 15:21:09 -08:00
Pat Hickey f3270b7f13 AP_Baro_BMP085: implement AP_Baro interface 2011-12-11 15:21:09 -08:00
Pat Hickey f445ec1242 AP_Baro_BMP085(+_HIL): Rename classes from APM_BMP085 to AP_Baro_BMP085. 2011-12-11 15:21:09 -08:00
Pat Hickey 7032c32b42 BMP085 fix line endings 2011-12-11 15:21:09 -08:00
Pat Hickey 7ef146044e AP_Baro: move all APM_BMP085 files inside AP_Baro 2011-12-11 15:21:09 -08:00