Andrew Tridgell
e5846bd965
AP_Baro: removed _sync_access check
...
this isn't needed as the common variables are already protected by
cli()/sei()
13 years ago
uncrustify
4cd6657f70
uncrustify libraries/AP_Baro/AP_Baro_BMP085_hil.h
13 years ago
uncrustify
fa90f0b80f
uncrustify libraries/AP_Baro/AP_Baro.h
13 years ago
uncrustify
1196285266
uncrustify libraries/AP_Baro/AP_Baro_MS5611.h
13 years ago
uncrustify
cfcef93e16
uncrustify libraries/AP_Baro/AP_Baro_BMP085.h
13 years ago
uncrustify
5a99d6b697
uncrustify libraries/AP_Baro/AP_Baro_BMP085.cpp
13 years ago
uncrustify
b0003c020f
uncrustify libraries/AP_Baro/AP_Baro_MS5611.cpp
13 years ago
uncrustify
b39411e8d4
uncrustify libraries/AP_Baro/AP_Baro_BMP085_hil.cpp
13 years ago
uncrustify
6f02a645c3
uncrustify libraries/AP_Baro/AP_Baro.cpp
13 years ago
uncrustify
12497c51b5
uncrustify libraries/AP_Baro/examples/AP_Baro_MS5611_test/AP_Baro_MS5611_test.pde
13 years ago
uncrustify
fce9044fb4
uncrustify libraries/AP_Baro/examples/AP_Baro_BMP085_test/AP_Baro_BMP085_test.pde
13 years ago
Andrew Tridgell
c9ba693e1f
AP_Baro: the HIL baro needs to inherit calibrate() from the parent class
...
this was what caused the renorm errors
13 years ago
Andrew Tridgell
034fb5b194
APM: fixed hil build
13 years ago
Andrew Tridgell
518d6365ff
AP_Param: update remaining libraries for new constructor syntax
13 years ago
Andrew Tridgell
a7b9aff79f
AP_Baro: the DerivativeFilter now handles duplicate data
...
this saves a few bytes of memory
13 years ago
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.
13 years ago
Andrew Tridgell
3c7e521f70
AP_Baro: update MS5611 test to use baro library altitude
13 years ago
Andrew Tridgell
209136386b
AP_Baro: added get_pressure_samples() interface
...
this returns how many samples were used to calculate the last pressure
13 years ago
Andrew Tridgell
185c6e5b32
AP_Baro: change to a 7 point DerivativeFilter for climb rate
13 years ago
Andrew Tridgell
f9fc7aafe7
AP_Baro: use DerivativeFilter in barometer climb rate
13 years ago
Andrew Tridgell
9f8703274c
AP_Baro: show climb rate in baro test sketch
13 years ago
Andrew Tridgell
057eb5e6f6
Baro: average over all pressure/temperature samples on MS5611
...
this allows us to use the MS5611 barometer at its full 100Hz sample
rate (80Hz for pressure, 20Hz for temperature). The pressure and
temperature values are averaged between reads without adding any
latency. Previously the driver would throw away values between
readings
This also fixes a race condition in reading from the SPI bus that
could lead to bad values from the barometer
13 years ago
Andrew Tridgell
f70cd71791
Baro: fixed build of MS5611 test code
13 years ago
Andrew Tridgell
5bccfbd94c
Barometer: fixed airstart for APM
...
we need to re-load the ground pressure and temperature from eeprom on
and airstart
13 years ago
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
13 years ago
rmackay9
5c9dc00ae2
AP_Baro: fixed comment to clarify that every-other call updates temperature or pressure
13 years ago
Andrew Tridgell
88b2139d91
Baro: added suspend/resume on init
13 years ago
rmackay9
2d65ec2874
AP_Baro - change data type size of temperature's average filter to int32_t (was int16_t)
13 years ago
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
13 years ago
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
13 years ago
Jason Short
486c56ce41
Consolidated Barometer pressure sensing to a single filter based on Randy's new filter class.
13 years ago
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.
13 years ago
rmackay9
d81c951849
AP_Baro - fixed small compiler warning to do with order of parameters in constructor
13 years ago
justinbeech
62b104cbfa
Found free extra 256 bytes of RAM eliminate _clz use from libgcc
...
Believe it or not, changing / 2^31 to >>31 saved 256 bytes in the "d" segment.
The reason is that GCC version prior to 4.3.5 does not have a count_leading_zeros (clz) assembler macro, so it uses a 256 byte lookup table called _clz
The _clz table gets pulled in if you do 64 bit division.
This tiny change is the only place that we do long long division.
Changing to a shift saves 256 bytes of ram.
13 years ago
Jason Short
026e4a6567
change constant to float 44330.0
13 years ago
Andrew Tridgell
804332c340
AP_Baro: fixed some signed/unsigned warnings
...
and a potential bug on timer wrap
13 years ago
justinbeech
69f1613f2c
Uncommented cold temp compensation after testing. Fixed read throttle so read rate ends up nailing 100hz, not 90hz. minor commenting improvements.
13 years ago
Randy Mackay
b7ce7bfe18
Arduino 1.0 - small fix to make AP_Baro_MS5611_test.pde compile under Arduino 1.0
13 years ago
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).
13 years ago
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
13 years ago
Andrew Tridgell
9fb3b13af3
AP_Baro: when I2c fails, don't retry for 1s
13 years ago
Andrew Tridgell
074fd31506
Baro: fixed MS5611 example sketch
13 years ago
Andrew Tridgell
f871235480
Baro: show timing in baro test
13 years ago
Andrew Tridgell
7ba744a11a
I2C: convert barometer library to new I2C library
...
this also adds a healthy attribute and error checking
13 years ago
Andrew Tridgell
e7720254dd
AP_Baro: update MS5611 driver for new ap_proceduce prototype
...
this saves calling millis() quite so often
13 years ago
Andrew Tridgell
bb0f179495
AP_Baro: fixed temperature on MS5611
...
this caused a 2x scaling of altitude
13 years ago
Andrew Tridgell
3648c81dd9
barometer: fixed HIL barometer build
13 years ago
Pat Hickey
f4aaa56b16
AP_Baro_MS5611: Asynchronous operation, plus c++ style changes.
...
Yeah, I know this was a big change to make all at once.
13 years ago
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
13 years ago
Pat Hickey
a626e21e98
AP_Baro_BMP085: move apm2_hardware flag from init to constructor.
13 years ago