Commit Graph

6094 Commits

Author SHA1 Message Date
Randy Mackay b64f9ed964 OptFlow: rename and restructure OpticalFlow class
AP_OpticalFlow.h becomes simply a file that includes all other optical
flow header files.
OpticalFlow class simplified to only return surface quality, raw output
and velocity vector.
2014-10-15 16:35:29 +09:00
Andrew Tridgell 4ad643b233 AP_AHRS: use a common function for updating the CD values
this ensures the wrapping of yaw is consistent between the 3 use cases
2014-10-15 13:18:08 +11:00
Andrew Tridgell eec5cd5add AP_AHRS: restore DCM attitude before update()
The DCM drift correction code uses the current attitude to calculate
error values to update its gyro drift correction. If we were using EKF
then without this patch the DCM code running as an alternative AHRS
source would be using the EKF attitude for calculating the error
value, leading to very bad gyro drift estimation
2014-10-15 11:15:33 +11:00
Andrew Tridgell 63c06ea2af AP_AHRS: fixed calls to DCM in parent class
use_compass() and reset() are common to AP_AHRS_DCM and
AP_AHRS_NavEKF. As AP_AHRS_NavEKF is a child of AP_AHRS_DCM, when we
call use_compass() from within AP_AHRS_DCM we actually end up calling
AP_AHRS_NavEKF::use_compass().

This has the effect of disabling the compass in DCM when EKF is active
and EKF has decided not to use the compass. That means that the DCM
yaw (and in fact the whole attitude) can get badly off while EKF is
enabled, making DCM an ineffective fallback if EKF fails.

The fix is to call the specific class versions of use_compass() and
reset()
2014-10-15 10:12:50 +11:00
Andrew Tridgell b437977547 AP_Compass: added set_offsets() interface
this will be used by Replay to prevent the need for saving parameters
2014-10-15 09:16:31 +11:00
Randy Mackay 6690aff305 AC_Motors: param description addition 2014-10-14 12:43:22 +09:00
Randy Mackay d09faa0015 BattMon: minor param description additions 2014-10-14 12:42:57 +09:00
Randy Mackay 45e0e48e54 BattMon: minor param description update 2014-10-14 12:42:45 +09:00
Randy Mackay 3a81732721 Baro: minor param description updates 2014-10-14 12:42:27 +09:00
Randy Mackay be1621877f Mission: support GUIDED_ENABLE and GUIDED_LIMITS
This replaces the ardupilot only NAV_GUIDED command.
Also remove support for NAV_VELOCITY mission command which will be
replaced by SET_POSITION_TARGET non-mission command.
2014-10-13 21:40:23 +09:00
Andrew Tridgell 3c7cc5f40c AP_RangeFinder: auto-update PX4 ll40ls max/min distance
this allows the range of the Lidar to be set by the user using
RNGFND_MAX_CM and RNGFND_MIN_CM
2014-10-13 19:07:38 +11:00
Jonathan Challinger 4a397a8d67 AC_PosControl: Protect from divide-by-zero in get_stopping_point_xy 2014-10-10 21:17:12 +09:00
Randy Mackay 023b2c0d6b AP_InertialNav: fixed use of ahrs.get_velocity with EKF disabled 2014-10-09 16:43:24 +09:00
Andrew Tridgell 7b02d326f6 AP_InertialNav: fixed use of _ahrs.get_relative_position_NED() with EKF disabled
this prevents a floating point error caused by using an uninitialised
vector3 when switching between DCM and EKF control in AP_InertialNav

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2014-10-09 18:30:20 +11:00
Andrew Tridgell 39fadad7d6 HAL_Linux: fixed build warnings 2014-10-09 16:49:23 +11:00
Andrew Tridgell b3894e8b10 HAL_VRBRAIN: reduce the number of times we split up UART reads and writes 2014-10-09 12:29:25 +11:00
Andrew Tridgell 10b0ca7ea8 HAL_PX4: reduce the number of times we split up UART reads and writes 2014-10-09 12:29:25 +11:00
Andrew Tridgell c834589daa HAL_Linux: reduce the number of times we split up UART reads 2014-10-09 12:29:25 +11:00
Andrew Tridgell 076bb1294e HAL_Linux: improved UDP packetisation and add flow control reporting
report we have flow control on UDP and TCP
2014-10-09 12:29:25 +11:00
Randy Mackay 834f2bea07 INS: add gyro_calibrated_ok_all method
This returns true if the gyros have been calibrated successfully
2014-10-09 10:00:07 +09:00
Andrew Tridgell 70ca87c4e6 AP_RangeFinder: handle all I2C rangefinder types on PX4 in PX4Firmware 2014-10-09 11:06:16 +11:00
Andrew Tridgell cebfef3ead HAL_Linux: don't accept less than 5 input channels 2014-10-09 09:19:35 +11:00
Andrew Tridgell a3fee16604 HAL_Linux: added DSM/Spektrum RCInput support
this decodes DSM using the RCIN pulses from the PRU
2014-10-08 12:50:50 +11:00
Andrew Tridgell 3e3f87188b HAL_Linux: enable DSM power pin 2014-10-08 12:50:50 +11:00
Andrew Tridgell 50e5ae6f7a HAL_Linux: added low level DSM decoder
based on dsm.c from PX4 project
2014-10-08 12:50:50 +11:00
Andrew Tridgell 9b207d029d HAL_Linux: change ring buffer to 300 entries 2014-10-07 14:57:34 +11:00
Andrew Tridgell b1845ed00d HAL_Linux: initial support for parallel SBUS and PPM-SUM decoding 2014-10-07 14:57:34 +11:00
Andrew Tridgell 42e9dc3c31 HAL_Linux: added SBUS decoder from PX4 project
thanks Lorenz!
2014-10-07 14:57:34 +11:00
Andrew Tridgell 809b6cc855 AP_AHRS: added get_yaw_rate_earth()
used to estimate course correction on takeoff
2014-10-07 07:17:46 +11:00
Craig Elder be352e9471 AP_GPS: Removed CFG-DAT message from 3DR-Ublox-NEO7
CFG-DAT is generated by U-Center but no longer used by the receiver.
2014-10-06 11:21:42 -07:00
Andrew Tridgell e0e534628b HAL_Linux: support direct UDP output from UART drivers
this allows safe operation over WiFi links without MAVProxy
2014-10-06 15:13:03 +11:00
Randy Mackay 1754cacf3c AC_PosControl: remove completed to-do comments 2014-10-04 23:49:24 +09:00
Randy Mackay f65e81cb07 AC_AttControl: remove some old comments 2014-10-04 23:49:21 +09:00
Randy Mackay 793ed20534 CoaxCopter: set throttle upper and lower flags 2014-10-04 23:49:19 +09:00
Randy Mackay 57f6d0ff60 SingleCopter: set throttle upper and lower flags 2014-10-04 23:49:16 +09:00
Randy Mackay 85fb4b122a MotorsMatrix: _min_throttle interpreted as 0 ~ 1000 range for throttle_lower flag
Also trigger throttle_upper flag when throttle in reaches 1000
2014-10-04 23:49:14 +09:00
Randy Mackay 91e5201439 Tri: _min_throttle interpreted as 0~1000 range for throttle_lower flag
limit.throttle_lower flag becomes true when the throttle passed into the
motors lib (which is in the 0 ~ 1000 range) is below _min throttle.
This makes the interpretation of the THR_MIN parameter consistent
between the main code (which uses 0 ~ 1000 range) and the motors lib
(which previously used the RC3_MIN ~ RC3_MAX range).
The remaining problem however is that the output of the motors continues
to use THR_MIN as if it were a pwm.  I don't believe this is a dangerous
problem however.
2014-10-04 23:49:11 +09:00
Craig Elder 7367ea04a7 AP_GPS: Adding support for the NEO7 GPS 2014-10-03 03:21:28 -07:00
priseborough 8aa267f75f AP_NavEKF : Fix bug in reset of GPS glitch offset
The GPS glitch offset was being zeroed during position resets. This caused the filter to reject subsequent GPS measurements if the GPS error persisted long enough to invoke a timeout and a position reset.
2014-10-03 09:17:03 +10:00
Randy Mackay b3bbec24e4 RangeFinder: TYPE param description to PX4-I2C 2014-10-02 20:24:14 +09:00
Randy Mackay 8ce4893180 RangeFinder: TYPE param description to PX4-MaxbotixI2C
This hopefully reduces confusion for PX4/Pixhawk users with MaxBotix I2C
sonar
2014-10-02 16:49:15 +09:00
Randy Mackay 85eee31510 AHRS: rename ekfNotStarted method to initialised
Also created default implementation in AP_AHRS class so AP_AHRS_DCM does
not need to implement it.
2014-10-02 14:40:54 +09:00
priseborough 7cea7c6a18 AP_AHRS : add method to report if EKF is waiting to start 2014-10-02 14:38:29 +09:00
Andrew Tridgell 60aa017e11 GCS_MAVLink: added handle_set_mode() function 2014-10-01 14:19:04 +10:00
Randy Mackay 7caa611eb1 Compass_HIL: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay 86aac4f40c Compass_HMC5843: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay 900896977c Compass_VRBrain: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay 85e82a0399 Compass_PX4: use instance specific orient and external 2014-10-01 13:02:03 +10:00
Randy Mackay 023b6afe8b Compass: add ORIENT2 and EXTERNAL2 params 2014-10-01 13:02:03 +10:00
Randy Mackay 16058cb730 Compass_VRBrain: primary compass based on use_for_yaw 2014-10-01 13:02:02 +10:00