Andrew Tridgell
5a6831b606
AP_Baro: allow ICM-20789 on SPI or I2C
2018-02-08 17:36:33 +11:00
Andrew Tridgell
a3dabf3c55
AP_Baro: enable 20789 baro on F412
2018-02-08 17:36:33 +11:00
Andrew Tridgell
472eed3847
AP_Baro: enable use of pressure correction
...
this allows for temperature correction of baro pressure
2018-02-08 17:36:33 +11:00
Andrew Tridgell
b2172a0475
AP_Baro: support PCNC1
2018-02-08 17:36:33 +11:00
Andrew Tridgell
bf67153791
AP_Baro: implement ICM20789 barometer
2018-02-08 17:36:33 +11:00
LukeMike
d48f9397d0
VRBRAIN / AP_Baro: added barometer sensor init for VR Brain boards
2018-02-05 08:26:49 +11:00
Andrew Tridgell
5846558b0e
AP_Baro: moved constants to AP_Math/definitions.h
2018-01-16 07:14:20 +11:00
rde-mato
787420931e
AP_Baro: make AP_Baro a singleton
...
for AP_Airspeed
2018-01-16 07:14:20 +11:00
Andrew Tridgell
51f9f087ab
AP_Baro: support MindPX-v2
2018-01-15 11:46:02 +11:00
Andrew Tridgell
0b6659b36a
AP_Baro: support ChibiOS FMUv4
2018-01-15 11:46:02 +11:00
Andrew Tridgell
c8c563f90d
AP_Baro: support ChibiOS
2018-01-15 11:46:02 +11:00
Pierre Kancir
14b5c8a6c4
AP_Baro: don't include vehicle specific baro by default
2017-12-27 15:13:30 +00:00
liorosh
f2b7dc74d7
AP_Baro: Adding a new LPS25H Barometer driver
...
The following is a Barometer sensor driver for the LPS25H Barometer that
is integrated in the 96Boards STM32 Sensor mezzanine board.
the update includes the .cpp and .h files of the driver as well as the
updates required in AP_Baro.cpp.
2017-09-16 21:08:06 +10:00
Jacob Walser
a08da4ecc4
AP_Baro: New AP_Baro_Keller device driver
2017-08-29 08:08:16 -04:00
Kevin Lopez Alvarez
18dab4829a
AP_Baro: initial FMUv4pro support
2017-07-24 13:45:37 +10:00
Michael du Breuil
6b60c110a5
AP_Baro: Improve GND_TEMP parameter docs
2017-07-16 20:22:00 +01:00
Michael du Breuil
f14667225d
AP_Baro: Avoid a FPE when ground pressure is negative
2017-07-15 10:49:16 +09:00
Peter Barker
1748e7cb0c
AP_Baro: make backends responsible for setting their health
...
This resolves a problem in SITL where the barometer would
not change value for prolonged period of time, making it
go unhealthy
2017-07-14 07:28:48 +09:00
Randy Mackay
6982e58cf2
Baro: health check that values are changing
2017-07-08 08:40:19 +09:00
Eugene Shamaev
6e6efa7e1b
AP_Baro: enumeration and multiple interfaces support
2017-07-03 11:44:32 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
ed916327fc
AP_Baro: Use SI units conventions in parameter units
...
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Andrew Tridgell
9bdf971336
AP_Baro: added set_pressure_correction()
...
for use by AP_TempCalibration
2017-05-03 20:12:04 +10:00
Andrew Tridgell
ee4161fa62
AP_Baro: moved SITL baro to standard sensor backend model
2017-05-03 20:12:04 +10:00
Andrew Tridgell
cbea29ad71
AP_Baro: use sensor_config_error()
2017-05-03 11:37:01 +10:00
Jacob Walser
96f503d9d1
AP_Baro: Fix GND_EXT_BUS @Values formatting
2017-04-21 21:11:40 +01:00
Eugene Shamaev
fd866d3e20
AP_Baro: removal of legacy UAVCAN support
2017-04-17 17:27:18 +10:00
Eugene Shamaev
331419a51e
AP_Baro: support for UAVCAN connected barometers
2017-04-10 22:38:12 +01:00
Michael du Breuil
c37209a8d5
AP_Baro: Limit ground temperature used for the altitude
...
Fix an incorrect EAS2TAS that was double counting altitude
2017-03-28 11:25:46 +11:00
Tom Pittenger
fb24a03faf
AP_Baro: don't compile drivers for devices that don't use them
2017-03-24 12:06:19 +11:00
Lucas De Marchi
00c2949dfb
Add support for baro on aerofc
2017-03-24 12:06:19 +11:00
Andrew Tridgell
d5cad2ae44
AP_Baro: support AUAV21 board
2017-03-01 17:24:10 +11:00
Tom Pittenger
fb214ef95f
AP_Baro: fixed spelling in comment
2017-02-21 02:23:23 -08:00
Jacob Walser
613bc46592
AP_Baro: Add support for water pressure and Sub
2017-02-21 11:26:14 +11:00
mirkix
1ce5e5360a
AP_Baro: Add Bosch BMP280 driver
2017-01-14 12:52:07 +11:00
murata
753638851e
AP_Baro: Changed if statements to switch statement.
2016-12-20 14:13:47 +00:00
Andrew Tridgell
eea7758a63
AP_Baro: added GND_EXT_BUS option
...
this is needed to enable probing for a MS5611 on external I2C bus. The
MS5611 looks the same as a MS5525 airspeed sensor, so we can't just
auto-probe. Users will need to enable external barometers
2016-12-05 16:51:49 -08:00
Andrew Tridgell
f2246326bb
AP_Baro: added MS5611 probing, and support 3 baros on Pixhawk2
...
this adds sensor probing for barometers, simplifies the MS5611 driver,
and adds support for the I2C external barometers on Pixhawk2
2016-11-25 21:40:11 +11:00
Andrew Tridgell
41b132e576
AP_Baro: setup for new board PX4 IDs
2016-11-11 08:08:55 +11:00
Andrew Tridgell
d716bbedee
AP_Baro: use in-tree drivers for PH2SLIM
2016-11-10 11:44:52 +11:00
Andrew Tridgell
b8c789cf35
AP_Baro: switch pixracer to always use in-tree drivers
2016-11-09 17:08:14 +11:00
Andrew Tridgell
565f1986e0
AP_Baro: fixed FMUv1 baro and enable in-tree driver for PHMINI
2016-11-09 17:08:13 +11:00
Andrew Tridgell
66026100c3
AP_Baro: enable dual baro on PH2
2016-11-09 17:08:03 +11:00
Andrew Tridgell
72c2e3a4d5
AP_Baro: select in-tree vs PX4 drivers at runtime
2016-11-09 17:07:58 +11:00
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Peter Barker
dbecb1bc25
AP_Baro: add missing parameter metadata
2016-10-27 09:15:03 -07:00
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.
2016-10-24 09:42:01 -02:00
Lucas De Marchi
929348ff75
AP_Baro: MS5611: always use timer thread
...
Remove support to run MS5611 on main thread since we shouldn't be doing
I2C transactions there and we are moving to "thread per bus"
nonetheless.
2016-07-30 00:55:28 -03:00
Tom Pittenger
84ce499a0d
AP_Baro: remove zero-init in constructor
2016-07-11 22:11:34 -07:00
Tom Pittenger
1d81df8144
Revert "AP_Baro: coverity scan - variables not initialized in constructor"
...
This reverts commit 8d2872d3ab
.
2016-07-11 22:02:41 -07:00
Tom Pittenger
8d2872d3ab
AP_Baro: coverity scan - variables not initialized in constructor
2016-07-05 13:32:06 -07:00
Tom Pittenger
d55050e5e3
AP_Baro: slow down the LPF for slewing to a new GND_ALT_OFFSET
...
Instead of a couple seconds, make it about 15sec. This makes TECS happy by not glitching the height demand as much. When applied too fast the TECS height demand causes a large single oscillation as it chases the filter lag.
2016-05-13 17:15:53 -07:00
Andrew Tridgell
8b7bf5cf7a
AP_Baro: allow setHIL to set last update time
2016-05-07 18:27:21 +10:00
Andrew Tridgell
0b71652afc
AP_Baro; allow for exact replay of baro data
2016-05-07 18:27:20 +10:00
Don Gagne
cae7ea0d13
Add @Volatile, @ReadOnly support
2016-03-17 10:58:05 +11:00
Andrew Tridgell
0a72c2bbd5
AP_Baro: prevent bad ground pressure from making a board unbootable
2016-02-23 16:34:06 +11:00
Lucas De Marchi
f1ade970a3
AP_Baro: MS5611: Use AP_HAL::Device abstraction
...
This allows to share almost all the I2C/SPI code and remove the
AP_Serial abstraction since that is now handled by AP_HAL itself.
2016-02-16 19:49:09 -02:00
Lucas De Marchi
b05954660a
AP_Baro: BMP085: use I2CDevice interface
2016-02-16 19:49:09 -02:00
Tom Pittenger
f435c5ee50
AP_Baro: tolerate GND_ALT_OFFSET step inputs
...
large inputs make the EKF angry, this will allow the param update to slew over a few seconds
2016-02-08 21:13:58 -08:00
Andrew Tridgell
ff44a63007
AP_Baro: added QURT driver
2015-12-27 16:21:25 +11:00
Andrew Tridgell
1f4e503d91
AP_Baro: added qflight driver
2015-12-27 16:12:27 +11:00
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
2015-12-02 10:40:50 +11:00
Caio Marcelo de Oliveira Filho
5a280838f8
AP_Baro: use millis/micros/panic functions
2015-11-20 12:29:31 +09:00
Andrew Tridgell
840c9e65bb
AP_Baro: don't notify the GCS of new pressure reference too often
2015-11-09 14:34:07 +11:00
Peter Barker
1b13315092
AP_Baro: notify GCS of calibration
2015-11-09 09:23:20 +11:00
Lucas De Marchi
8eef58a8c2
AP_Baro: remove check for AVR CPUs
...
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:14 +11:00
Lucas De Marchi
831d8acca5
Remove use of PROGMEM
...
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:
git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'
The 2 commands were done so we don't leave behind spurious spaces.
AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi
2c38e31c93
Remove use of PSTR
...
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.
This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.
AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Lucas De Marchi
386547427d
AP_Baro: support MS5611 on second i2c bus
2015-10-22 12:04:52 +11:00
José Roberto de Souza
c53e9d1ff0
AP_Baro: Fix typo
2015-10-16 10:05:03 +11:00
José Roberto de Souza
9a98eb35fc
AP_Baro: Add MS5637 over I2C to init()
2015-10-16 10:05:03 +11:00
Andrew Tridgell
a5462fec0b
AP_Baro: allow selection of primary barometer and add 3rd baro
...
this is useful for external I2C barometers on a PH2
2015-09-14 14:27:41 +10:00
Tom Pittenger
749c0c190f
AP_Baro - fix BARO_ALT_OFFSET param
...
This param seems to have been un-implemented. This is putting it back in. Adds a meter offset to the calculated altitude form the baro sensors.
Also changes it from int8 to float
2015-08-26 13:16:05 +10:00
Gustavo Jose de Sousa
f18802bc46
AP_Baro: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
2015-08-11 16:28:42 +10:00
Randy Mackay
5732a6a144
Baro: update climb rate only if healthy
2015-07-29 16:32:49 +09:00
Julien BERAUD
d407737434
AP_Baro: added MS5607 support
2015-07-10 16:46:29 +10:00
ziltoid2
23787cf695
AP_Baro: use ground_temperature instead of calibration_temperature for alt calculation
2015-05-20 11:42:21 +10:00
Andrew Tridgell
48fb7f8159
AP_BARO: revert AP_Math class change
2015-05-05 13:27:05 +10:00
Tom Pittenger
0b29848277
AP_Baro: compiler warnings: apply is_zero(float) or is_equal(float)
2015-05-05 13:26:56 +10:00
Randy Mackay
1b381b5675
Baro: get_air_density_ratio gets div-by-zero check
2015-04-29 14:36:20 +09:00
Jonathan Challinger
f381ef93e8
AP_Baro: add get_air_density_ratio
2015-04-29 14:36:10 +09:00
Andrew Tridgell
2e9d2e6449
AP_Baro: load only HIL backend for hil_mode
2015-03-13 22:52:55 +11:00
Andrew Tridgell
1f70b34cbc
AP_Baro: fixed baro startup on PXF cape
2015-03-13 13:48:41 +11:00
Andrew Tridgell
ac3dd87790
AP_Baro: added hil_mode support
2015-02-10 09:53:30 +11:00
Randy Mackay
c93e7a69a7
Baro: init external_temperature in constructor
2015-01-12 13:56:35 +09:00
Andrew Tridgell
b1d8df3d54
AP_Baro: only allow calibrated sensors to be used
2015-01-09 12:59:01 +11:00
Andrew Tridgell
0a8677b3e2
AP_Baro: fixed build after rebase with all_healthy()
2015-01-09 11:51:52 +11:00
Andrew Tridgell
1c2a6deaaf
AP_Baro: added all_healthy() method
2015-01-09 11:51:51 +11:00
Andrew Tridgell
8359c082ca
AP_Baro: fixed baro on NavIO
...
don't use the 1kHz timer as it conflicts with other I2C devices
2015-01-09 11:51:51 +11:00
Andrew Tridgell
f1891cea1f
AP_Baro: BMP085 driver done, but untested
2015-01-09 11:50:54 +11:00
Andrew Tridgell
5bb57a31f7
AP_Baro: split into frontend/backend
...
this allows for support of multiple sensors on a board
2015-01-09 11:50:54 +11:00
Andrew Tridgell
d404cc6542
AP_Baro: add set_external_temperature()
...
this allows the use of an external temperature sensor for calibration
purposes, such as the sensor built in to the digital airspeed sensor.
The main affect this has is on the EAS2TAS calculation
The get_calibration_temperature() is used to choose either an external
temperature or an internal one. If an internal one is used then it is
clamped at no higher than 25 degrees C, to prevent hot electronics
on startup affecting altitude scaling and EAS2TAS
2014-11-12 13:36:01 +11:00
Randy Mackay
3a81732721
Baro: minor param description updates
2014-10-14 12:42:27 +09:00
Randy Mackay
330d883f97
Baro: add altitude sanity check
...
healthy flag made protected
healthy accessor fn added which also check latest calculated altitude
was ok
2014-08-14 16:02:59 +09:00
Randy Mackay
e9fbea9497
Baro: make get_altitude_difference const
2014-08-14 16:02:55 +09:00
Andrew Tridgell
a458f1bf5f
AP_Baro: minor improvements to Baro HIL code health check
2014-07-24 21:46:06 +10:00
Andrew Tridgell
74c3b404ee
AP_Baro: avoid some float conversion warnings
2014-07-08 20:26:54 +10:00
Andrew Tridgell
41dd280739
AP_Baro: expose get_altitude_difference()
...
this is useful for pressure altitude calculations
2014-04-11 16:34:02 +10:00
Andrew Tridgell
2cd781997f
AP_Baro: changed HIL driver to use floats and better handle starup
2014-02-15 05:48:18 +11:00
Andrew Tridgell
5e3c4441dc
AP_Baro: use HAL_CPU_CLASS in baro driver
2013-12-31 10:28:37 +11:00
Andrew Tridgell
487caea3a5
AP_Baro: added update_calibration() method
...
used for auto baro calibration when disarmed
2013-10-05 18:44:00 +10:00
Andrew Tridgell
fc119d9b80
AP_Baro: cleaned up temperature and pressure units
...
thanks to Mike McCauley for pointing this out
2013-09-21 21:30:41 +10:00
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell
5607c89df0
AP_Baro: use fabs() not abs()
...
thanks to Randy for spotting this
2013-08-30 13:01:33 +10:00
Andrew Tridgell
0f72401d8d
AP_Baro: added GND_ALT_OFFSET parameter
...
used for automatic barometric adjustment by a ground station equipped
with a barometer
2013-07-10 14:38:57 +10:00
Paul Riseborough
7bdb098e77
AP_Baro: added get_EAS2TAS()
...
this provides the scaling factor between equivalent and true airspeed
based on altitude
2013-07-04 16:56:56 +10:00
Andrew Tridgell
61361dac9b
AP_Baro: added units to baro documentation
2013-07-04 16:56:56 +10:00
Paul Riseborough
3b98bbd159
AP_Baro: more precise altitude calculation on PX4
...
if not using an AVR CPU then use a more computationally expensive
altitude calculation, which is more precise at higher altitudes
2013-07-04 16:56:56 +10:00
Randy Mackay
aa2b10f044
AP_Baro: TEMP parameter comment fix
2013-06-18 11:28:36 +09:00
James Bielman
4fa7bb1486
Add AVR compatibility header for missing math.h definitions.
...
- Define float versions of math functions to the double versions
on AVR (eg. #define sinf sin).
- These macros appear to be missing in older versions of avr-libs.
- Include AP_Math.h rather than math.h to get these definitions.
2013-01-16 13:52:17 +11:00
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Pat Hickey
d92e8045c1
AP_Baro: uses scheduler panic
2012-12-20 14:52:31 +11:00
Pat Hickey
60f7788be4
AP_Baro: robust calibration
2012-12-20 14:51:35 +11:00
Pat Hickey
5d40074e4e
AP_Baro: port to AP_HAL
2012-12-20 14:51:26 +11:00
uncrustify
6f02a645c3
uncrustify libraries/AP_Baro/AP_Baro.cpp
2012-08-21 19:00:18 -07:00
Andrew Tridgell
518d6365ff
AP_Param: update remaining libraries for new constructor syntax
2012-08-08 12:11:57 +10:00
Andrew Tridgell
a7b9aff79f
AP_Baro: the DerivativeFilter now handles duplicate data
...
this saves a few bytes of memory
2012-08-08 12:07:36 +10: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
185c6e5b32
AP_Baro: change to a 7 point DerivativeFilter for climb rate
2012-07-05 13:00:47 +10:00
Andrew Tridgell
f9fc7aafe7
AP_Baro: use DerivativeFilter in barometer climb rate
2012-07-05 13:00:46 +10:00
Andrew Tridgell
5bccfbd94c
Barometer: fixed airstart for APM
...
we need to re-load the ground pressure and temperature from eeprom on
and airstart
2012-06-27 16:01:50 +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