Commit Graph

284 Commits

Author SHA1 Message Date
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
Grant Morphett 312184dd13 AP_Baro: coverity fixes - add param init in constructor 2015-07-30 12:37:08 +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
Andrew Tridgell 282efe2d57 AP_Baro: fixed example to run accumulate at 50Hz 2015-07-10 09:59:35 +10:00
Andrew Tridgell 4368f922a3 AP_Baro: convert example from .pde to .cpp 2015-06-01 16:58:10 +10:00
Lucas De Marchi df5652fa87 AP_Baro: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:52 +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
Andrew Tridgell 7d9d594283 AP_Baro: fix for HAL_SITL rename 2015-05-05 09:45:55 +10:00
Randy Mackay 55298a4c73 Baro: fix example sketch 2015-05-02 17:25:44 +09: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
Tom Pittenger 4191c44bbd Baro: fix compile warning re member init order 2015-04-24 14:15:11 +09:00
Andrew Tridgell 2e9d2e6449 AP_Baro: load only HIL backend for hil_mode 2015-03-13 22:52:55 +11:00
Andrew Tridgell d040318014 AP_Baro: removed unused define 2015-03-13 18:46:17 +11:00
Randy Mackay 4e7d92094c Baro: remove glitch detection 2015-03-13 16:40:29 +09:00
Andrew Tridgell 1f70b34cbc AP_Baro: fixed baro startup on PXF cape 2015-03-13 13:48:41 +11:00
Andrew Tridgell beeb9173ea AP_Baro: change for new PX4 paths 2015-02-14 12:25:43 +11:00
Andrew Tridgell ac3dd87790 AP_Baro: added hil_mode support 2015-02-10 09:53:30 +11:00
Randy Mackay bb4204c045 Baro: fix example sketch 2015-01-28 17:15:37 +09: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 3320dfd7fa AP_Baro: fixed ms5611 spelling error 2015-01-09 11:59:49 +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 197c09fcd8 AP_Baro: added num_instances() API 2015-01-09 11:50:56 +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
Staroselskii Georgii 43c88c37eb AP_Baro: fixed MS5611 initialisation in order to get rid off conflicts with other I2C devices 2015-01-07 08:41:13 +11:00
Randy Mackay ddda0d52ce Baro: reorder declaration to fix compiler warning
No functional change
2014-12-11 13:06:24 +09:00
Andrew Tridgell e45522f51d AP_Baro: fixed example build 2014-11-28 10:40:43 +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
Andrew Tridgell 8b794602d1 AP_Baro: make get_temperature() a const function 2014-11-12 13:36:01 +11:00
Randy Mackay 67690553c5 BaroGlitch: add reset method 2014-11-09 13:34:15 -08:00
Randy Mackay 3a81732721 Baro: minor param description updates 2014-10-14 12:42:27 +09:00
Andrew Tridgell 5280d8936d AP_Baro: remove usage of hrt_absolute_time()
use a single time base in all code
2014-08-20 08:41:15 +10:00
Andrew Tridgell d01fa3bfbd AP_Baro: prevent reading the MS5611 too fast
setup the timer start after we've started the conversion to prevent
reading faster than the MS5611 is able to produce values
2014-08-19 21:16:13 +10:00
Randy Mackay fd5dee96e4 BaroGlitch: check baro health after alt calculation
Also correct type of distance_cm internal variable
2014-08-14 16:03:33 +09:00
Randy Mackay 424a65663a Baro: init members to resolve compiler warning 2014-08-14 16:03:30 +09:00
Randy Mackay 53b073148b BaroGlitch: use baro healthy() 2014-08-14 16:03:21 +09:00
Randy Mackay 78b1bf8282 Baro: example sketch to use healthy() function 2014-08-14 16:03:15 +09:00
Randy Mackay 76634ee8c3 Baro_PX4: use healthy flag 2014-08-14 16:03:12 +09:00
Randy Mackay d29fe51cb3 Baro_VRBrain: use healthy flag 2014-08-14 16:03:09 +09:00
Randy Mackay 24db492131 Baro_MS5611: use healthy flag 2014-08-14 16:03:06 +09:00
Randy Mackay 72f6985bd8 Baro_HIL: use healthy flag 2014-08-14 16:03:04 +09:00
Randy Mackay fdb38dec5f Baro_BMP085: use healthy flag 2014-08-14 16:03:02 +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
Randy Mackay af28b74944 Baro_BMP085: init members to resolve compiler warnings 2014-08-14 11:27:29 +09:00
Andrew Tridgell a400cbc922 AP_Baro: fixed example build 2014-08-13 21:46:14 +10:00
Mikhail Avkhimenia 83bbee491c AP_Baro_MS5611: add address switch for Navio board 2014-08-12 22:09:29 +10:00
Randy Mackay 5d4e019397 BaroGlitch: increase max accel to 15m/s/s 2014-08-09 15:47:52 +09:00
Andrew Tridgell 6ebff35fe2 AP_Baro: don't include I2C MS5611 on APM1 either 2014-08-03 17:17:20 +10:00
Randy Mackay fe24721218 BaroGlitch: increase default ok distance to 5m
When taking off some copters hove a sudden baro altitude dip of 4m
2014-08-02 11:43:06 +09:00
Randy Mackay c68d4fdfcb BaroGlitch: init members to resolve compiler warning 2014-08-01 14:07:34 +09:00
Randy Mackay 728da12441 BaroGlitch: remove debug 2014-07-29 22:05:09 +09:00
Andrew Tridgell c538cc0665 AP_Baro: fixed example build 2014-07-29 21:04:26 +10:00
Randy Mackay 2289b98d34 Baro_Glitch: initial version of baro glitch protection
Based on GPS Glitch protection library
2014-07-28 22:16:12 +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 2b3d17d955 AP_Baro: fixed APM1 build 2014-07-14 09:50:17 +10:00
Andrew Tridgell be02f0c34f AP_Baro: work around occasional 0 values from MS5611
this was seen on the PXF board. It isn't yet known why it happens
2014-07-14 09:44:36 +10:00
Andrew Tridgell b0ab2671cd AP_Baro: removed old device specific example code
not needed any more
2014-07-14 09:44:36 +10:00
Andrew Tridgell 028e2e34f1 AP_Baro: added generic baro test sketch 2014-07-14 09:44:36 +10:00
Andrew Tridgell f73ec95c39 AP_Baro_MS5611: added PROM CRC checking
disabled on APM2 to save flash space
2014-07-14 09:44:35 +10:00
Víctor Mayoral Vilches 8a85f8d6d2 AP_Baro_MS5611_test: Add HAL specific code. 2014-07-14 09:29:53 +10:00
Víctor Mayoral Vilches de58df6371 AP_Baro_MS5611_test: Add block for APM2-code 2014-07-14 09:29:45 +10:00
Víctor Mayoral Vilches 9797867067 AP_Baro_MS5611: Fix the test code so that compiles.
Add HAL_BOARD_LINUX and HAL_BOARD_ERLE compatibility.
2014-07-14 09:02:47 +10:00
Andrew Tridgell 74c3b404ee AP_Baro: avoid some float conversion warnings 2014-07-08 20:26:54 +10:00
Andrew Tridgell e118984c26 AP_Baro: save some flash and memory on APM2
we don't need the I2C MS5611 driver
2014-07-08 14:21:42 +10:00
Andrew Tridgell 3705c90b8e AP_Baro: fix for HAL_GPIO_* 2014-06-02 10:42:36 +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
Emile Castelnuovo f4784fe6a1 AP_Baro: new files for VRBRAIN board 2014-04-08 16:19:19 +10:00
Andrew Tridgell d3d71d597c AP_Baro: fixed example build 2014-03-19 12:14:05 +09:00
Andrew Tridgell 63234d4c22 AP_Baro: fixed linux build of BMP085 driver 2014-03-07 09:33:43 +11:00
Andrew Tridgell b2bd81f262 AP_Baro: added alternative setHIL interface
uses pressure and temperature for better log replay
2014-02-18 09:25:07 +11:00
Andrew Tridgell 3af38a778d AP_Baro: fixed example build 2014-02-15 06:40:15 +11:00
Randy Mackay bb715424ee Baro: fix BMP085 example sketch 2014-02-15 06:09:08 +11:00
Andrew Tridgell 6964529124 AP_Baro: _calculate can be private 2014-02-15 05:48:24 +11: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 42eba615b4 AP_Baro: fixed example build 2013-12-17 11:51:37 +11:00
Andrew Tridgell 6c2e392d5d AP_Baro: fixed BMP085 examples build in autotest 2013-11-23 18:50:55 +11:00
Andrew Tridgell 8a65a729f3 AP_Baro: start MS5611 at high speed 2013-11-07 12:48:17 +11:00
Tobias 7855d242c7 AP_Baro: add time-unit comment 2013-10-27 13:39:23 +09:00
Andrew Tridgell 3393a5c99e AP_Baro: prevent a race condition in the SITL baro driver 2013-10-17 17:22:19 +11:00
Andrew Tridgell d60a68fd9c AP_Baro: check baro at exactly 100Hz
prevent waits for samples
2013-10-13 11:02:53 +09:00
Andrew Tridgell 6fa55d101f AP_Baro: fixed I2C semaphore handling for BMP085 driver 2013-10-08 11:50:54 +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 c04d9b0c03 AP_Baro: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell 8a699f6189 AP_Baro: enable BMP085 on Linux 2013-09-28 22:04:15 +10:00
Andrew Tridgell 20b1131059 AP_Baro: use new scheduler API 2013-09-28 21:24:03 +10:00
Mike McCauley e3c20f06ac AP_Baro: Chnages to flymaple port.
Flymaple has no EOC pin
2013-09-24 13:33:25 +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 517c44bbaa AP_Baro: fixed example build 2013-08-30 13:01:36 +10:00
Andrew Tridgell 395739dded AP_Baro: simplify PX4 driver
we can now rely on queueing in NuttX driver
2013-08-30 13:01:34 +10:00