Commit Graph

2422 Commits

Author SHA1 Message Date
Randy Mackay
45aeb1a921 Copter: split up loiter into 4 steps
Reduces disruption to the main loop but also introduces a delay of 30ms
to navigation output
2013-08-28 11:33:10 +09:00
Andrew Tridgell
d5e28e72cc Copter: support new RADIO_STATUS msg 2013-08-24 17:59:13 +10:00
Randy Mackay
7159c539e6 Copter: skip mode change checks when disarmed
Note: there will be a follow up commit to move the checks into a
separate function so they can be called just before arming
2013-08-22 13:25:27 +09:00
Randy Mackay
d8eb7fb82f Copter: remove x100 from IMAX definitions 2013-08-19 22:38:34 +09:00
Andrew Tridgell
a06f8a156d Copter: fixed PX4 build 2013-08-19 21:12:41 +10:00
Randy Mackay
fd047cc968 Copter: AUTO ch7/ch8 option 2013-08-19 18:09:23 +09:00
Randy Mackay
2696e160e6 Copter: surface tracking improvement
Separate correction speeds for pilot input vs altitude-above-ground
errors to allow slower correction to sonar signals.
Change SONAR_GAIN parameter to be altitude error -> desired speed.  This
means it should be set 10x larger than before.
Replace hard-coded sonar cut-off percentage of 70% with
SONAR_RELIABLE_DISTANCE_PCT.
Reduce sonar cut-off percentage to 60%.
Add desired sonar altitude to dataflash log's CTUN message.
2013-08-19 09:52:59 +09:00
Randy Mackay
88332b4acb Copter: revert to 3 element sonar's mode filter 2013-08-19 09:47:48 +09:00
Randy Mackay
3a5a15a15f Copter: allow CH6 tuning of sonar gain 2013-08-18 15:44:54 +09:00
Randy Mackay
fe56ac3839 Copter: only allow auto_trim in STABILIZE 2013-08-15 21:11:23 +09:00
Randy Mackay
69da4e99f8 Copter: add ch7/ch8 Auto and Land option
CH7/CH8 high initiates AUTO mode, low initiates Land.  Ideally high
would be a new take-off flight mode so this may need some rework.
2013-08-15 16:08:33 +09:00
Randy Mackay
ac620e2140 Copter: Loiter and AltHold won't breach alt fence 2013-08-15 16:06:27 +09:00
Randy Mackay
6a2daf1a33 Copter: reduce sonar sensitivity to spikes 2013-08-15 16:04:17 +09:00
Randy Mackay
34e874282e Copter: only check hdop when circular fence enabled 2013-08-15 16:03:57 +09:00
Randy Mackay
b40cd07ce9 Copter: switch to LOITER when exiting mission 2013-08-15 13:09:57 +09:00
Randy Mackay
d000967a76 Copter: pre-arm check for gps hdop < 2 2013-08-15 13:06:36 +09:00
Randy Mackay
8b79798e8d Copter: Leonard's sport fix re slow roll 2013-08-11 22:15:27 +09:00
Randy Mackay
34b11f7be0 Copter: angle limiter fix for max lean angle 2013-08-11 14:55:49 +09:00
Randy Mackay
6969ab573d Copter: configurable max lean angle
ANGLE_MAX parameter allows limiting the roll and pitch angles during
manual and auto flight modes to anywhere from 10 to 80 degrees
2013-08-11 12:53:22 +09:00
Randy Mackay
5049595a2c Copter: SPORT mode to use alt hold 2013-08-10 15:42:02 +09:00
Randy Mackay
d0dc5813cf Copter: move CIRCLE_RADIUS definition 2013-08-07 14:03:28 +09:00
Randy Mackay
e1fe4946fb Copter: Sprayer enable added to CH7/CH8 switch 2013-08-05 21:12:29 +09:00
Randy Mackay
74fb500efe Copter: integrate AC_Sprayer 2013-08-05 21:12:23 +09:00
Randy Mackay
49dbdce89c Copter: split ACRO_P into ACRO_RP_P and ACRO_YAW_P 2013-08-05 21:05:00 +09:00
Randy Mackay
82082e044c Copter: remove ACRO's axis enabled parameter
Acro is now body frame (with earth frame leveling) while Sport is earth
frame acro
2013-08-05 21:04:57 +09:00
Randy Mackay
786d6824ae Copter: Acro Trainer added to Ch7/Ch8 switch 2013-08-05 21:04:55 +09:00
Randy Mackay
21e523b9ac Copter: Acro trainer separated into limited and leveled 2013-08-05 21:04:53 +09:00
Randy Mackay
e32342163d Copter: rename ACRO variables 2013-08-05 21:04:50 +09:00
Leonard Hall
d2deaaa686 Copter: Acro add rate constrain and combine limit calc 2013-08-05 21:04:47 +09:00
Randy Mackay
65276d360b Copter: SPORT to use YAW_HOLD 2013-08-05 21:04:44 +09:00
Randy Mackay
39ab4f62ef Copter: add SPORT mode 2013-08-05 21:04:41 +09:00
Randy Mackay
a18d55a9d3 Copter: update version to 3.1-dev 2013-08-05 14:26:52 +09:00
Andrew Tridgell
086c7d70d8 Copter: use const references for Vector3f parameters
this is more efficient than passing a whole structure on the stack

Pair-Programmed-With: Brandon Jones <brnjones@gmail.com>
2013-08-05 10:24:24 +10:00
Andrew Tridgell
c4f11e6c74 Copter: fix longitude_scale() call for new API
Pair-Programmed-With: Brandon Jones <brnjones@gmail.com>
2013-08-05 10:24:21 +10:00
Andrew Tridgell
2690edfc5f Copter: ask for IMU samples at 100Hz
this produces the same result, but makes things simpler in the driver
2013-08-02 21:37:15 +10:00
Andrew Tridgell
01e19a32fe Copter: use the new scheduler load_average() call
this also simplifies the main loop
2013-08-02 18:46:34 +10:00
Randy Mackay
9672742b42 Copter: bug fix to look_ahead_yaw
Fix received from David Dewey
Was incorrectly using the direction instead of heading when deciding
whether to point forward or not.  Reduced YAW_LOOK_AHEAD_MIN_SPEED to
1m/s because bug meant it was nearly always pointing forward and 10m/s
(the old value) seemed too high
2013-08-01 14:12:55 +09:00
Randy Mackay
c30cfa21c5 Copter: resolve compiler warning re unused variable 2013-07-29 16:46:25 +09:00
Randy Mackay
0f8f5bc048 Copter: remove unused ap.gps_status flag 2013-07-29 16:46:05 +09:00
Randy Mackay
2c48c20088 Copter: generalize 3 pos switch for all ch7/ch8 options 2013-07-29 16:28:04 +09:00
Olivier-ADLER
87d062905e Copter: 3 positions switch support for CH7 and CH8 - new 3 positions SIMPLE / SUPERSIMPLE mode
3 positions modes must use mode number >= 100
pre-arm check correction for CH7 - CH8 check
2013-07-29 15:12:10 +09:00
Randy Mackay
c173f0c7d9 Copter: change CH7/CH8 pre-arm check string 2013-07-29 14:32:27 +09:00
Randy Mackay
0d75203d87 Copter: minor format change to exit_mission function 2013-07-28 18:19:05 +09:00
Randy Mackay
12da2d160a Copter: set landing_complete flag to false on start-up 2013-07-28 18:19:03 +09:00
Randy Mackay
3b59cde1b8 Copter: deactivate accel throttle controller when landed 2013-07-28 18:19:01 +09:00
Randy Mackay
da37089dc2 Copter: remove landing checks in loiter controller 2013-07-28 18:18:57 +09:00
Randy Mackay
8eefbdce44 Copter: turn off stability patch when landed in Loiter 2013-07-28 18:18:54 +09:00
Randy Mackay
9a1a999fba Copter: landing check changes 2013-07-28 18:18:50 +09:00
Randy Mackay
dbc18ee900 Copter: allow arming in AltHold and Loiter if landed 2013-07-28 18:18:47 +09:00
Randy Mackay
24d15517ff Copter: clear thr accel I term on take-off 2013-07-28 18:18:45 +09:00
Randy Mackay
05248738e2 Copter: bug fix for take-off in loiter 2013-07-28 18:18:43 +09:00
Randy Mackay
c3daf78340 Copter: reset loiter target when landed 2013-07-28 18:18:41 +09:00
Randy Mackay
fe412437c2 Copter: add flags for upper and lower throttle limits
Freeze desired altitude when motors hit a limit
2013-07-28 18:18:39 +09:00
Olivier-ADLER
bf6120d8b7 Copter: Move CH7 - CH8 check from read_aux_switches() to pre_arm_checks.
Moving this to pre-arm checks save some processing time and is safer.
2013-07-26 09:30:24 +09:00
Randy Mackay
c5851d2ddf Copter: remove throttle rate's I and D calcs 2013-07-23 11:02:04 +09:00
Randy Mackay
740970efa6 Copter: remove stabilize's call to calc I terms
I terms all moved to rate controllers so this will be a small
performance improvement
2013-07-23 10:37:10 +09:00
Randy Mackay
c9a875da52 Copter: remove unused earth frame rate controllers 2013-07-21 14:08:39 +09:00
Randy Mackay
43379f20c3 Copter Motors: replace limit bitmask with structure 2013-07-21 13:58:24 +09:00
Olivier-ADLER
ac0886334d Copter: Failsafe GCS typo in comments
replaced GPS by GCS word in different comments locations
2013-07-20 20:54:51 +09:00
Randy Mackay
11e7e9eaf1 Copter: WP_YAW_BEHAVIOUR param update for Look Ahead 2013-07-20 15:46:19 +09:00
Randy Mackay
c937fe45e1 Revert "Copter: Remove CH7 & CH8 Enable / Disable of GeoFence"
This reverts commit e25b8933f3.
2013-07-20 15:00:08 +09:00
Randy Mackay
7ea971d948 Copter: check set_mode for failure
Previously if set_mode failed it would return the copter to stabilize
mode.  With this commit set_mode returns a true/false indicating whether
it succeeded or not so the caller can make the decision as to the
appropriate response which could be to stay in the current flight mode
or try another flight mode.
2013-07-20 11:01:10 +09:00
Robert Lefebvre
2a9f4bbbad TradHeli: Creating new unified roll/pitch rate controller. 2013-07-19 16:16:12 +09:00
Robert Lefebvre
23ea151ca5 TradHeli: Fix Heli rate controller filter rates. 2013-07-19 16:16:10 +09:00
Robert Lefebvre
c812d07993 TradHeli: Creating motor_runup_complete bool which is to confirm that the heli motor is running. This will be used for advanced features in the future. 2013-07-19 16:16:08 +09:00
Robert Lefebvre
b4863dc997 TradHeli: Change to throttle controller to allow swash plate collective to move, even if disarmed, if we are in Acro or Stab. This is slightly dangerous... as a user could cause a problem if they do not follow the proper usage procedures. If they do not route the ESC through the APM, but instead direct to Rx. And then if they do not Arm, they could take off in Stab mode while disarmed, but then when they switch to Alt_Hold, it will drop the collective to the bottom and they will fall. This can be saved by switching back to Stab. And it requires operation outside of the normal operating procedure.
This change is being made because most heli users expect to be able to check the swash plate operation before arming and taking off.
2013-07-19 16:16:04 +09:00
Robert Lefebvre
cea0812b82 TradHeli: Rate PID Improvement. Limit Integrator wind-up when PID output is saturated. Also a little bit of general clean-up for readability. 2013-07-19 16:16:01 +09:00
Craig3DR
e25b8933f3 Copter: Remove CH7 & CH8 Enable / Disable of GeoFence 2013-07-18 17:06:53 +09:00
Andrew Tridgell
0b27bb05d4 Copter: fixed FENCE and WPNAV parameter doc generation 2013-07-18 14:58:24 +10:00
Randy Mackay
41ba4a1ed2 Copter: initialise ch7 and ch8 aux switches
This ensures that if you have simple mode or sonar attached to an
auxiliary switch it will be enabled or disabled according to the switch
immediately after start-up
2013-07-16 22:05:59 +09:00
Randy Mackay
1dcc5886d0 Copter: ensure take-off alt is at least 1m
fixes issue #377
2013-07-16 15:51:18 +09:00
Randy Mackay
e6412b6996 Copter: do not spin motors during arming process 2013-07-16 12:47:57 +09:00
Jonathan Challinger
9f51a4a4f7 Copter: Cancel arming if throttle input above cruise_throttle. 2013-07-16 12:47:55 +09:00
Jonathan Challinger
2725f219cb Copter: Warn user with motors while copter is arming 2013-07-16 12:47:51 +09:00
Randy Mackay
02b64e259d Copter: bug fix for descent during loiter_turns 2013-07-15 20:44:56 +09:00
Andrew Tridgell
9a159a5e23 Copter: make wp_distance static
removed hack with AP_Camera library
2013-07-15 09:56:45 +10:00
Randy Mackay
47ab02d686 Copter: bug fix to ROI to pull target from conditional command queue 2013-07-14 17:37:06 +09:00
Randy Mackay
f1969d5662 Copter: switch from NAV_ROI to DO_SET_ROI 2013-07-14 17:37:05 +09:00
Randy Mackay
2b5f6e2668 Copter: pre-arm checks for rc ch 1~4 min and max 2013-07-13 21:38:22 +09:00
Randy Mackay
213472102c Copter: pre-arm check of throttle failsafe value
Check throttle min is above throttle failsafe trigger and that trigger
is above ppm encoder's loss-of-signal value of 900
2013-07-13 20:25:34 +09:00
Randy Mackay
6bfcd28ade Copter: thr failsafe will not RTL if in batt failsafe
resolves issue #413
2013-07-13 19:49:25 +09:00
Randy Mackay
5a40ee7a38 Copter: fix to gps present check in mavlink extended status 1 msg 2013-07-13 10:27:50 +09:00
Randy Mackay
66d7f7b026 Copter: GCS_mavlink only send waypoints to gcs3 if initialised
Also Load parameter defaults at initialisation (although defaults are
all zero anyway so should have no effect)
2013-07-13 10:12:01 +09:00
Randy Mackay
aefb38e486 Copter: remove param to disable accel based throttle controller 2013-07-12 22:57:30 +09:00
Randy Mackay
d5b4c44926 Copter: comment fix for flight mode switch delay const 2013-07-12 22:29:14 +09:00
Rayjan Wilson
07ca8ef87a attempt to change from 1/10th second to 2/10th second on flight mode switch 2013-07-12 21:57:35 +09:00
Randy Mackay
53bff2b63e Copter: cli to report ch8 radio values 2013-07-12 21:46:03 +09:00
Randy Mackay
2f4221391e Copter: set_dead_zone renamed to set_default_dead_zone
Dead zones now set as part of rc initialisation instead of only after
eeprom is erased.
Change in use of parameter means value passed in should be 1/2 what it
was previously
2013-07-12 11:44:23 +09:00
Randy Mackay
1685ff274d TradHeli: compile error fix related to new ACRO
The motors_runup_complete must be a feature that Rob has implemented in
his clone which has not yet reached master.  We will need to restore
these lost few trad-heli specific lines once Rob's changes make it to
master.
2013-07-11 22:33:55 +09:00
Leonard Hall
64ce9b017d Copter: Body frame ACRO upgrade 2013-07-11 17:53:25 +09:00
Randy Mackay
6dd446ac79 Copter: firmware version to 3.0.1 2013-07-11 16:45:05 +09:00
Andrew Tridgell
5ae62f4f04 Copter: fixed build with specified GPS driver 2013-07-11 14:27:42 +10:00
Randy Mackay
ac5d925115 Copter: revert Loiter Pos P to 1.0 (was 0.8) 2013-07-11 12:20:31 +09:00
Randy Mackay
1590a5d58a Copter: increase Yaw Rate I 0.02 2013-07-11 12:20:29 +09:00
Randy Mackay
ab1a7baf71 Copter: project stopping point for loiter command 2013-07-11 11:39:47 +09:00
Randy Mackay
d77f7bc803 Copter: default Loiter Pos P to 0.8 (was 0.2) 2013-07-11 08:13:17 +09:00
Randy Mackay
ec65764750 Copter: typo in release notes 2013-07-11 08:04:45 +09:00
Randy Mackay
ab09dc46fb Copter: update release notes 2013-07-10 21:20:01 +09:00
Randy Mackay
345924ddec WPNav: replace LOITER_ACCEL_MAX with parameter
Also removed unused _lean_angle_max variable
2013-07-10 20:00:32 +09:00
Randy Mackay
8cb7bd628e Copter: change firmware version to 3.0.1-rc2 2013-07-10 15:52:21 +09:00