Commit Graph

9116 Commits

Author SHA1 Message Date
Staroselskii Georgii 375724b319 Arming: use milligauss as compass units 2015-09-09 10:38:16 +10:00
Staroselskii Georgii 4b948f5bb1 AP_AHRS: make DCM use milligauss 2015-09-09 10:38:16 +10:00
Staroselskii Georgii b5b6d767bd AP_NavEKF: make EKF use milligauss 2015-09-09 10:38:16 +10:00
Staroselskii Georgii e93ff44a97 AP_Compass: make a transition to milligauss in Compass library 2015-09-09 10:38:16 +10:00
Staroselskii Georgii 693613aa0f AP_Compass: convert AK8963 measurements to uT
AK8963 is configured in 16-bit ADC mode which implies sensitivity of 0.15 uT/LSb. Knowing this fact we can convert the measurements to the proper units. The change will make users recalibrate their compasses.
2015-09-09 10:38:16 +10:00
Staroselskii Georgii c207d8c6a8 AP_Compass: add milligauss counterparts to get_field() and get_offsets()
From now on there's a pair get_field_milligauss() and
get_offsets_milligauss() that can make the transition to the common
units across all compasses easier.
2015-09-09 10:38:16 +10:00
Víctor Mayoral Vilches 6d762f62b3 AP_InertialSensor: ERLEBOARD legacy support
This config referred to the legacy Erle-Board
https://erlerobotics.com/blog/product/erle-board/
The configuration is preserved to support the
existing boards.
2015-09-09 10:31:55 +10:00
Víctor Mayoral Vilches 728921f7c5 AP_HAL_Linux: ERLEBOARD legacy support
This config referred to the legacy Erle-Board
https://erlerobotics.com/blog/product/erle-board/
The configuration is preserved to support the
existing boards.
2015-09-09 10:31:55 +10:00
Víctor Mayoral Vilches b87fd58214 AP_HAL: ERLEBOARD legacy support
This config referred to the legacy Erle-Board
https://erlerobotics.com/blog/product/erle-board/
The configuration is preserved to support the
existing boards.
2015-09-09 10:31:55 +10:00
Grant Morphett 122e88dbed RC_Channel: remove the unused test function get_failsafe 2015-09-09 10:28:02 +10:00
Valmantas Palikša d4daf19151 AP_Math: Move simple math function implementations to header for better
compile time optimization

Functions like sq() are better moved to the header file as inline.
Compiler can then optimize these out when used in code, this saves cpu
cycles with stack push, pop during function calls.
2015-09-09 09:57:51 +10:00
Tom Pittenger cb20325593 AP_Mission: added flight stage FLIGHT_LAND_ABORT
- add get_prev_nav_cmd_with_wp_index(). This is different than get_prev_nav_cmd_index() in that it only stores the index if there is a valid lat/lng (+1 squashed commits)
- added mission item command to NAV_LAND which is the abort takeoff altitude. If 0 then use last takeoff if available, else use 50m
2015-09-09 09:04:24 +10:00
Tom Pittenger 46a83c7ae9 AP_TECS: added flight stage FLIGHT_LAND_ABORT
- do what TAKEOFF does in tecs, push the throttle up
2015-09-09 09:04:24 +10:00
Tom Pittenger 0961e1d907 AP_SpdHgtControl: added flight stage FLIGHT_LAND_ABORT 2015-09-09 09:04:24 +10:00
Fredrik Hedberg d9a4b6b089 AP_HAL_Linux: Allow PCA9685 to be used on non-default I2C addresses. 2015-09-09 08:43:22 +10:00
Fredrik Hedberg 9d9e6d0b34 AP_HAL_Linux: Only use enable pin for PCA9685 if we need to. 2015-09-09 08:43:22 +10:00
Fredrik Hedberg 21b9f96ce3 AP_HAL_Linux: Enable use of all 16 channels for non-Navio PCA9685. 2015-09-09 08:43:22 +10:00
Tom Pittenger 4771d19073 AP_Math: added locations_are_same(loc1,loc2) helper
returns true if lat and lng are the same, ignores alt and options
2015-09-08 17:05:54 +10:00
Tom Pittenger 1026e7df45 AP_Mission: updated comment
altitude and lat/lng are all used
2015-09-08 17:05:54 +10:00
Andrew Tridgell 6afb3895c0 AP_RangeFinder: added doc strings for new rangefinder types 2015-09-08 16:46:52 +10:00
Andrew Tridgell cbd43ee6ea HAL_PX4: added hal.i2c support on PX4 boards
this allows I2C based devices to use in-tree drivers
2015-09-08 16:46:52 +10:00
Andrew Tridgell 80c85a2c3f AP_SerialManager: added enum for serial lidar 2015-09-08 16:46:52 +10:00
Andrew Tridgell 7d30ce2e36 AP_RangeFinder: added lightware serial rangefinder 2015-09-08 16:46:52 +10:00
Andrew Tridgell 0ca534bfab AP_NavEKF: only call calcGpsGoodToAlign if we need to
avoid calling it once we have an origin. This avoids some calculations
and string operations
2015-09-08 16:07:33 +10:00
Andrew Tridgell 7e13edd4c7 AP_Arming: use prearm_failure_reason() 2015-09-08 16:07:33 +10:00
Andrew Tridgell c10ce3ffbd AP_NavEKF: added prearm_failure_reason() 2015-09-08 16:07:33 +10:00
Andrew Tridgell c18c6d894e AP_AHRS: added prearm_failure_reason() 2015-09-08 15:50:22 +10:00
Andrew Tridgell d7a7741d15 APM_OBC: added severities to send_statustext_all 2015-09-08 14:29:45 +10:00
Andrew Tridgell b65739a8cc AP_Arming: added severities to send_statustext_all 2015-09-08 14:29:33 +10:00
Andrew Tridgell bc4d37c91e GCS_MAVLink: added severity to send_statustext_all() 2015-09-08 14:29:22 +10:00
Andrew Tridgell c48bef1552 AP_Arming: removed the need for the GCS print function 2015-09-08 13:54:25 +10:00
Andrew Tridgell f3e8819d1e GCS_MAVLink: make send_statustext_all() take a format string
this allows for formatted messages to all groundstations in libraries
2015-09-08 13:53:58 +10:00
Grant Morphett bec21a51a4 AP_RangeFinder: Just fixing the parameter name in the description 2015-09-07 17:48:37 +09:00
Leonard Hall c8872e082d AC_AttControl: rename set_throttle_out parameter
No functional change
2015-09-07 15:10:15 +09:00
Leonard Hall 5ab2a19173 AC_WPNav: loiter limits lean angle for alt loss 2015-09-07 15:10:11 +09:00
Leonard Hall cf5db31053 AC_PosControl: allow limiting lean angle to avoid alt loss 2015-09-07 15:10:10 +09:00
Leonard Hall 29ff5035b4 AC_AttControl: limit lean angle from throttle 2015-09-07 15:10:09 +09:00
Randy Mackay 1024790633 MotorsMulti: add throttle_max accessor 2015-09-07 15:10:02 +09:00
Leonard Hall b58cc7ea8d AC_PosControl: move accel constraint to accel_to_lean_angles 2015-09-07 14:51:43 +09:00
Michael Oborne 993904f01c AP_GPS_SBF: add init string and increase union size 2015-09-07 12:11:47 +10:00
Julien BERAUD a057a8a009 AP_HAL_Linux: Add Support for RCInput_UDP
very simple protocol to receive RC cmds via UDP
Add support for it on the bebop
2015-09-07 12:10:08 +10:00
Grant Morphett 3b1844d5c9 AP_Arming: Moved the plane centric arming code into plane
Needed to move the plane centric arming code out of the AP_Arming
library and into the plane vehicle code.
2015-09-07 11:54:21 +10:00
Gustavo Jose de Sousa 305ec7b08a AP_InertialSensor: MPU6000: publish sample rate
So that vibration and clipping may be calculated.
2015-09-07 11:14:43 +10:00
Gustavo Jose de Sousa eb480e959c AP_InertialSensor: MPU9250: publish sample rate
That enables the default vibration calculation.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa a76eb9c15f AP_InertialSensor: MPU9250: use macros for sample rate
Instead of hardcoded values.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa a0b1337646 AP_InertialSensor: PX4: publish sample rate
By publishing the sample rate, the vibration and clipping are magically
calculated.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa 77a4f10d89 AP_InertialSensor: PX4: don't call calc_vibration_and_clipping()
That calculation will be unified.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa 6aa973dd47 AP_InertialSensor: Backend: calculate vibration and clipping on new raw sample
This is a good way of letting each implementation easily calculate vibration
and clipping: all they need to do is publish their sample rate and they don't
need to worry about the call for calculation.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa e06627dfcb AP_InertialSensor: Backend: add hook for new raw accel samples
That hook will eventually do necessary things when a new accelerometer raw
sample arrives (like calculating vibration levels).
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa 5329e63742 AP_InertialSensor: allow publishing sample rate to frontend
That information will be used for a "centralized" vibration calculation.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa ac3a677626 AP_InertialSensor: remove param rotate_and_correct from publish functions
Once that parameter is always false.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa a56c8deaee AP_InertialSensor: Oilpan: apply correction on each new sample
These changes are for enabling unified accelerometer vibration and clipping
calculation. For that, we need the values "rotated and corrected" before they
are filtered and the calculation must be called as soon as a new sample arrives
as it takes the sample rate into account.

Thus, move code that applies "corrections" to be executed as soon as accel data
arrive and call _publish_accel() passing rotate_and_correct parameter as false.
Also, do the same for gyro so we can keep it consistent.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa fc38691e0b AP_InertialSensor: MPU9250: apply correction on each new sample
These changes are for enabling unified accelerometer vibration and clipping
calculation. For that, we need the values "rotated and corrected" before they
are filtered and the calculation must be called as soon as a new sample arrives
as it takes the sample rate into account.

Thus, move code that applies "corrections" to be executed as soon as accel data
arrive and call _publish_accel() passing rotate_and_correct parameter as false.
Also, do the same for gyro so we can keep it consistent.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa b844b220c3 AP_InertialSensor: MPU9150: apply correction on each new sample
These changes are for enabling unified accelerometer vibration and clipping
calculation. For that, we need the values "rotated and corrected" before they
are filtered and the calculation must be called as soon as a new sample arrives
as it takes the sample rate into account.

Thus, move code that applies "corrections" to be executed as soon as accel data
arrive and call _publish_accel() passing rotate_and_correct parameter as false.
Also, do the same for gyro so we can keep it consistent.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa 487135afa2 AP_InertialSensor: MPU6000: apply correction on each new sample
These changes are for enabling unified accelerometer vibration and clipping
calculation. For that, we need the values "rotated and corrected" before they
are filtered and the calculation must be called as soon as a new sample arrives
as it takes the sample rate into account.

Thus, move code that applies "corrections" to be executed as soon as accel data
arrive and call _publish_accel() passing rotate_and_correct parameter as false.
Also, do the same for gyro so we can keep it consistent.
2015-09-07 11:14:42 +10:00
Gustavo Jose de Sousa f946f48dce AP_InertialSensor: LSM9DS0: apply correction on each new sample
These changes are for enabling unified accelerometer vibration and clipping
calculation. For that, we need the values "rotated and corrected" before they
are filtered and the calculation must be called as soon as a new sample arrives
as it takes the sample rate into account.

Thus, move code that applies "corrections" to be executed as soon as accel data
arrive and call _publish_accel() passing rotate_and_correct parameter as false.
Also, do the same for gyro so we can keep it consistent.
2015-09-07 11:14:41 +10:00
Gustavo Jose de Sousa 0963159bb8 AP_InertialSensor: Flymaple: apply correction on each new sample
These changes are for enabling unified accelerometer vibration and clipping
calculation. For that, we need the values "rotated and corrected" before they
are filtered and the calculation must be called as soon as a new sample arrives
as it takes the sample rate into account.

Thus, move code that applies "corrections" to be executed as soon as accel data
arrive and call _publish_accel() passing rotate_and_correct parameter as false.
Also, do the same for gyro so we can keep it consistent.
2015-09-07 11:14:41 +10:00
Gustavo Jose de Sousa 2ea8f1de3f AP_InertialSensor: L3G4200D: apply correction on each new sample
These changes are for enabling unified accelerometer vibration and clipping
calculation. For that, we need the values "rotated and corrected" before they
are filtered and the calculation must be called as soon as a new sample arrives
as it takes the sample rate into account.

Thus, move code that applies "corrections" to be executed as soon as accel data
arrive and call _publish_accel() passing rotate_and_correct parameter as false.
Also, do the same for gyro so we can keep it consistent.
2015-09-07 11:14:41 +10:00
Andrew Tridgell 6991a1b9e9 AP_Compass: ensure we have payload space to send MAG_CAL messages 2015-09-07 08:58:11 +10:00
Andrew Tridgell 2baa0ac2f2 AP_Compass: disable COMPASS_LEARN when mag calibration used 2015-09-07 08:07:17 +10:00
Andrew Tridgell 745a5998f2 AP_Camera: added CAM_RELAY_ON parameter
allows for camera that trigger low
2015-09-07 08:07:17 +10:00
Randy Mackay fa0aa6f5c9 Mount: remove support for do-mount-configure as command long
Also fix bug in do-mount-control so that do-mount-control can switch mount into retract mode

Also removes ability to set which axis are stabilized through
ardupilotmega mount_configure message
2015-09-06 16:01:18 +09:00
squilter cc58ec917c Mount: add support for do_mount_control via command_long 2015-09-06 16:01:12 +09:00
Andrew Tridgell 079161ef3a AP_Compass: fixed raw_field init in AK8963 driver
thanks to Peter for spotting this
2015-09-03 21:27:22 +10:00
Andrew Tridgell 5710697847 DataFlash: fixed some build warnings 2015-09-03 20:25:14 +10:00
Michael Oborne cce46cf0c5 AP_GPS_SBF: add support for Septentrio gps 2015-09-03 19:43:31 +10:00
Michael Oborne 52577e4105 DataFlash: add sbf event message 2015-09-03 19:43:31 +10:00
Michael Oborne b861233677 AP_HAL_SITL: add file based gps 2015-09-03 19:43:31 +10:00
Lucas De Marchi 0000ff45cb AP_HAL_Linux: RCOutput_PCA9685: remove trailing whitespace 2015-09-03 18:43:21 +10:00
Lucas De Marchi 18321a77c4 AP_HAL_Linux: rename RCOutput_Navio to RCOutput_PCA9685
The RCOutput_Navio is now generic enough to be used by other boards.
Rename it to use the name of the chip, PCA9685.
2015-09-03 18:43:21 +10:00
Lucas De Marchi e1f0284df2 AP_HAL_Linux: PCA9685: build on all Linux boards 2015-09-03 18:43:21 +10:00
Fabio Mello c0caed1b64 AP_HAL_Linux: RCOutput_Navio: allow to use internal clock
It's possible to use the internal clock in PCA96895 if we account for
the drift it contains. This is a bit different from solutions in other
projects like the Adafruit library and the PX4 firmware: instead of
applying a correction to the final frequency we apply the correction to
the clock since this is the source of the error.

With this fix we arrived to much better results across different lots of
sensors.

The Navio board continues to use the external clock and should have no
difference behavior.
2015-09-03 18:43:21 +10:00
Lucas De Marchi 6c042b6666 AP_HAL_Linux: RCOutput_Navio: allow to have other offset 2015-09-03 18:43:21 +10:00
Lucas De Marchi 3beaf34aa1 AP_HAL_Linux: RCOutput_Navio: allow to have other OE pin
While at it also rename enable_pin to follow the convention of starting
with underscore for private members.
2015-09-03 18:43:21 +10:00
Andrew Tridgell e4b2fc711d AP_Compass: added message for compass cal when armed 2015-09-03 16:59:22 +10:00
Andrew Tridgell f4cdf57d8f AP_Compass: added handling of compass calibration mavlink messages 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 1ffbffa0e7 AP_Math: check if failed to allocate memory 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 75829f5533 AP_Compass: remove extra compass field correction 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 3abdf85796 AP_Compass_Calibrator: remove unrequired variables 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit c126017035 AP_Compass: reduce to if healthy check from if-else 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 2fb002798c generate.sh 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 63973bff31 AP_Compass_AK8963: move variable declarations before goto 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 3fc47b33e8 message_definition: add autoreboot option for mag cal 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 6a603eb594 Compass_cal: implement the concept of auto and mandatory user reboot after cal 2015-09-03 16:59:13 +10:00
Gustavo Jose de Sousa 46774136a6 AP_Compass: 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-09-03 16:59:13 +10:00
Siddharth Bharat Purohit cdd8bae6ac AP_Compass: publish raw and unfiltered field for HMC5843 compass 2015-09-03 16:59:13 +10:00
Siddharth Bharat Purohit 8cdc9748b3 AP_Compass: publish raw and unfiltered field for AK8963 compass 2015-09-03 16:59:13 +10:00
Siddharth Bharat Purohit f085e274c7 AP_Compass: add explaination for sample acceptance based on angular distance 2015-09-03 16:59:13 +10:00
Jonathan Challinger f108383c11 AP_Compass: initialize CompassCalibrator _sample_buffer to NULL 2015-09-03 16:59:13 +10:00
Jonathan Challinger 358736a592 AP_Compass: correct calibrator sample acceptance math 2015-09-03 16:59:13 +10:00
Jonathan Challinger bff9b9065e AP_Compass: CompassCalibrator comment update 2015-09-03 16:59:13 +10:00
Jonathan Challinger 1c100498d4 AP_Math: use is_zero instead of defining our own epsilon 2015-09-03 16:59:13 +10:00
Siddharth Bharat Purohit 137bd25220 AP_Compass: add info about compass calibrator procedure 2015-09-03 16:59:12 +10:00
Siddharth Bharat Purohit f5fbc2fac1 AP_Compass: use AP_Math inverse library 2015-09-03 16:59:12 +10:00
Siddharth Bharat Purohit b654b1c21b AP_Math: add inverse matrix to math library 2015-09-03 16:59:12 +10:00
Jonathan Challinger 0edf1df28e AP_Compass: loosen calibration acceptance tolerance 2015-09-03 16:59:12 +10:00
Jonathan Challinger 987f55387e AP_Compass: style cleanup 2015-09-03 16:59:12 +10:00
Jonathan Challinger 5ef713f3db AP_Compass: set AP_Notify::compass_cal_failed 2015-09-03 16:59:12 +10:00
Jonathan Challinger 5a12991d29 CompassCalibrator: remove dependence on AP_Notify 2015-09-03 16:59:12 +10:00
Jonathan Challinger de600ca3da AP_Compass: configured() only checks compasses with _USE set 2015-09-03 16:59:12 +10:00
Jonathan Challinger 53fe649016 GCS_MAVLink: add MSG_MAG_CAL_PROGRESS and _REPORT 2015-09-03 16:59:11 +10:00
Jonathan Challinger 72c8d0f530 AP_Compass: add samples to calibrator when published 2015-09-03 16:59:11 +10:00
Jonathan Challinger cc36401b7c AP_Compass: add calibration interface 2015-09-03 16:59:11 +10:00
Jonathan Challinger 28ee63c855 AP_Notify: add events.compass_cal_canceled 2015-09-03 16:59:11 +10:00
Jonathan Challinger adef826a42 AP_Notify: play tones for compass cal 2015-09-03 16:59:11 +10:00
Jonathan Challinger 89007c13cb AP_Notify: add compass_cal flags 2015-09-03 16:59:11 +10:00
Jonathan Challinger 05d3616e0d AP_Compass: fix sitl build 2015-09-03 16:59:11 +10:00
Jonathan Challinger 7cb9fa8898 AP_Compass: Correct parameter checks in compass cal 2015-09-03 16:59:11 +10:00
Jonathan Challinger 6d45660568 AP_Compass: refactor run_fit_chunk logic 2015-09-03 16:59:11 +10:00
Jonathan Challinger f2acf2cb88 AP_Compass: more parameter checks in compass calibrator 2015-09-03 16:59:11 +10:00
Jonathan Challinger 929ddb5685 AP_Compass: fix a math error in the compass calibrator 2015-09-03 16:59:10 +10:00
Jonathan Challinger 328cf82c3d CompassCalibrator: update AP_Notify on failure 2015-09-03 16:59:10 +10:00
Jonathan Challinger bfdbb55528 AP_Compass: make compasscalibrator running() public 2015-09-03 16:59:10 +10:00
Jonathan Challinger d31d385490 AP_Compass: changes and fixes to LMA-based compass calibrate 2015-09-03 16:59:10 +10:00
bugobliterator c66bfc95e1 Compass: Add Levenberg-Marquadt for ellipsoid fit 2015-09-03 16:59:10 +10:00
bugobliterator 7711dde2ad Compass: implement 9 parameter ellipsoid fit 2015-09-03 16:59:10 +10:00
bugobliterator 35555c7b21 Compass: Add math for 9 parameter fitting 2015-09-03 16:59:10 +10:00
bugobliterator 7295537e8a Compass: decrease sphere coverage to 1/3rd
for faster sample collection
2015-09-03 16:59:10 +10:00
bugobliterator a2bd4e8997 Compass: Add less complex equations to calculate jacobians 2015-09-03 16:59:10 +10:00
bugobliterator 2ca0e80dc5 Compass: Add conditions to check sanity of results 2015-09-03 16:59:10 +10:00
bugobliterator 54bc28c96d Compass: Add Levenberg-Marquadt optimiser for sphere_fit
increase iterations to get good results from LM
better check for convergence, comparison with initial fitness is a better way to determine if convergence occurs, if fitness has not improved compared to initial fitness it means optimiser has failed.
2015-09-03 16:59:10 +10:00
Jonathan Challinger c0a662c819 AP_Compass: CompassCalibrator initial commit 2015-09-03 16:59:10 +10:00
Jonathan Challinger f20ef69777 Compass: add soft-iron corrections 2015-09-03 16:59:09 +10:00
Jonathan Challinger 5fe6db0dc9 AP_Compass_PX4: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger ade39abc7f AP_Compass_HMC5843: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger 8800d03fce AP_Compass_HIL: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger cd5cf45ba8 AP_Compass_AK8963: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger add1b8c257 AP_Compass: modify backend interface to push raw samples to frontend 2015-09-03 16:59:09 +10:00
Jonathan Challinger b990eaed68 AP_Compass: add interface for raw and unfiltered field 2015-09-03 16:59:09 +10:00
Jonathan Challinger b2fff2021f GCS_MAVLink: re-generate libraries 2015-09-03 16:59:09 +10:00
Jonathan Challinger 1b485ef6ab GCS_MAVLink: add MAG_CAL messages 2015-09-03 16:59:09 +10:00
Peter Barker 2b02911546 DataFlash: make mode and messages critical 2015-09-03 15:20:20 +10:00
Peter Barker 8f8493225c DataFlash: DFMessageWriter; ability to trickle messages out to DF 2015-09-03 09:54:55 +10:00
Grant Morphett ab35ac41a5 AP_Param: Add parameter to print out all the keys/indexes
For some debugging I was working on I needed to see all the token
indexs and group elements.
2015-09-02 11:12:31 +10:00
mirkix f6f2e901b8 AP_Notify: Disable ToneAlarm for BBBMINI 2015-09-02 11:10:59 +10:00
Andrew Tridgell 2ce0f4c171 AC_Precland: fixed build under cygwin
the IRLock driver only builds on PX4 at the moment
2015-09-02 10:10:04 +10:00
Andrew Tridgell dff235dc36 AP_RangeFinder: support LightWare I2C laser rangefinders
this has been tested with the SF10/C
2015-09-01 21:09:12 +10:00
Gustavo Jose de Sousa bcd5dff774 AP_Baro: MS56XX: do not change change state on error
If we have an error in the SPI or I2C transaction we should not change
the state. Otherwise we might read a temperature when the sensor is
reporting pressure and vice-versa.
2015-09-01 20:26:06 +10:00
Gustavo Jose de Sousa 1f29e18375 AP_Baro: make AP_SerialBus::write() return success or failure for MS56XX 2015-09-01 20:26:05 +10:00
Gustavo Jose de Sousa 458f587656 AP_HAL_FLYMAPLE: SPI: adapt to the new signature of transaction()
A default behaviour was added here.
2015-09-01 20:26:05 +10:00
Gustavo Jose de Sousa 4e27d19107 AP_HAL_Empty: SPI: adapt to the new signature of transaction()
A default behaviour was added here.
2015-09-01 20:26:05 +10:00
Gustavo Jose de Sousa 93f5abb274 AP_HAL_AVR: SPI: adapt to the new signature of transaction()
A default behaviour was added here.
2015-09-01 20:26:05 +10:00
Gustavo Jose de Sousa 4af2a9a9cc AP_HAL_Linux: SPI: adapt to the new signature of transaction() 2015-09-01 20:26:05 +10:00
Gustavo Jose de Sousa e05928a7e8 AP_HAL: make SPIDeviceDriver::transaction() return success or failure 2015-09-01 20:26:05 +10:00
Gustavo Jose de Sousa 53b5b70960 AP_Scheduler: use also task name besides the id for logging
This makes it easier to identify for which task a log line is.
2015-09-01 20:22:19 +10:00
Gustavo Jose de Sousa b59154103f AP_Scheduler: use function name for AP_Scheduler task name
That makes it easier to identify tasks when debug is enabled in AP_Scheduler.
2015-09-01 20:22:19 +10:00
Gustavo Jose de Sousa 8fe466ce27 AP_Scheduler: add initializer for task field "name"
We use define it as an empty macro if on AVR board.
2015-09-01 20:22:18 +10:00
Gustavo Jose de Sousa 8018748fe2 AP_Scheduler: add field "name" to task structure for logging purposes
That field will be useful for logging as it is easier to know what task a log
is related to by using the task's name rather than using the number.
2015-09-01 20:22:18 +10:00
Gustavo Jose de Sousa 2e6074c108 AP_Scheduler: use designated initializers for tasks structs
Makes code less prone to break build and semantics (e.g., when a new field is
added).
2015-09-01 20:22:18 +10:00
Andrew Tridgell a3d7156f28 SITL: raise default simulation rate to 1200Hz
this greatly improves things for the heli sim
2015-09-01 16:34:20 +10:00
Randy Mackay 6701d53d49 GPS: add GNSS_MODE parameter bitmask 2015-09-01 12:19:59 +09:00
Randy Mackay 2351e84592 IRLock: replace tabs with spaces
No functional change
2015-08-31 18:00:33 +09:00
Randy Mackay bf08fc317c AC_PrecLand: correct include paths 2015-08-31 18:00:26 +09:00
Randy Mackay c06593f987 AC_PrecLand: precision landing lib for IR-Lock and companion computer 2015-08-31 18:00:25 +09:00
Randy Mackay 7706102d1e AC_WPNav: add shift_loiter_target method
Shift the loiter target and freeze the feedforward if necessary
2015-08-31 18:00:24 +09:00
Randy Mackay 6f3ff0866f IRLock: adjust to px4 lib calculating bf angles 2015-08-31 18:00:20 +09:00
Randy Mackay 04c682542c IRLock: correct include paths 2015-08-31 18:00:14 +09:00
bstone04 cf8ce867e6 IRLock: many changes to integrate with PrecLand library
irlock_center_x_pos calculates the lateral x position of the marker in cm. relative to the quad
irlock_x_pos_to_latlon rotates the frame based x position to latitude/longtitude based coordinates
same case for the y position
add get_angle_to_target method
get_angle_to_target replaces pixel to position calculations
Also removed ahrs reference (now in AC_PrecLand lib), unused references
to orb and commented out parameter declaration
reduce max objects to 5
remove ahrs reference
add timeout
return true if new sample found
bug fix get_angle_to_target
remove unused get_frame
2015-08-31 17:57:57 +09:00
Michael Landes 59928ed677 IRLock: Initial implementation
Define the IRLock sensor object using PX4 level driver
2015-08-31 17:57:56 +09:00
Grant Morphett 1595c137f8 AC_PID_test: fixed AC_HELI_PID constructor 2015-08-31 13:45:13 +09:00
Randy Mackay e3ff4ed9c4 MotorsHeli: integrate RotorControlState 2015-08-31 11:43:59 +09:00
Randy Mackay cb47311416 MotorsHeli_RSC: add RotorControlMode enum 2015-08-31 11:43:58 +09:00
Randy Mackay 72efc85ee8 MotorsHeli_RSC: RotorControlState enum 2015-08-31 11:43:57 +09:00
Robert Lefebvre bde43412d8 AP_MotorsHeli: Fix RSC Mode 3 2015-08-31 11:43:55 +09:00
Robert Lefebvre 38ccd6e04f AP_MotorsHeli_RSC: Fix tail_type control 2015-08-31 11:43:54 +09:00
Robert Lefebvre 535da1d79a AP_MotorsHeli_Single: DDVPT to use it's own ramp and runup times 2015-08-31 11:43:51 +09:00
Robert Lefebvre 28318c4116 AP_MotorsHeli: Move Output functions into parent class 2015-08-31 11:43:50 +09:00
Robert Lefebvre 84102c3e3f AP_MotorsHeli: Rework how servo setup is done. 2015-08-31 11:43:49 +09:00
Robert Lefebvre 345663f705 AP_MotorsHeli: Simplify servo init/reset 2015-08-31 11:43:48 +09:00
Robert Lefebvre b11600aebe AP_MotorsHeli: Move set_delta_phase_angle into _Single class 2015-08-31 11:43:47 +09:00
Robert Lefebvre 3756c6b3f3 AP_MotorsHeli: Create RSC Throttle Curve mode for controlling gas engines. 2015-08-31 11:43:45 +09:00
Robert Lefebvre f853979816 AP_MotorsHeli: run RSC Control function in Output Min function
Move Output_Min() function into Heli_Single class as it will eventually be overloaded by other helicopter class types.
2015-08-31 11:43:44 +09:00
Robert Lefebvre 315f0408ae AP_MotorsHeli: RSC controller to use speed ramp as simple float scalar 2015-08-31 11:27:52 +09:00
Robert Lefebvre 91c7663ca2 AP_MotorsHeli: Set range of new RSC Servo object. 2015-08-31 11:27:51 +09:00
Robert Lefebvre cefa0c28a6 AP_MotorsHeli: RSC Mode 0 no longer a valid mode 2015-08-31 11:27:48 +09:00
Robert Lefebvre 981c96d8bc AP_MotorsHeli: Add more parameter checks 2015-08-31 11:27:47 +09:00
Robert Lefebvre ed08e9d531 AP_MotorsHeli_RSC: Split out rotor speed estimate into it's own function 2015-08-31 11:27:46 +09:00
Robert Lefebvre 064cc63512 AP_MotorsHeli: Colyaw function to check if rotor speed control is above idle 2015-08-31 11:27:45 +09:00
Robert Lefebvre 77e4bf39aa AP_MotorsHeli: rework RSC output() function to implement idle speed function
Also, split out speed_ramp function
2015-08-31 11:27:44 +09:00
Robert Lefebvre c3e7eed299 AP_MotorsHeli_Single: Fix recalc_scalars function 2015-08-31 11:27:42 +09:00
Robert Lefebvre 214d60abb9 AP_MotorsHeli: Create RSC_IDLE param 2015-08-31 11:27:41 +09:00
Robert Lefebvre 27f8d6bcd5 AP_MotorsHeli: Change RSC output() function into a state machine. 2015-08-31 11:27:40 +09:00
Robert Lefebvre 10b0be9e75 AP_MotorsHeli: Fully detail tradheli output functions and move manual servo handling 2015-08-31 11:27:39 +09:00
Robert Lefebvre 7dda0f651a AP_MotorsHeli: Rename tradheli servo objects for clarity 2015-08-31 11:27:38 +09:00
Robert Lefebvre 457d939e77 AP_MotorsHeli: Update includes so that it builds 2015-08-31 11:27:37 +09:00
Fredrik Hedberg e6119cf51f AP_Motors: Fix param indices in AP_MotorsHeli. 2015-08-31 11:27:36 +09:00
Fredrik Hedberg 411947ea7c AP_Motors: Rename output_yaw to move_yaw in AP_MotorsHeli_Single. 2015-08-31 11:27:35 +09:00
Fredrik Hedberg 1e8be73a27 AP_Motors: Fix formatting in AP_MotorsHeli_RSC. 2015-08-31 11:27:34 +09:00
Fredrik Hedberg e6957df54a AP_Motors: Fix param range comment in AP_MotorsHeli. 2015-08-31 11:27:33 +09:00
Fredrik Hedberg 97e09fa9b0 AP_Motors: Move traditional helicopter controls into AP_MotorsHeli_Single.
Original commit by fhedberg, had to fix merge conflicts and now it appears I did the commit?
2015-08-31 11:27:31 +09:00
Fredrik Hedberg af69a20ba5 AP_Motors: Break out yaw output in AP_MotorsHeli. 2015-08-31 11:27:30 +09:00
Fredrik Hedberg feb32f40ed AP_Motors: Break out servo init and reset in AP_MotorsHeli. 2015-08-31 11:27:29 +09:00
Fredrik Hedberg ae9a16dc27 AP_Motors: Move rotor speed control into AP_MotorsHeli_RSC. 2015-08-31 11:27:28 +09:00
Fredrik Hedberg 1bb6b65ce0 AP_Motors: Use C++11 initializers in AP_MotorsHeli. 2015-08-31 11:27:27 +09:00
Andrew Tridgell f6f2973acd AC_WPNav: make changes in WPNAV_ACCEL take effect immediately
this makes it easier to tune the waypoint controller in auto mode
2015-08-31 11:10:35 +10:00
Andrew Tridgell 2c7a113790 AP_GPS: ensure all GPS drivers give headings as 0..360 degrees
this prevents inconsistency between interfaces, and fixes a MAVLink
reporting bug with UAVCAN GPS
2015-08-31 08:24:35 +10:00
Tom Pittenger 15b242832e AP_Mission: lat/lng == 0 bug fix
was using wrong logic to check for lat/lng == 0
2015-08-29 21:17:35 +10:00
Tom Pittenger 41508457e1 AP_Mission: add get_prev_nav_cmd_with_wp_index()
This is different than get_prev_nav_cmd_index() in that it only stores the index if there is a valid lat/lng
2015-08-29 21:17:35 +10:00
Stewart Loving-Gibbard c5f70d22c5 AP_RSSI: Adding RSSI library for reading various kinds of RSSI, with the possibility of adding more.
* Retains ability to read from Analog Pin
* Adds ability to read RSSI from PWM channel value as is done in OpenLRSng, EazyUHF, and various other LRS.
* Handles any type of RSSI that provides RSSI values inverted - i.e. when the low value is the best signal and the high value is the worst signal.
* Has different key names from all existing RSSI parameters to provide for a clean break and easier distinguishing.
2015-08-29 08:05:53 +10:00
Grant Morphett 1b67e49df4 exampleLowPassFilter2p: fixed simple typo error - now build success 2015-08-28 15:36:50 +09:00
Lucas De Marchi a66a201bf5 AP_Compass: HMC5843: Add support for MPU6000 auxiliary bus
Allow HMC5843 to be on MPU6000's auxiliary bus.
2015-08-28 12:39:09 +10:00
Lucas De Marchi a44ab9ed98 AP_HAL: define constant for HMC5843 on MPU6000 2015-08-28 12:39:09 +10:00
Lucas De Marchi 628e446e3e AP_Compass: HMC5843: use a struct for raw value
Like is done in AK8963, declare a raw_value struct.
2015-08-28 12:39:09 +10:00
Lucas De Marchi 9ecd1daf81 AP_Compass: HMC5843: remove useless delay
There's no need to add a delay after suspending timer in the
initialization. Also initialize _bus_sem earlier, like is done in
AK8963.
2015-08-28 12:39:09 +10:00
Lucas De Marchi c66c9c41f2 AP_Compass: HMC5843: be agnostic to I2C bus
Like was done to inertial AK8963 and inertial sensor move the decision
regarding the I2C bus to the caller. We don't allow changing the address
because apparently HMC5843 doesn't support different addresses.

Changing only the bus could be more easily done but this prepares the
ground for using HMC5843 on an AuxiliarBus.

The need for a more generic abstraction is evidenced by this commit: a
"SerialBus" in AP_HAL would be a nice addition rather than letting each
driver to provide its own. However the methods are a little bit
different from what we have in AK8963. It's safer to do the simple
conversion now and later on to add the abstraction changing everybody to
use it.
2015-08-28 12:39:09 +10:00
Staroselskii Georgii 3eb6be64c9 AP_Compass: ignore first two readings in a clearer way
This way we don't mix two different conditionals: settling and data validation.
2015-08-28 12:39:09 +10:00
Staroselskii Georgii 633330db14 AP_Compass: rename calibration array in HMC
I think naming the variable "scaling" makes more sense.
2015-08-28 12:39:09 +10:00
Staroselskii Georgii d8bddcbf3a AP_Compass: fix indentation in HMC's driver 2015-08-28 12:39:09 +10:00
Staroselskii Georgii 79ffddc6db AP_Compass: add a macro for checking calibration values in HMC 2015-08-28 12:39:08 +10:00
Lucas De Marchi f61386ae43 AP_Compass: HMC5843: release the lock before read
read() calls accumulate() which takes the lock by itself so we must
release it like we were doing before 669ae26 ("AP_Compass: encapsulated
calibration in HMC").
2015-08-28 12:39:08 +10:00
Staroselskii Georgii a9e8c1c464 AP_Compass: encapsulated calibration in HMC 2015-08-28 12:39:08 +10:00
Staroselskii Georgii 0fbc295d97 AP_Compass: encapsulated version detection in HMC driver 2015-08-28 12:39:08 +10:00
Lucas De Marchi 868d0bf3c3 AP_Compass: AK8963: refactor constructors
Declare a common constructor that others can call.
2015-08-28 12:39:08 +10:00
Lucas De Marchi a5df93bf10 AP_Compass: AK8963: be agnostic to I2C bus/address
This decision is better made by the caller rather than polluting the
driver with board-specific details.
2015-08-28 12:39:08 +10:00
Lucas De Marchi d92c2ac9f5 AP_Compass: pass backend instead of pointer to function
Just like was done for inertial sensor, different detect() functions
might need different arguments and passing a pointer to function here is
cumbersome. For example, it forces to have a method like "detect_i2c2"
rather than allowing hal.i2c2 to be passed as parameter.
2015-08-28 12:39:08 +10:00
Lucas De Marchi c66800dfec AP_InertialSensor: add singleton interface
In order to allow other libraries to use the InertialSensor we need a
way to let them to get the only instance of InertialSensor. The
conventional way to do a singleton would be to let the constructor
private and force it to be instantiated from the get_instance() method.

Here however we just call panic() on the constructor if there's already
an instance alive. This allows us to let the vehicles as is. Later we
can change it so they call the get_instance() method instead.
2015-08-28 12:39:08 +10:00
Lucas De Marchi 565c18603d AP_InertialSensor: MPU6000: export auxiliary bus 2015-08-28 12:39:08 +10:00
Lucas De Marchi caae933c28 AP_InertialSensor: Add support for auxiliary buses
Add an AuxiliaryBus class that can be derived for specific
implementations in inertial sensor backends. It's an abstract
implementation so other libraries can use the auxiliary bus exported. In
order for this to succeed the backend implementation must split the
initialization of the sensor from the actual sample collecting, like is
done in MPU6000.

When AP_InertialSensor::get_auxiliary_bus() is called it will execute
following steps:
	a) Force the backends to be detected if it's the first time it's
	   being called
	b) Find the backend identified by the id
	c) call get_auxiliary_bus() on the backend so other libraries can
	   that AuxiliaryBus to initialize a slave device

Slave devices can be used by calling AuxiliaryBus::request_next_slave()
and are owned by the caller until AuxiliaryBus::register_periodic_read()
is called. From that time on the AuxiliaryBus object takes its ownership.
This way it's possible to do the necessary cleanup later without
introducing refcounts, that we don't have support to.

Between these 2 functions the caller can configure the slave device by
doing its specific initializations by calling the passthrough_*
functions. After the initial configuration and register_periodic_read()
is called only read() can be called.
2015-08-28 12:39:08 +10:00
Lucas De Marchi 3cb6f391d4 AP_InertialSensor: MPU6000: split detection and initialization 2015-08-28 12:39:08 +10:00
Lucas De Marchi 7d9579c5d8 AP_InertialSensor: identify backend with ID
Identify backend with an id, allowing other libraries to connect to
them. This is different from the _product_id member because it
identifies the sensor, not the board the sensor is in, which is
meaningless for our use case.
2015-08-28 12:39:07 +10:00
Lucas De Marchi 22c787058e AP_InertialSensor: allow to split detection and initialization
This allows backends to have a separate detection and initialization
logic. It doesn't change any backend yet and with the current code
there's no change in behavior either. This only allows
AP_InertialSensor::_detect_backend() to be called earlier so
AP_InertialSensor object can be used by other libraries. If it's not
called, later on AP_InertialSensor::init() will detect and start all
backends.
2015-08-28 12:39:07 +10:00
Lucas De Marchi f7954ee885 AP_InertialSensor: MPU6000: allow to read generic block
We were able to read only the block of registers that are part of the
data output from accelerometer/gyroscope. In order to support reading
the external sensors we need support for reading a generic block of
registers.
2015-08-28 12:39:07 +10:00
Lucas De Marchi b5da8ad61f AP_InertialSensor: MPU6000: rename method
We're reading the sensor data available in MPU6000 so name the method
accordingly, which is also the same name used in MPU9250.
2015-08-28 12:39:07 +10:00
Lucas De Marchi d9a4d3e777 AP_InertialSensor: MPU6000: fix leaking samples 2015-08-28 12:39:07 +10:00
Lucas De Marchi f18dd17377 AP_InertialSensor: fix typos
resister->register and fix copy and paste error from MPU6000 to MPU925.
2015-08-28 12:39:07 +10:00
squilter 426dab5078 GCS_MAVLink: update severities and remove old enum 2015-08-28 10:04:35 +10:00
squilter 4a51dcc14d GCS_Console: update severities 2015-08-28 10:04:35 +10:00
squilter dfc35cca8b AP_InertialSensor: update severities 2015-08-28 10:04:35 +10:00
squilter ddda407ff3 AP_Arming: update severities 2015-08-28 10:04:35 +10:00
Paul Riseborough 21f873662c AP_NavEKF: Prevent false triggering of optical flow takeoff detection
Now that we have a pre-arm check in place to detect bad lidar, the motion check is unnecessary and can false trigger for copters with flexible undercarriages or on uneven ground.
2015-08-27 20:57:38 +09:00
Randy Mackay 1271e531e2 Mission: sanity check location 2015-08-27 15:15:56 +09:00
Randy Mackay 9ef6abf613 AP_GPS: config file for Ublox M8N
This is not directly used by the driver but this directory is where we place the recommended GPS config files
2015-08-27 09:54:22 +09: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
Randy Mackay bb891a62d3 BattMonitor: fix parameter descriptions 2015-08-26 11:17:48 +09:00
squilter 9d3a906602 GCS_Common: accept any type of severity, not just the old enum 2015-08-25 14:04:37 +09:00
Tom Pittenger 816d1f0e1b AP_GPS: resolve compiler warning re init order 2015-08-25 13:51:33 +09:00
Tom Pittenger 072d35b9cc AP_HAL_PX4: remove unused var 2015-08-25 13:51:21 +09:00
fillycheezstake 39dae7a156 Mount: fix for STORM32 serial ver 78e and higher
This fixes the structs to be compatible with the changes OlliW made to
the gimbal firmware.
http://www.olliw.eu/storm32bgc-wiki/Serial_Communication
2015-08-25 13:45:33 +09:00
Leonard Hall c357cb8f84 Copter: increase default thrust expo to 0.65 2015-08-23 16:42:05 +09:00
ziltoid2 0b1a997800 AP_IntertialSensor: don't require acceleration calibration in hil mode 2015-08-23 16:48:48 +10:00
Randy Mackay 15fc689085 AC_WPNav: remove unused get_wp_radius 2015-08-23 11:06:19 +09:00
dgrat 58e2ac4e56 Filter: Template implementation for <Filter>
There are implementations for float, Vector2f and Vector3f for the Low
Pass Filter and the *2p filter.  I tried to implement these filters
with one common template implementation.  This implementation saves
some lines of code and reduced the redundancy.  One could save even
more code if the currently overloaded isinf/isnan functions and checks
can be removed.

Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2015-08-23 11:17:02 +10:00
Tom Pittenger 2620a57700 AP_InertialSensor: Added is_still() check
very strict check that all axis are not vibrating much at all
new param: INS_STILL_THRESH used to be a vibration threshold for different platforms
// @Description: Threshold to tolerate vibration to determine if vehicle is motionless. This depends on the frame type and if there is a constant vibration due to motors before launch or after landing. Total motionless is about 0.05. Suggested values: Planes/rover use 0.1, multirotors use 1, tradHeli uses 5
2015-08-23 10:34:17 +10:00
squilter fb1bb3f571 GCS_MAVLink: make arguments mandatory for send_autopilot_version 2015-08-23 09:21:59 +09:00
Andrew Tridgell e889886e07 AP_HAL: start with the vehicle disarmed
this prevents a race condition on startup that can cause a UAVCAN ESC
to run while the vehicle is booting
2015-08-23 09:49:52 +10:00
Andrew Tridgell 31f20db139 AP_GPS: provide hdop and speed accuracy with UAVCAN GPS 2015-08-23 09:49:52 +10:00
squilter c4c63da163 GCS_MAVLink: send_autopilot_version accepts version 2015-08-21 22:40:51 +09:00
Randy Mackay a317fb40fc GCS_MAVLink: version update after common.xml change 2015-08-21 22:40:50 +09:00
squilter c10e90f837 GCS_MAVLink: regenerate common 2015-08-21 22:40:49 +09:00
Randy Mackay 79c9269891 GCS_MAVLink: rename FIRMWARE_VERSION_TYPE and fully qualify items 2015-08-21 22:40:48 +09:00
squilter 6621ecc68f GCS_MAVLink: Add FIRMWARE_RELEASE_TYPE to common.xml 2015-08-21 22:40:47 +09:00
Tom Pittenger 220163e269 AP_InertialSensor: correct USE param storage index
USE, USE2, USE3 have 20, 21, 21 but should be 20, 21, 22
2015-08-21 11:35:37 +09:00
Michael Day a5e1d8e902 AP_Mission: Give CONINTUE_AND_CHANGE_ALT a parameter: climb/descend
Param 1 denotes which direction the user expects the plane to
travel when changing altitude:

0 = no expectation, command completes when within 5 m of altitude.
1 = climb expected, command completes at or above altitude.
2 = descent expected, command completes at or below altitude.
2015-08-20 11:37:17 +10:00
Randy Mackay ec2bc5e41d NavEKF: use maxf when retrieving vibration levels
This reduces the performance hit that was caused by multiple calls to get_vibration_levels
2015-08-19 16:44:36 +09:00
Randy Mackay 46c652e42f Math: maxf and minf functions 2015-08-19 16:44:34 +09:00
Randy Mackay 629a5fd714 NavEKF: IMUSwitchState enum 2015-08-19 16:44:31 +09:00
Randy Mackay c179ed5253 NavEKF: IMU ratio set to primary accel when neither IMU is used
This forces the EKF IMU ratio to indicate which IMU is used except that it will be "0" in the unlikely case that the third IMU is used
2015-08-19 16:44:28 +09:00
Paul Riseborough 559cc29635 AP_NavEKF: Add hysteresis to IMU switching logic 2015-08-19 16:44:26 +09:00
Paul Riseborough 12e884ba6b AP_NavEKF: Modify method used to check for vibration errors
This method checks for consistency between accelerometer readings and switches to the unit with the lowest vibration of the difference exceeds 0.3g
The threshold of 1.7 m/s/s corresponds to a maximum tilt error of 10 deg assuming one IMU is good, one is bad and the EKF is using the bad IMU.
2015-08-19 16:44:24 +09:00
Randy Mackay a7569e3a61 AHRS_NavEKF: integrate INS use_accel 2015-08-19 16:44:22 +09:00
Randy Mackay 7f46cc9059 AHRS_DCM: integrate INS use_accel 2015-08-19 16:44:19 +09:00
Randy Mackay 0b981d38e8 NavEKF: incorporate use_gyro and use_accel 2015-08-19 16:44:17 +09:00
Randy Mackay e5615ec349 INS: add USE parameters 2015-08-19 16:44:15 +09:00
Randy Mackay affbd67c43 InertialSensor: add vibration monitoring of 2nd IMU 2015-08-19 16:44:12 +09:00
Tom Pittenger 1dd8b9d363 GCS_MAVLink: add support for try send mission_item_reached
also moved most of send_item_reached into common library
2015-08-19 15:26:32 +10:00
Brad Bosch 3ad0188488 HAL_VRBrain: Rework of support for FLOW_CONTROL_AUTO from PX4 HAL 2015-08-19 15:21:19 +10:00
Brad Bosch 6e9756ff79 HAL_PX4: Rework support for FLOW_CONTROL_AUTO.
Now instead of requiring the buffer to fill completely before we can
detect it is not draining, we use a time based mechanism to detect
when none of the first few bytes are transmitted after sitting in our
buffer a half second or more after flow control is enabled.  This
huristic is reliable only for the first several chracters because we
believe that the radio must still have plenty of room in it's own
buffers at that time even if it is not able to transmit them to the
other radio yet.  Note that the original algorithm made the same
assumption.

The new algorithm is especially helpful for cases where only keepalive
messages are transmitted before other packets can be requested by the
GCS.  In this situation, the original code required almost 2 minutes
to disable flow control and allow communication with the GCS.
2015-08-19 15:21:10 +10:00
Brad Bosch c87a7c7df9 GCS_MAVLink: Pause to allow serial port to drain.
This avoids a race between the UART and the auto flow control code.
2015-08-19 15:20:58 +10:00
Lucas De Marchi fa060a6124 AP_Param: add missing header StorageManager.h 2015-08-18 17:19:14 +10:00
Lucas De Marchi 29740ccb8a AP_HAL_AVR: standardize inclusion of libaries headers
It was not only standardized, but actually fixed since ".." would not
move to the libraries/ directory (and hence the include location was
actually wrong).
2015-08-18 17:12:52 +10:00
Lucas De Marchi 42fadb1845 GCS_MAVLink: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 327a3a4298 DataFlash: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi d446381623 AP_HAL_Notify: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 2011c4d988 AP_HAL_Mount: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 2c44f3e313 AP_HAL_InertialSensor: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi c007720fb7 AP_HAL_InertialNav: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi c47df44f44 AP_HAL_VRBRAIN: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi ffa37e6de2 AP_HAL_SITL: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Lucas De Marchi 83cfaf4a59 AP_HAL_PX4: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi dabfeff440 AP_HAL_Linux: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi ca17b6155e AP_HAL: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi 55beb6bc0f AP_GPS: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi 7e997564bf AP_Compass: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Lucas De Marchi b43bddc0af AP_AHRS: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Andrew Tridgell 85ab1c3444 SITL: added ignition control for gas heli 2015-08-18 13:07:19 +10:00
squilter 5cd78e722e GCS_MAVLink: version update after generate 2015-08-17 17:15:48 +09:00
squilter a77329e855 GCS_MAVLink: generate after flight_termination change 2015-08-17 17:15:45 +09:00
squilter 91479aa39f GCS_MAVLink: rename flighttermination capability enum 2015-08-17 17:15:42 +09:00
Andrew Tridgell e73ac418df HAL_PX4: prevent error on GPIO line on change of pinMode
thanks to Michael for noticing this
2015-08-17 12:02:03 +10:00
Andrew Tridgell dc455a5fd6 AP_InertialSensor: setup for MPU9250 support on PX4 2015-08-17 09:33:15 +10:00
Andrew Tridgell c2e68eaf79 SITL: tidy up frame handling a bit 2015-08-13 18:44:35 +10:00
Fredrik Hedberg e2027a8414 SITL: Add HELI_DUAL_FRAME and HELI_COMPOUND_FRAME. 2015-08-13 18:23:30 +10:00
Michael du Breuil 4f9fbc5aa7 AP_GPS: Fix a bound error when calculating GNSS minimum channels.
This is really just calculating the hamming weight of the GNSS_MODE bitmask, but I don't know if the APM compiler could handle the GCC intrinsic that could calculate it faster, and this is done so rarely there isn't a significant penalty to using the for loop.
2015-08-13 15:15:20 +10:00
Randy Mackay 8b17d32994 NavEKF: check baro health before consuming 2015-08-12 16:32:48 -07:00
Andrew Tridgell fdb104b5b6 AP_RPM: fixed build error 2015-08-12 20:50:09 +10:00
Andrew Tridgell 129f33c26d AP_RPM: define a minimum acceptable period for PWM input
this will reject very short periods as invalid. This helps somewhat
with noise on the line
2015-08-12 15:03:51 +10:00
Andrew Tridgell ab7e400a89 DataFlash: added RPM logging 2015-08-12 15:03:50 +10:00
Andrew Tridgell 0fdeb276e3 GCS_MAVLink: regenerate headers 2015-08-12 15:03:50 +10:00
Andrew Tridgell 8f1e1a1b4a GCS_MAVLink: added RPM MAVLink message 2015-08-12 15:03:49 +10:00
Andrew Tridgell 39c219d452 AP_RPM: first version of RPM sensor driver 2015-08-12 15:03:49 +10:00