Commit Graph

20790 Commits

Author SHA1 Message Date
Andrew Tridgell 5d5c398344 AP_BoardConfig: raise UAVCAN startup time
new version needs a longer time to start sensors
2016-03-04 14:57:16 +11:00
Andrew Tridgell dbefd87dd0 mk: support uavcan submodules
first recursive git submodules. yuck.
2016-03-04 14:57:16 +11:00
Andrew Tridgell 9c2d4b6a7f modules: updates for uavcan 2016-03-04 14:57:16 +11:00
Randy Mackay 2e669a35e7 Copter: deploy landing gear when parachute is released 2016-03-04 10:48:19 +09:00
Lucas De Marchi 47be4b5868 AP_OpticalFlow: fix use of undefined variable
../../libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp:86:5: warning: "FLOWONBOARD_DEBUG" is not defined [-Wundef]
 #if FLOWONBOARD_DEBUG
     ^
2016-03-03 18:37:15 -03:00
Gustavo Jose de Sousa 86c1c6da5c waf: fix environment boolean values
It is more natural to use `env.FOO = True` then `env.foo = [True]`.
2016-03-03 14:58:03 -03:00
Gustavo Jose de Sousa 79b724dce8 waf: ardupilotwaf: fix board env processing
Two things are fixed with this patch:
    1. We sort dictionaries' keys if they aren't OrderedDict instances. Since
    dict objects don't guarantee order, environment variables may have contents
    in wrong order, causing unnecessary rebuilds.
    2. We only use prepend_value() if there's already a value set for the key
    and that value is list. Before this change, boards couldn't set
    non-iterable values.
2016-03-03 14:58:03 -03:00
Tom Pittenger ff249788bf Plane: add a default Navigation option as explained in the param docs 2016-03-03 09:16:26 -08:00
Randy Mackay f66d5f7a8c Plane: use ahrs.get_origin instead of ekf.getOriginLLH
This ensures we get the origin from the active EKF
2016-03-03 16:20:59 +09:00
Randy Mackay 62435d3a11 Rover: use ahrs.get_origin instead of ekf.getOriginLLH
This ensures we get the origin from the active EKF
2016-03-03 16:20:56 +09:00
Randy Mackay 0dffeec07f Copter: use ahrs.get_origin instead of ekf.getOriginLLH
This ensures we get the origin from the active EKF
2016-03-03 16:20:54 +09:00
Randy Mackay a93a0d370a Copter: add throw mode to aux switches 2016-03-03 15:30:03 +09:00
Randy Mackay dca89e7fe7 Copter: throw static variables moved to global scope 2016-03-03 12:18:27 +09:00
Randy Mackay 24cfbeebd0 Copter: add throw_exit 2016-03-03 12:18:25 +09:00
Randy Mackay 959c0eccfd Copter: reject changing to throw mode while armed 2016-03-03 12:18:23 +09:00
Randy Mackay 20b6688e77 Copter: add throw to FLTMODE param descriptions 2016-03-03 12:18:20 +09:00
Paul Riseborough 1aade494fc AP_State: enable use of motor interlock during throw mode 2016-03-03 12:18:18 +09:00
Paul Riseborough 1e8af3dea4 AP_Notify: Add tone sequence to alert user when throw detector is armed
Use a medium tempo ascending three tone sequence with sufficient gap to allow the throwing action to be completed without distraction.
2016-03-03 12:18:16 +09:00
Paul Riseborough a7b69366a1 Copter: Add flight mode for throw launch
The is commit adds a new flight mode called 'Throw' to Copter that enables the copter to be thrown into the air to start motors. This mode can only be netered when the copters EKF has a valid position estimate and goes through the following states

Throw_Disarmed - The copter is disarmed and motors are off.
Throw_Detecting - The copter is armed, but motors will not spin unless THROW_MOT_START has been set to 1. The copter is waiting to detect the throw. A throw with an upwards velocity of at least 50cm/s is required to trigger the detector.
Throw_Uprighting - The throw has been detected and the copter is being uprighted with 50% throttle to maximise control authority. This state transitions when the copter is within 30 degrees of level.
Throw_HgtStabilise - The copter is kept level and height is stabilised about the target height which is 3m above the height at which the throw release was detected. This state transitions when the height is no more than 0.5m below the demanded height.
Throw_PosHold - The horizontal motion is arrested and the copter is kept at a constant position and height.
2016-03-03 12:18:13 +09:00
Tom Pittenger 67e2db7975 AP_TECS: add TECS_LAND_PDAMP
// @Description: This is the damping gain for the pitch demand loop. Increase to add damping  to correct for oscillations in speed and height. If set to 0 then TECS_PTCH_DAMP will be used instead.
2016-03-02 10:54:21 -08:00
Tom Pittenger fcb802cccc AP_TECS: add TECS_LAND_I_GAIN and TECS_TKOFF_I_GAIN
// more integral gain options for land
2016-03-02 10:54:20 -08:00
Tom Pittenger a139789693 AP_TECS: add TECS_LAND_TDAMP for land damp
+     // @Description: This is the damping gain for the throttle demand loop during and auto-landing. Same as TECS_THR_DAMP but only in effect during an auto-land. Increase to add damping to correct for oscillations in speed and height. When set to 0 landing throttle damp is controlled by TECS_THR_DAMP.
2016-03-02 10:54:19 -08:00
Tom Pittenger 75be40ea59 Plane: add LAND_THR_SLEW 2016-03-02 10:54:19 -08:00
Tom Pittenger ed6aa4ed17 Plane: added throttle limiting via max power (current*voltage) 2016-03-02 10:20:44 -08:00
Tom Pittenger 035f3b16a1 AP_BattMonitor: add new param BATT_WATT_MAX
Description: If battery wattage (voltage * current) exceeds this value then the system will reduce max throttle (THR_MAX and TKOFF_THR_MAX) to satisfy this limit. This helps limit high current to low C rated batteries regardless of battery voltage. The max throttle will slowly grow back to THR_MAX (or TKOFF_THR_MAX) if demanding the current max and under the watt max.
2016-03-02 10:14:25 -08:00
Tom Pittenger bf5005103c Plane: allow loiter waypoints to have a zero lat/lng or alt to mean use current 2016-03-02 08:49:11 -08:00
Tom Pittenger 278fb2e60d AP_Math: add location sanity checker/fixer util 2016-03-02 08:48:26 -08:00
Tom Pittenger be3941efdf Plane: unify loiter mission items to require heading to next wp
- except loiter_unlimited because it never exits
2016-03-02 08:48:25 -08:00
Tom Pittenger 1c513a99a0 AP_Mission: removed LOITER_TO_ALT heading requirement param field
- and increased loiter radius max size (8bit to 16bit), it will soon always have heading requirement along with all loiter cmds
2016-03-02 08:48:24 -08:00
Alexey Bulatov 3933ac2a63 AP_GPS: Added ERB to AP_GPS 2016-03-02 06:04:52 -08:00
Alexey Bulatov 7e2c822499 AP_GPS: Structure for detect ERB 2016-03-02 06:04:46 -08:00
Alexey Bulatov 97190c89d1 AP_GPS: ERB GPS driver
ERB - Emlid Reach Binary protocol.
That driver designed for communication between Reach
and ArduPilot.
Provided opportunities:
- Detection of the driver
- Parsing of input messages: status of transmitter
and navigation information.
- Inject GPS messages from base
2016-03-02 06:04:39 -08:00
Jonathan Challinger e946e047e6 AC_AttitudeControl: add attitude_controller_run functions, call from input functions 2016-03-02 20:16:18 +09:00
Tom Pittenger c0a6a94936 AP_IntertialNav: ensure we work on valid updated data 2016-03-02 10:53:07 +09:00
Paul Riseborough 38b3625ed8 AP_NavEKF2: Fix bug in initial alignment calculation
The bug caused the initial roll angle to be incorrect if the vehicle was powered up when inverted, causing long alignment times.
2016-03-02 09:10:09 +09:00
Lucas De Marchi e770cf059d APMRover2: initialize variable to fix build
Fix the following build error on clang:

../../APMrover2/test.cpp:164:4: fatal error: variable 'fail_test' is uninitialized when used here [-Wuninitialized]
   fail_test++;
   ^~~~~~~~~
../../APMrover2/test.cpp:139:19: note: initialize the variable 'fail_test' to silence this warning
 uint8_t fail_test;
                  ^
2016-03-01 10:25:28 -03:00
Paul Riseborough 2888bdd6d5 AP_NavEKF: Protect against possible div by 0 2016-03-01 10:08:47 -03:00
Paul Riseborough 7d6b926749 AP_NavEKF2: Improved magnetic heading fusion
Use an Euler yaw heading that switches between a 321 and 312 rotation
sequence to avoid areas of singularity.  Using Euler yaw decouples the
observation from the roll and pitch states and prevents magnetic
disturbances from affecting roll and pitch via the magnetometer fusion
process.
2016-03-01 10:08:47 -03:00
Randy Mackay e502e0fc2e SoloGimbal: resolve compiler warning re float comparison 2016-03-01 21:51:43 +09:00
Randy Mackay 438769c8ae SoloGimbal: resolve compiler warning re initialisation order 2016-03-01 21:51:41 +09:00
Paul Riseborough bb74371c58 AP_NavEKF2: Do not use GPS height if GPS accuracy is poor
If we are using GPS height, revert back to using Baro height if the GPS accuracy is poor.
2016-03-01 15:13:13 +09:00
Lucas De Marchi cca8a86962 Tools: Use GCC 4.9 as an Ubuntu prereq
This should actually use the install-prereq script so we don't duplicate
effort on the maintenance of these scripts. But let's at least install
the correct version for now.
2016-02-29 17:00:27 -03:00
Fredrik Hedberg e88e8835b1 Tools: Use GCC 4.9 as an Ubuntu prereq as older version is no longer available. 2016-02-29 16:58:48 -03:00
Tom Pittenger b1ea82079e AP_Rangefinder: compiler warning float to double on atof()
- this is horribly inefficient so better to change the parsing
2016-02-29 10:26:31 -08:00
Tom Pittenger 9e452838ab Plane: loiter missions to default to loiter_radius if mission says 0 or 1.
- except loiter_unlim which uses RTL_loiter, although I'm not sure why.
2016-02-29 10:12:20 -08:00
Tom Pittenger ed98617d42 Plane: utilize radius for loiter commands 2016-02-29 06:43:29 -08:00
Tom Pittenger 068374658c AP_Mission: utilize radius for loiter commands 2016-02-29 06:43:19 -08:00
Andrew Tridgell f35d05e374 Plane: improved quadplane default gains
0.25 is better for an average quadplane for roll/pitch

0.5 is a bit high for accel-z, 0.3 is better
2016-02-29 21:46:27 +11:00
Andrew Tridgell 93ac82e1f6 Plane: write voltage/current much more frequently 2016-02-29 21:24:54 +11:00
Randy Mackay e428abde42 Copter: enable precision landing by default 2016-02-29 19:17:20 +09:00