Commit Graph

64 Commits

Author SHA1 Message Date
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