Commit Graph

351 Commits

Author SHA1 Message Date
ChrisBird d77906cb06 AP_Airspeed: This adds the ability to turn off and on the airspeed sensor if faulty. 2019-02-03 08:25:46 -08:00
Nathan E 0401078694 Update AP_Airspeed.cpp 2019-01-23 09:24:18 -07:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
TsuyoshiKawamura 8faadc2ebb AP_Airspeed: removed #include duplicates 2019-01-03 09:40:50 +09:00
DOMINATOR\Eugene d3eb24bc01 AP_Airspeed: Temperature conversion in consistence with other libraries 2018-11-19 17:31:12 +00:00
DOMINATOR\Eugene c81f9e6baa AP_Airspeed: update data with logging 2018-11-17 07:52:42 +11:00
Andrew Tridgell fe064a2d4e AP_Airspeed: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Michael du Breuil 88aa20d691 AP_Airspeed: Make user facing messages clearer, improve handling of bad tube order 2018-10-02 06:28:47 +10:00
liang.tang 653766c4cc AP_Airspeed: uavcan airspeed supported 2018-09-05 17:22:08 +10:00
liang.tang f4a8006333 AP_Airspeed: fix spd3x correct pressure issue 2018-09-02 16:38:51 -07:00
Michael du Breuil f2b4e06a1a AP_Airspeed: Add 5"H2O DLVR differential sensor driver 2018-08-08 09:07:17 +10:00
Michael du Breuil 6225f51815 AP_Airspeed: Remove APM doc references 2018-08-01 09:24:26 +10:00
Michael du Breuil fc44f693e5 AP_Airspeed: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil 57f3e9cd88 AP_Airspeed: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Andrew Tridgell 8a2f1fdb3d AP_Airspeed: fixed airspeed filtering issue
this fixes an issue where an airspeed sensor that becomes unhealthy
can have an undue effect after the sensor becomes healthy again.

In a recent flight log the MS4525 airspeed sensor went unhealthy for a
few seconds, and at the same time gave a reading of 12m/s. The plane
was flying at 24m/s. While the sensor was unhealthy the code correctly
switched to the airspeed estimate, which was fine.

When the airspeed sensor become healthy again the IIR filter in
AP_Airspeed meant that the speed read at 12m/s initially, then came up
to 24m/s over a couple of seconds. This caused the VTOL motors to come
on for a few seconds.
2018-06-14 09:13:30 +10:00
Michael du Breuil abd5bffda5 AP_Airspeed: Clean up some comments, prevent a potential out of range access 2018-05-29 00:10:40 +01:00
Patrick José Pereira 237101a50e AP_Airspeed: Use SSL air density
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-05-23 02:36:43 +01:00
Michael du Breuil f6624cc8b2 AP_Airspeed: Use named float wrapper 2018-05-17 00:59:45 +01:00
Peter Barker 30f944b921 AP_AirSpeed: notify of calibration start 2018-04-02 23:25:05 +01:00
Michael du Breuil a46c60f4de AP_Airspeed: Create a singleton 2018-03-21 13:36:35 +00:00
Tom Pittenger b1a4540359 Revert "AP_Airspeed: blending of several sensors and failure recognition"
This reverts commit 26c7614118.
2018-03-09 13:12:05 -08:00
Eugene Shamaev 26c7614118 AP_Airspeed: blending of several sensors and failure recognition 2018-03-09 11:27:20 -08:00
Peter Barker a7647e77d9 AP_Airspeed: fix compiler warnings
In file included from
../../libraries/AP_Airspeed/AP_Airspeed_SDP3X.cpp:21:
../../libraries/AP_Airspeed/AP_Airspeed_SDP3X.h:57:11: warning: private
field '_temperature' is not used [-Wunused-private-field]
    float _temperature;
          ^
../../libraries/AP_Airspeed/AP_Airspeed_SDP3X.h:58:11: warning: private
field '_pressure' is not used [-Wunused-private-field]
    float _pressure;
2018-03-02 09:26:37 +09:00
David Ingraham 2547ca399a AP_Airspeed: Fix ARSPD2_TYPE docs 2018-01-26 13:19:53 -08:00
Andrew Tridgell 58b0ac07ec AP_Airspeed: support dual airspeed sensors
allow for a primary and secondary airspeed sensor
2018-01-16 07:14:20 +11:00
rde-mato 87e3777f67 AP_Airspeed: added SDP3X airspeed sensor driver 2018-01-16 07:14:20 +11:00
Michael du Breuil 5fedc65efb AP_Airspeed: Allow specifying the MS5525 address 2018-01-10 17:49:35 +00:00
Andrew Tridgell 55f73f4163 AP_Airspeed: fixed timing errors in MS5525 driver
this fixes issue #7188, where we could read from the MS5525 sensor too
soon after requesting data and the result coming back would be garbage
2017-12-27 11:05:54 -08:00
Hiroshi Takey (hiro2233) fb5b6f2169 AP_Airspeed: Updated Airspeed example. 2017-12-26 14:57:58 +00:00
Andrew Tridgell 8c1cf9affe AP_Airspeed: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Peter Barker 1e512338f9 AP_AirSpeed: clarify comment 2017-11-23 10:40:30 +11:00
Lucas De Marchi 69b6d95cb2 global: use static method to construct AP_Board_Config{,_CAN} 2017-09-26 03:01:21 +01:00
Andrew Tridgell 2c68b5dac3 AP_Airspeed: fixed airspeed autocal
don't use negative pressures
2017-09-22 18:24:29 +10:00
Mark Whitehorn f32f51f843 AP_Airspeed: eliminate airspeed positive bias 2017-09-22 18:21:09 +10:00
Lucas De Marchi e2e836f676 AP_Airspeed: use FALLTHROUGH define
When falling through on a case switch, allow to add an empty statement
with the correct attribute to tell the compiler this behavior is
intended.
2017-08-22 23:59:13 -07:00
Francisco Ferreira d3ed4420e6
AP_Airspeed: remove unused MS4525D0_I2C_BUS macro 2017-08-05 03:15:52 +01:00
Vinicius Juvinski 78deddabda AP_Airspeed: MS4525: Add support to I2C Bus 2
BBBMini use I2C Bus number 2 and MS4525 just use up to bus 1, so I
addedd this bus 2 to address struct.
2017-08-05 03:15:32 +01:00
Peter Barker 3214b48f8c AP_AirSpeed: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Andrew Tridgell 7b73004882 AP_Airspeed: added ARSPD_USE=2 for gliders 2017-05-04 22:59:02 -07:00
Pierre Kancir 3f4a3e535b AP_Airspeed: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Andrew Tridgell 6ec32472c5 AP_Airspeed: average two readings for airspeed
given we're using it to check for errors, we may as well reduce analog
noise too
2017-04-04 08:40:31 +10:00
Michael du Breuil 4932a8b9ef Airspeed: Sanity check MS4525DO data, and utilize a double read 2017-04-01 11:19:39 +11:00
murata af65be5aa4 AP_Airspeed: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
murata 743d6e6db4 AP_Airspeed: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Lucas De Marchi f6a4a4dbe8 AP_Airspeed: MS5525: use common macros to deal with endianness
Instead of calling a special method in the device, just use be16toh()
which is implemented for all platforms in our special sparse-endian.h
file. It has the advantage of using a special type for different
endianness and makes no assumption we are running on LE.
2017-01-26 23:18:27 -08:00
Lucas De Marchi 5472bc4de1 Global: change Device::PeriodicCb signature
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
Tom Pittenger 84bdf15203 AP_Airspeed: updated comment to match PR 2016-12-05 17:19:57 -08:00
Andrew Tridgell 43bac678cd AP_Airspeed: Added MS5525 airspeed driver
also improved averaging in MS4525 driver
2016-12-05 16:51:49 -08:00
Andrew Tridgell 04731dccd6 AP_Airspeed: rename MS4525 driver
ready for new driver types
2016-12-05 16:51:49 -08:00
Andrew Tridgell 14a1f559c7 AP_Airspeed: added ARSPD_TYPE and use standard driver backend methods
this will allow for new sensor types
2016-12-05 16:51:49 -08:00
Andrew Tridgell 497b87fa65 AP_Airspeed: switched to in-tree I2C driver for all boards 2016-11-09 17:07:59 +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 42f3f7195b AP_Airspeed: 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 ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Andy Little 0d113b265c Examples: fix examples for px4
The change to use AP_BoardConfig messed up the examples. Here are some
updated but there are plenty more to do.
2016-10-04 12:50:47 -03:00
William Liu cc28c8e6ee AP_Airspeed: AP_Airspeed_I2C: get the right status according to datasheet 2016-09-09 10:32:14 -07:00
Tom Pittenger a66e248f5c AP_Airspeed: remove AP_Vehicle::FixedWing dependency 2016-08-08 00:12:42 -07:00
Tom Pittenger ce7b766d8b AP_Airspeed: remove AP_Vehicle::FixedWing dependency 2016-08-08 00:02:42 -07:00
Tom Pittenger ae46c38ff7 AP_Airspeed: pass in max airspeed via function call instead of using aparm 2016-08-08 00:02:42 -07:00
Tom Pittenger 1586abab8d Revert "AP_Airspeed: Converted library to be stand-alone from APM:Plane."
This reverts commit 5439257236.
2016-08-07 17:54:24 -07:00
LukeMike 4d8e7f1783 VRBRAIN / AP_Airspeed: defined ARSPD_DEFAULT_PIN for VR Brain 5.4 and VR Core 1.0 2016-08-07 20:31:51 +10:00
Tom Pittenger c07b85f9bb AP_Airspeed: set param "Enable" to be FLAG_ENABLE 2016-08-04 11:30:22 -07:00
AndersonRayner 5439257236 AP_Airspeed: Converted library to be stand-alone from APM:Plane.
Additional changes:
   ARSPD_FBW_MIN and ARSPD_FBW_MAX renamed to ARSPD_MIN and ARSPD_MAX
   ARSPD_MIN and ARSPD_MAX changed to floats
2016-08-04 10:09:04 -07:00
Andrew Tridgell 003c94830b AP_Airspeed: added ARSP_PSI_RANGE parameter
for using pressure sensors with a different range
2016-07-20 13:38:22 +10:00
Andrew Tridgell 28d5103435 AP_Airspeed: initial support for MS4515DO on Disco 2016-07-20 13:38:18 +10:00
Lucas De Marchi de5025a46f AP_Airspeed: I2C: fix after conversion to I2CDevice
- Allow to fail init
2016-07-14 17:32:32 -03:00
Luiz Ywata 6c87b2aa7c AP_Airspeed: AP_Airspeed_I2C: use I2CDevice interface 2016-07-14 17:32:32 -03:00
Tom Pittenger 9fb4a928e5 Revert "AP_Airspeed: coverity scan - variables not initialized in constructor"
This reverts commit 93462d0fe3.
2016-07-11 22:02:22 -07:00
Tom Pittenger 93462d0fe3 AP_Airspeed: coverity scan - variables not initialized in constructor 2016-07-05 13:32:00 -07:00
Andrew Tridgell 689595080a AP_Airspeed: ensure we have at least 10 samples for airspeed cal
thanks to Michael for pointing out this issue
2016-06-27 10:52:59 +10:00
Andrew Tridgell 4131b98f8c AP_Airspeed: use non-blocking airspeed calibration
this prevents the EKF from being upset by a time jump
2016-05-24 17:00:56 +10:00
Lucas De Marchi 62f048c417 AP_Airspeed: remove support for flymaple 2016-05-23 21:49:45 -03:00
Tom Pittenger 2e1eef7cf0 AP_Airspeed: airspeed healthy should also check if enabled 2016-05-13 17:14:55 -07:00
dgrat 41661f815f AP_Math: Replace the pythagorous* functions with a variadic template
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
AndersonRayner 74b9f624a3 Added temperature to the Airspeed.cpp example script
Fixed the formatting of the output data
2016-04-29 17:59:11 -03:00
Staroselskii Georgii 3feade792a AP_Airspeed: changed default pin for Navio boards
Use channel 5 (i.e. /sys/kernel/adc/ch5) for Airspeed sensors instead of virtual 65 that doesn't
make sense on these boards.
2016-04-27 15:37:34 +03:00
Randy Mackay 04b2e65627 AP_Airspeed: remove unused _last_pin
Resolves a compiler warning
2016-04-23 23:06:21 -07:00
Lucas De Marchi ffe36afeb2 AP_Airspeed: replace header guard with pragma once 2016-03-16 18:40:40 +11:00
Lucas De Marchi cc4504e613 AP_Airspeed: fix coding style
- replace tabs with spaces
  - remove C-style void from function arguments
  - use pragma once
  - fix pointer alignement
  - remove unused header: AP_Airspeed_I2C_PX4 - we actually use
    AP_Airspeed_PX4
2016-02-16 19:49:09 -02:00
Gustavo Jose de Sousa c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa 3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa d281067bcc waf: make example binaries be placed in 'examples' dir
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Jonathan Challinger a1c7b32387 AP_Airspeed: fix example build 2015-12-29 10:46:35 -08:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi 7c78955591 AP_Airspeed: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:42 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Caio Marcelo de Oliveira Filho 410bbe4c26 AP_Airspeed: examples use millis/micros/panic functions 2015-11-20 12:29:16 +09:00
Caio Marcelo de Oliveira Filho 2b10e0fac0 AP_Airspeed: use millis/micros/panic functions 2015-11-20 12:29:07 +09:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Andrew Tridgell a3ca732403 AP_Airspeed: show health status in examples 2015-11-05 16:09:00 +11:00
Lucas De Marchi 221d822573 AP_Airspeed: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:11 +11:00
Lucas De Marchi 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09: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
Caio Marcelo de Oliveira Filho 817248b2f5 AP_Airspeed: remove unnecessary includes from example 2015-10-21 09:16:11 +11:00
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Gustavo Jose de Sousa d42b132507 AP_Airspeed: 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
Staroselskii Georgii 402f46c56f AP_Airspeed: fixed a typo in the ARSPD_DEFAULT_PIN define
There was a redundant elif for Linux builds.
2015-07-07 21:02:21 +10:00
Andrew Tridgell e66b56970e AP_Airspeed: convert example from .pde to .cpp 2015-06-01 16:58:10 +10:00
Lucas De Marchi cc1fbddc95 AP_Airspeed: 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
Andrew Tridgell f23bc463cb AP_Airspeed: fix for HAL_SITL rename 2015-05-05 09:45:54 +10:00
Randy Mackay 2a6421d1bf Airspeed: fix example sketch 2015-05-02 20:53:49 +09:00
Andrew Tridgell c565d3b805 AP_Airspeed: fixed example build 2015-03-14 20:00:15 +11:00
Andrew Tridgell 26a77dc502 AP_Airspeed: change for new PX4 paths 2015-02-14 12:25:43 +11:00
Andrew Tridgell 1c270d17a8 AP_Airspeed: ignore temperatures below -80
ETS driver on PX4 returns -1000
2015-02-06 21:41:15 +11:00
Emile Castelnuovo a863f0bca8 AP_Airspeed: VRBRAIN code clean up. Deleted unused boards. 2015-02-02 08:44:01 +11:00
LukeMike 61f4239e47 AP_Airspeed: enabled PX4 library for VR boards 2015-02-02 08:44:00 +11:00
Emile Castelnuovo 25818f08a3 AP_Airspeed: added VRBRAIN board type 2015-02-02 08:43:59 +11:00
Emile Castelnuovo de8a0ebc08 AP_Airspeed: added #defines for new VR boards. 2015-02-02 08:43:58 +11:00
LukeMike b29f50ba9b AP_Airspeed: Defined AirSpeed analog inputs for ArduPlane on VR Micro Brain 5 2015-02-02 08:43:57 +11:00
Randy Mackay 293eb74a37 AirSpeed: fix example sketch 2015-01-28 17:15:36 +09:00
Andrew Tridgell 2235d18d67 AP_Airspeed: make it possible to tell if a airspeed sensor is unhealthy
we need use() to reflect if the user wants to use the sensor, so the
arming checks can tell if it is not working as expected
2015-01-20 11:26:20 +11:00
Andrew Tridgell 258542b939 AP_Airspeed: added ARSPD_SKIP_CAL parameter
allows airspeed calibration to be skipped for easier startup
2014-11-13 21:12:37 +11:00
Andrew Tridgell 9c631944f7 AP_Airspeed: expose raw pressure for logging 2014-11-13 17:49:04 +11:00
Andrew Tridgell ad8b73c8aa AP_Airspeed: update ARSPD_AUTOCAL docs 2014-10-24 17:16:17 +11:00
Andrew Tridgell ef0eca4835 AP_Airspeed: fixed airspeed in Replay 2014-10-19 19:42:15 +11:00
Andrew Tridgell f6f51ceebe AP_Airspeed: fixed example build 2014-08-13 21:46:09 +10:00
Andrew Tridgell a4cd9c4bd7 AP_Airspeed: added HIL support 2014-08-10 18:16:53 +10:00
Andrew Tridgell c1646fec73 AP_Airspeed: fixed example build 2014-07-25 17:54:11 +10:00
Andrew Tridgell 0f7e78e418 Airspeed: fixed example to setup pin 2014-07-25 17:15:00 +10:00
Randy Mackay 4cf7f01694 AP_Airspeed: init members to reduce compiler warnings 2014-07-16 14:40:50 +09:00
Randy Mackay 4c76c77239 AP_Airspeed: use 'no break' to resolve compiler warning re switch 2014-07-16 14:40:49 +09:00
Andrew Tridgell 52c53e55f8 AP_Airspeed: use board subtypes 2014-07-14 09:44:35 +10:00
Andrew Tridgell 6b87c9fdf7 AP_Airspeed: avoid some float conversion warnings 2014-07-08 20:26:44 +10:00
LukeMike 8f552d5758 VRBRAIN: Changed the management of VirtualRobotix's boards. 2014-06-19 11:27:38 +02:00
Kevin Hester d09e871319 AP_Airspeed: fixup line endings 2014-04-15 15:56:26 +09:00
Emile Castelnuovo e8b9e9d53c AP_Airspeed: added #defines for VRBRAIN board 2014-04-08 16:19:20 +10:00
Andrew Tridgell b8e4e35a0d AP_Airspeed: use pythagorous3() 2014-04-01 22:15:12 +11:00
Andrew Tridgell 9ab1a79b5a AP_Airspeed: changed sqrt() to sqrtf() 2014-04-01 22:09:21 +11:00
Andrew Tridgell dbd8f4b735 AP_Airspeed: fixed example build 2014-03-19 12:14:03 +09:00
Andrew Tridgell ad4db4de6c AP_Airspeed: added setHIL() method
useful for log playback
2014-02-18 09:25:08 +11:00
Randy Mackay c18b3f6094 AP_Airspeed: fix example sketch 2014-02-15 06:09:08 +11:00
Andrew Tridgell 03cc777991 AP_Airspeed: added last_update_ms() interface 2014-02-15 05:27:51 +11:00
Andrew Tridgell d853d65b84 AP_Airspeed: added ARSPD_TUBE_ORDER parameter
This allows for either order of tube connection by default, but the
order can be specified if need be
2014-02-15 05:12:15 +11:00
Andrew Tridgell dcd7f9d26d AP_Airspeed: use raw (signed) airspeed
this allows us to detect when the user has the ports the wrong way
around, and mark the sensor unhealthy
2014-02-14 21:50:59 +11:00
Andrew Tridgell 35791e1f05 AP_Airspeed: fixed get_temperature on PX4 2014-02-12 13:46:15 +11:00
Andrew Tridgell a339ec25c8 AP_Airspeed: fixed example build 2014-01-30 13:33:29 +11:00
Andrew Tridgell cf1f05a198 AP_Airspeed: expose get_temperature() 2014-01-28 10:35:35 +11:00
Andrew Tridgell c649e4b06f AP_Airspeed: avoid a warning 2013-12-11 17:29:27 +11:00
Andrew Tridgell c22df0fa60 AP_Airspeed: fixed a build warning 2013-12-11 10:22:07 +11:00
Andrew Tridgell ee7c742863 AP_Airspeed: changed default pin for SITL to pin 1
this leaves room for the sonar
2013-11-28 21:44:32 +11:00
Andrew Tridgell 9d7f24f754 AP_Airspeed: added healthy() API 2013-11-07 12:48:17 +11:00
Paul Riseborough 71de4ddcd0 AP_Airspeed : Fixes bug that caused airspeed calibration to be sent a zero airspeed
This bug resulted in the airspeed ratio going to the maximum value of 4 and staying there. This could lead to a very slow flying model and a stall.
2013-11-02 21:41:11 +11:00
Andrew Tridgell c64aa0e4de AP_Airspeed: fixed I2C semaphore handling for I2C airspeed
this affects MS4525DO on APM2
2013-10-29 14:55:38 +11:00
Andrew Tridgell e60d5d4f33 AP_Airspeed: fixed some warnings 2013-09-30 21:06:43 +10:00
Andrew Tridgell 2095b2a2d7 AP_Airspeed: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell 291369db7f AP_Airspeed: split up airspeed driver
this gives us separate backends for PX4, analog and I2C. This allows
the MS airspeed sensor to work on Linux, and it should work on APM2 as well.
2013-09-28 21:24:03 +10:00
Mike McCauley c1d3bedb60 AP_Airspeed: changes for Flymaple port pins and caibration constants 2013-09-24 13:33:25 +10:00
Andrew Tridgell 2e742582e4 AP_Airspeed: changed to AP_Vehicle.h
also allow updates to ARSPD_RATIO from user while autocal is running
2013-09-13 11:45:57 +10:00
Andrew Tridgell cc4fad23d9 AP_Airspeed: updates for Pixhawk 2013-09-13 10:48:57 +10:00
Andrew Tridgell b7e54bd463 AP_Airspeed: reduce speed of autocal
it was responding to noise too rapidly

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-09-12 07:48:57 +10:00
Andrew Tridgell 1328316bfc AP_Airspeed: fixed saving of airspeed ratios 2013-08-31 10:26:27 +10:00
Paul Riseborough 1c7bdc40ec AP_Airspeed : Expanded range of ARSPD_RATIO adjustment 2013-08-31 08:03:11 +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 69c8df3326 AP_Airspeed: fixed example build
removed Airspeed_Calibration test, as it is not useful
2013-08-30 13:01:36 +10:00
Andrew Tridgell 0c06dff2db AP_Airspeed: constrain internal state of calibration code 2013-08-30 13:01:34 +10:00
Andrew Tridgell 3916a07dcf AP_Airspeed: added logging of airspeed calibration internals 2013-08-30 13:01:34 +10:00
Andrew Tridgell ce3fb290f1 AP_Airspeed: fixed initialisation of auto-calibration 2013-08-30 13:01:34 +10:00
Andrew Tridgell c6c59174b3 AP_Airspeed: return when airspeed init fails 2013-08-30 13:01:33 +10:00
Andrew Tridgell 31e1b7fcf6 AP_Airspeed: list MEAS airspeed in ARSPD_PIN docs 2013-08-30 13:01:33 +10:00
Paul Riseborough 5a68c515dc AP_Airspeed: Altitude Calibration - added constrain on P matrix diagonals 2013-07-22 12:50:02 +10:00
Andrew Tridgell 3ba0dec4b3 AP_Airspeed: fixed typo 2013-07-22 12:50:02 +10:00
Paul Riseborough d1805f4349 AP_Airspeed: Airspeed Calibration computational efficiency improvement 2013-07-22 12:50:02 +10:00
Andrew Tridgell e6d9d14fad AP_Airspeed: added example sketch for airspeed calibration 2013-07-22 12:50:01 +10:00
Andrew Tridgell 3c66cb8af1 AP_Airspeed: added EAS2TAS in airspeed driver
this keeps the true airspeed ratio in the airspeed driver, which seems
the most logical place
2013-07-22 12:50:01 +10:00
Andrew Tridgell 893d2da6f6 AP_Airspeed: added auto-calibration support
This uses a Kalman filter to calculate the right ARSPD_RATIO at runtime

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-07-22 12:50:01 +10:00
Andrew Tridgell 98d6331387 AP_Airspeed: fixed example build 2013-07-15 14:10:27 +10:00
Andrew Tridgell 9d66adae13 AP_Airspeed: added get_airspeed_ratio() and set_airspeed_ratio()
This is to help Paul develop an automatic tuning system for airspeed
ratio
2013-07-13 21:53:38 +10:00
Randy Mackay 6cd18868c2 AirSpeed: fix example sketch compile error 2013-06-25 22:45:30 +09:00
Andrew Tridgell 68adeb041d AP_Airspeed: support ARSPD_PIN option for choosing source
this gives us support for arbitrary analog pins for the airspeed
sensor, plus support for the EagleTree airspeed driver on PX4
2013-06-03 11:51:09 +10:00
Andrew Tridgell dfb98490f4 AP_Airspeed: use rationmetric analog input for airspeed sensor 2013-05-13 15:13:19 +10:00
Andrew Tridgell 00e905b025 AP_Airspeed: use new voltage_average() API in Airspeed driver 2013-03-08 10:01:15 +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
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell a1187519a8 AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches 2012-12-20 14:52:37 +11:00
Pat Hickey eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +11:00
Andrew Tridgell 7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Andrew Tridgell b5a23d934b Airspeed: updates for new AP_Param API 2012-12-20 14:51:38 +11:00
Pat Hickey 475da4eca4 CONFIG_HAL_BOARD - test sketches fixed up, build all passes 2012-12-20 14:51:37 +11:00
Pat Hickey 7017a35fc3 AP_Airspeed: fix for AnalogIn read_average 2012-12-20 14:51:35 +11:00
Pat Hickey a4f1f6a5db AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR 2012-12-20 14:51:28 +11:00
Andrew Tridgell 53105efbcd HAL_AVR: more uart0 -> console changes 2012-12-20 14:51:27 +11:00
Pat Hickey dfc8e91fd3 AP_Airspeed: port to AP_HAL 2012-12-20 14:51:25 +11:00
Pat Hickey 3f1d9d7f69 AP_Param: #include <AP_Param.h> fixups for libraries & sketches
* I mostly went through with grep and added an #include <AP_Param.h> below
  every #include <AP_Common.h>. Not all of these example sketches might
  strictly need AP_Param.
2012-12-20 14:51:19 +11:00
rmackay9 56f88821e9 AP_AHRS: fix example sketch
AP_Airspeed: fix example sketch
AP_Baro: fix example sketch
AP_Declination: fix example sketch
AP_Math: fix example sketch
2012-11-08 00:08:18 +09:00
rmackay9 e4c8eaa181 AP_Airspeed: fixed constructor compile error in example sketch 2012-09-23 11:44:28 +09:00
Andrew Tridgell 0c864fd4dc AP_Airspeed: a bit more filtering
this helps reduce noise at low speed
2012-09-19 16:23:25 +10:00
uncrustify 90419ad834 uncrustify libraries/AP_Airspeed/AP_Airspeed.h 2012-08-21 19:00:17 -07:00
uncrustify 37c79f5501 uncrustify libraries/AP_Airspeed/AP_Airspeed.cpp 2012-08-21 19:00:17 -07:00
uncrustify 3c2873b4f5 uncrustify libraries/AP_Airspeed/examples/Airspeed/Airspeed.pde 2012-08-21 19:00:17 -07:00
Michael Oborne bcceedffab Fix Airspeed use use 2012-08-18 08:30:15 +08:00
Andrew Tridgell 47be6d8ad1 AP_Airspeed: remove airspeed filter and run at 10Hz
this saves on the filter memory, and gives just as good a result
2012-08-15 12:39:35 +10:00
Andrew Tridgell f95b06a880 AHRS: make airspeed sensor available to AHRS
this will be used for long term dead-reckoning
2012-08-11 08:57:32 +10:00
Andrew Tridgell dcc50b5705 AP_Airspeed: removed values passed to constructor 2012-08-08 16:38:39 +10:00
Andrew Tridgell 518d6365ff AP_Param: update remaining libraries for new constructor syntax 2012-08-08 12:11:57 +10:00
Michael Oborne 9e4d118fdb Airspeed Library - fix param names.
The Group definition give the start of the param name.
This way we can maintain multiple instances if required of the same library as options.
2012-07-16 21:48:47 +08:00