Lucas De Marchi
5472bc4de1
Global: change Device::PeriodicCb signature
...
Remove bool return as it's never being used and not supported on PX4.
8 years ago
Andrew Tridgell
bedee31f61
AP_Baro: fixed semaphore and thread usage in baro drivers
8 years ago
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
8 years ago
Lucas De Marchi
3c7d80a270
AP_Baro: BMP085: use a moving average of 10 samples in BMP085
...
Instead of depending on the frequency accumulate() is called, use
AverageIntegralFilter with 10 samples. The data obtained by BMP085 is
too noisy with any value of OVERSAMPLING so use twice the number of
samples as currently used. Besides that now we are sure there's always
10 samples used in the average.
9 years ago
Lucas De Marchi
8da5275b03
AP_Baro: BMP085: don't average temperature in BMP085
...
The temperature readings is not subject to white noise so there's no
point in averaging its reading. Moreover since for a normal 50Hz
accumulate() / 10Hz update() it would read temperature only once per
update(), it's pointless to keep averaging and introducing rounding
error.
The temperature doesn't need to be checked as frequent as pressure, too.
The datasheet even suggests on section 3.3, page 10 to enable standard
mode and read the temperature at 1Hz. Here we reduce it to 2Hz
(considering the accumulate() function being called at 50Hz).
9 years ago
Lucas De Marchi
c5c52076ca
AP_Baro: BMP085: rename private member
9 years ago
Lucas De Marchi
e40b88aa70
AP_Baro: BMP085: use DigitalSource interface in BMP085
...
Use the DigitalSource interface rather than going through the "static"
interface hal.gpio provides
9 years ago
Lucas De Marchi
b05954660a
AP_Baro: BMP085: use I2CDevice interface
9 years ago
Lucas De Marchi
8eee888b3e
AP_Baro: BMP085: move data-ready macro to a method
9 years ago
Lucas De Marchi
c5e97129c1
AP_Baro: BMP085: follow coding style
...
- Spacing changes and variable renames to follow coding style
- No need to initialize variables to 0, it's already done by our
global new operator.
9 years ago
Lucas De Marchi
81a298c9c8
AP_Baro: reduce header scope
...
We don't need to expose to other libraries how each backend is
implemented. AP_Baro.h is the main header, included by other libraries.
Instead of including each backend in the main header, move them to where
they are needed. Additionally standardize the order and how we include
the headers.
The advantages are:
- Internals of each backend is not exposed outside of the
library
- Faster incremental builds since we don't need to recompile
whoever includes AP_Baro.h because a backend changed
9 years ago
Andrew Tridgell
f1891cea1f
AP_Baro: BMP085 driver done, but untested
10 years ago
Andrew Tridgell
5bb57a31f7
AP_Baro: split into frontend/backend
...
this allows for support of multiple sensors on a board
10 years ago
Andrew Tridgell
8b794602d1
AP_Baro: make get_temperature() a const function
10 years ago
Randy Mackay
af28b74944
Baro_BMP085: init members to resolve compiler warnings
11 years ago
Mike McCauley
e3c20f06ac
AP_Baro: Chnages to flymaple port.
...
Flymaple has no EOC pin
12 years ago
Andrew Tridgell
fc119d9b80
AP_Baro: cleaned up temperature and pressure units
...
thanks to Mike McCauley for pointing this out
12 years ago
Andrew Tridgell
8ceabc97f1
AP_Baro: added accumulate() function
...
this allows us to read the BMP085 much faster
12 years ago
Andrew Tridgell
4a54ffb523
Baro: use local include to reduce boilerplate
12 years ago
Andrew Tridgell
dbd9814327
AP_Baro: get rid of apm2_hardware parameter in init
12 years ago
Pat Hickey
5d40074e4e
AP_Baro: port to AP_HAL
12 years ago
uncrustify
cfcef93e16
uncrustify libraries/AP_Baro/AP_Baro_BMP085.h
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
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
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
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
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
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
7ba744a11a
I2C: convert barometer library to new I2C library
...
this also adds a healthy attribute and error checking
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
Pat Hickey
f0ab0318b3
AP_Baro_BMP085: Conform to AP_Baro interface. Make the rest private.
13 years ago
Pat Hickey
f445ec1242
AP_Baro_BMP085(+_HIL): Rename classes from APM_BMP085 to AP_Baro_BMP085.
13 years ago
Pat Hickey
7032c32b42
BMP085 fix line endings
13 years ago
Pat Hickey
7ef146044e
AP_Baro: move all APM_BMP085 files inside AP_Baro
13 years ago
Andrew Tridgell
02f25ac36d
libraries: rename purple to APM2
13 years ago
Pat Hickey
2d8ce38aeb
barometer: add purple_hardware option to Init()
...
this allows selection of right hardware at Init() time
13 years ago
Jason Short
6f3b56b38f
increased filter
13 years ago
Jason Short
afef359aec
Upped pressure filter a bit
13 years ago
Jason Short
9c4ad5f7ff
Baro
...
Minimized the baro filtering to use a new approach to rate control. Redid the state machine so the temp is sampled more often.
13 years ago
James Goppert
5770be6dc6
Fixed APO examples.
13 years ago
Michael Oborne
7ef51f723d
Sensor hil fix's
14 years ago
Jason Short
d29cfbcee3
Integration of optical flow
...
bug fixes for new Simple mode
increased Baro filter by 2 fields
14 years ago
jasonshort
363abab14e
Changed bit shifts to division, relying on the compiler.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3265 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
jasonshort
694bfc5b87
Added two filters to the RawTemp and RawPress values to increase accuracy from noisy temp sensor.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3242 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
jasonshort
2651cadb84
Adjusted the state machine to read the temperature less often (from twice a second to every 4 seconds). Added a small smoothing filter.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2552 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago