Commit Graph

2104 Commits

Author SHA1 Message Date
Randy Mackay
d2bd818b2d Copter: bug fix for auto_armed logic
Zero throttle when switching into an auto flight mode would cause the
motors to stop.
2013-04-17 21:28:42 +09:00
Andrew Tridgell
501eb4f0b4 Copter: made more variables static 2013-04-17 21:35:11 +10:00
Andrew Tridgell
61c2befd4d Copter: fixed logging for new API 2013-04-17 21:34:42 +10:00
Randy Mackay
82989d85f2 Copter: remove unused #defines 2013-04-16 22:34:12 +09:00
Randy Mackay
0663da7c9e Copter: loiter rate IMAX to 4m/s/s and D to zero 2013-04-16 22:28:18 +09:00
Randy Mackay
b8974dec99 Copter: compass learn off by default 2013-04-16 18:47:39 +09:00
Randy Mackay
a7b32caf72 Copter: bug fix for loiter_time check
loiter_time_max was changed to hold the loiter time in seconds
(previously it was milliseconds) in order to allow the delay to be more
than 65 seconds but the verify_loiter_time check was missed from that
change
2013-04-15 23:57:22 +09:00
Randy Mackay
a185fa950c Copter: Jason's fix to auto disarming
Added check so that it only starts counting down when motors are armed.
This removes the issue in which the copter sometimes disarms shortly
aftering being armed.
2013-04-15 23:36:45 +09:00
Randy Mackay
8fe3e689f4 Copter: add WPNAV log message 2013-04-15 21:54:29 +09:00
Randy Mackay
b48864e1ad Copter: allow CH6 tuning of compass declination 2013-04-15 21:50:44 +09:00
Andrew Tridgell
cf6ae4a746 Copter: remove ahrs.set_barometer() 2013-04-15 10:52:32 +10:00
Randy Mackay
8c7a1597dc Copter: remove debug comment from RTL 2013-04-14 18:28:13 +09:00
Randy Mackay
629d23b7e2 Copter: remove WP_SPEED and WP_RADIUS parameters
AC_WPNav library has equivalent params with very similar names
2013-04-14 13:27:37 +09:00
Randy Mackay
b58c26bcd5 Copter: remove pid_nav_lat, pid_nav_lon 2013-04-14 12:12:51 +09:00
Randy Mackay
bffe4fa412 Copter: remove NAV_LAT and NAV_LON
Loiter and navigation controllers now combined
2013-04-14 12:09:45 +09:00
Randy Mackay
700fb1b179 Copter: replace sin_yaw_y, cos_yaw_x in circle mode 2013-04-14 10:39:30 +09:00
Randy Mackay
366616e32c Copter: reduce default loiter PIDs 2013-04-14 10:39:28 +09:00
Randy Mackay
1ee825ee9a Copter: move alt and wp checking to AC_WPNAV
RTL fix so that if it starts rtl-ing from above 80m it returns home
while descending instead of descending at initial position.
add get and set_target_alt_for_reporting
2013-04-14 10:39:23 +09:00
Randy Mackay
2db8365c90 Copter: add AC_WPNav to parameters list 2013-04-14 10:39:02 +09:00
Randy Mackay
bc87118062 AC_WPNav: add get_target_alt method 2013-04-14 10:39:00 +09:00
Randy Mackay
6dbcbdcb43 AC_WPNav: limit max loiter position error
move interpretation of pilot input to wpnav lib
2013-04-14 10:38:58 +09:00
Randy Mackay
7c559333f5 Copter: get_throttle_rate's target_speed a float 2013-04-14 10:38:51 +09:00
Randy Mackay
926c404994 AC_WPNav: Leonard's loiter target smoothing 2013-04-14 10:38:39 +09:00
Randy Mackay
ee7f40cfe9 Copter: Leonard's alt-hold feed forward 2013-04-14 10:38:37 +09:00
Randy Mackay
f82ce449d7 AC_WPNav: add angle limits and set from AC's throttle controller 2013-04-14 10:38:34 +09:00
Randy Mackay
553f40a99c Copter: bug fix to loiter delay
change delay to seconds to allow delays longer than 65seconds
2013-04-14 10:38:30 +09:00
Randy Mackay
a65960a009 Copter: use velocity based set_loiter_target 2013-04-14 10:38:28 +09:00
Randy Mackay
e592baae11 Copter: remove remnants of fast_corner 2013-04-14 10:38:20 +09:00
Randy Mackay
4de5f67a91 Copter: replace wp_nav.get_target_alt with get_destination_alt 2013-04-14 10:38:17 +09:00
Randy Mackay
5b93990e41 Copter: removed next_WP
Use the wp_nav.get_target_alt or controller_desired_alt in it's place
2013-04-14 10:38:07 +09:00
Randy Mackay
1516972eaa Copter: add panorama to CIRCLE mode
Yaw will slowly rotate if CIRCLE_RADIUS is set to zero
Circle center is projected forward CIRCLE_RADIUS from current position
and heading
2013-04-14 10:38:01 +09:00
Randy Mackay
58ed8cd544 Copter: replace set_next_WP with direct call to wp_nav 2013-04-14 10:37:55 +09:00
Randy Mackay
49828eba7d Copter: integrate AC_WPNav 2013-04-14 10:37:48 +09:00
Randy Mackay
cdb532a594 Copter: bug fix for loiter target 2013-04-11 18:24:20 +09:00
Randy Mackay
e637a8fb29 Copter: remove old commented out code from setup.pde 2013-04-11 10:12:21 +09:00
tobias
217b8d7a59 cleanup: use const for struct Location pointers and references
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Randy Mackay
9036b97a16 Copter: fix build error
Removed last print_test_disabled call
2013-04-05 23:03:17 +09:00
Randy Mackay
fc0c451b69 Copter: remove #ifdef checks for Atmega1280 2013-04-05 22:48:10 +09:00
Randy Mackay
1dcd46bffc Copter: reduce compiler warnings 2013-04-05 22:25:58 +09:00
Randy Mackay
95d944f610 Copter: Jason's bug fix for loiter's set_next_WP_latlon 2013-04-05 13:46:07 +09:00
Randy Mackay
777c6a308e AP_InertialNav: use shared GRAVITY_MSS constant 2013-04-05 11:48:41 +09:00
Randy Mackay
d1afd2fb9b Copter: make guided mode start at current location 2013-04-03 23:06:46 +09:00
Randy Mackay
0be23c8090 Copter: fix THR_ALT_P documentation 2013-04-03 22:38:34 +09:00
Randy Mackay
3bf847f675 Copter: Jason's faster cos_yaw, sin_yaw 2013-04-02 15:50:29 +09:00
Randy Mackay
40f6416b3d Copter: update Log_Read_Compass comment 2013-04-02 11:02:14 +09:00
Randy Mackay
7cf2255822 Copter LEDs: replace bitRead with bitmask
Consolidate all checks of led_mode to leds.pde
Add #defines for bitmasks comparisons
Some formatting changes
2013-04-01 13:10:12 +09:00
Randy Mackay
a9eb626cb8 Copter: update default Rate Yaw P to 0.20 (was 0.25) 2013-04-01 11:49:50 +09:00
Randy Mackay
7ccb14344c Copter: update version to 2.9.1b-dev 2013-04-01 11:47:56 +09:00
Randy Mackay
7d4eea271f Copter: update Release notes again for 2.9.1b release
Missed item re increasing max inav accel correction to 3 m/s
2013-04-01 11:46:42 +09:00
Randy Mackay
49e3e040b6 Copter: update Release notes ahead of 2.9.1b release 2013-04-01 11:46:37 +09:00
Randy Mackay
24dd167607 Copter: ACRO bug fix from Jason 2013-04-01 11:44:28 +09:00
Michael Oborne
541fa13291 cleanup comments 2013-03-31 17:14:54 +08:00
Michael Oborne
e80f2c094e HIL fix location, alt, mag from hil state message 2013-03-31 16:42:16 +08:00
Michael Oborne
59f80410d5 Add ability to compile sensor hil with sitl 2013-03-31 16:35:23 +08:00
Andrew Tridgell
b280857025 Copter: use common angle wrap code 2013-03-29 13:14:31 +11:00
Randy Mackay
f7d977fe37 Copter: add support for GPS fix type 2D 2013-03-27 11:41:47 +09:00
Andrew Tridgell
b955aed976 Copter: fixed GPS test (detection of uBlox needs 10Hz poll) 2013-03-21 22:45:07 +11:00
Andrew Tridgell
d22a7c64c9 Copter: only enter CLI is link is idle when 3 enters are hit
this will prevent binary contents of RADIO packets being interpreted
as CLI enter line-feeds
2013-03-21 21:56:02 +11:00
Andrew Tridgell
ce8313e8fb Copter: only allow CLI within 20s of startup and when motors not armed 2013-03-21 17:34:11 +11:00
Randy Mackay
80bd593814 Copter: disarm motors when entering CLI 2013-03-21 12:07:00 +09:00
Randy Mackay
dcf21eee8f Copter: only allow entering the CLI within 30 seconds of start-up 2013-03-21 11:54:04 +09:00
Andrew Tridgell
ae96c77add Copter: added shell command in CLI test menu 2013-03-20 12:35:50 +11:00
Randy Mackay
38e81adae0 InertialNav: remove unnecessary "virtual" from function definitions
This saves about 30bytes of RAM
2013-03-19 17:51:16 +09:00
Randy Mackay
a17421da27 Copter: scale HIL accels consistently with Plane code 2013-03-19 15:07:15 +09:00
Randy Mackay
b4b9d80c2f Copter: bug fix to accept HIL accel values correctly 2013-03-19 11:33:58 +09:00
John Stäck
46a831fc03 Copter: add parameter "set" and "show" commands to setup menu.
Squashed commit of the following:

commit 4243a0bb89de2f850606c623aac6a5b583c333ae
Author: John Stack <stack@spotify.com>
Date:   Thu Mar 7 09:28:16 2013 +0100

    Undo change to system.pde, not needed.

commit dae2dbbbd6e13621fccc1d0a221aae8d83240417
Author: John Stack <stack@spotify.com>
Date:   Wed Mar 6 22:47:50 2013 +0100

    Remove leftover bits of old menu setup

commit ccefc8fe0d237364b06a1478348f8552720d7598
Author: John Stack <stack@spotify.com>
Date:   Wed Mar 6 22:40:30 2013 +0100

    Roll the param menu into setup.

commit c61dad17bf32a3080d8eca2389c6e25f98767545
Author: John Stack <stack@spotify.com>
Date:   Wed Mar 6 08:08:42 2013 +0100

    Make the param menu a compile-time option, by defining PARAM_MENU

commit 0f35c4e88ec7aba5035b4880e9994e4783da75a9
Author: John Stack <stack@spotify.com>
Date:   Wed Mar 6 07:57:22 2013 +0100

    Use find(), which works well.

commit 3b81b29597fcee49193330d7b6d3f3aed99a476c
Author: John Stack <stack@spotify.com>
Date:   Tue Mar 5 07:57:33 2013 +0100

    Whitespace fixes

commit 6b9ccc5fe1de1e40a24eb9ff89006b9bd80e3662
Author: John Stack <stack@spotify.com>
Date:   Tue Mar 5 07:28:20 2013 +0100

    Add cli menu to change any parameter.
2013-03-18 15:49:41 +09:00
Andrew Tridgell
952c56e990 Copter: fixed barometer init in HIL sensors mode 2013-03-18 16:20:25 +11:00
Andrew Tridgell
ac06b5e62d Copter: remove unused function 2013-03-18 16:20:25 +11:00
Randy Mackay
36834e77b5 Copter: remove support for CLI Slider 2013-03-18 14:07:04 +09:00
Randy Mackay
597a4b912a Copter: fix to allow building HIL_MODE_SENSORS 2013-03-18 13:41:52 +09:00
Randy Mackay
d1344e8c39 Copter: remove #define for CROSSTRACK_GAIN
Note: the cross track is still calculated inside the inertial nav based
loiter and wp controls but it's no longer requires a tunable parameter
2013-03-17 16:56:18 +09:00
Randy Mackay
1b6fcad90a Copter: remove tilt compensation parameter
Note: this idea of feed forward tilt compensation is being incorporated
into the inertial nav based loiter and wp controllers but does not
require a separate tunable parameter
2013-03-17 16:53:32 +09:00
Randy Mackay
61e29173e3 Copter: remove unused crosstrack variables and parameters
Cross track is still calculated internally to the wpnav controller so we
should move this to a library and still report it to the ground station
2013-03-17 16:46:31 +09:00
Randy Mackay
a1295c042b Copter: fix init of wp_verify_byte so wp alt is always required 2013-03-17 16:37:30 +09:00
Randy Mackay
fdcb78ccf7 Copter: leonard's smoother alt-hold transition
Target altitude when entering alt-hold is based on a projection from
current alt and climb rate
2013-03-17 13:24:49 +09:00
Randy Mackay
37040adfaa Copter: bug fix for auto missions over 320m
get_throttle_althold_with_slew's target_alt parameter defined as int16_t
(instead of int32_t) meaning missions with altitudes >320m could wrap
around and become negative.
2013-03-17 11:14:35 +09:00
Randy Mackay
150046f2b8 Copter: GPS Failsafe implemented
Switches to LAND mode 5 seconds after losing GPS if you're in a flight
mode that requires a GPS
2013-03-16 17:27:46 +09:00
Randy Mackay
f9539384a1 Copter: rename failsafe to failsafe_radio
Makes way for separation of failsafes for throttle, gps and gcs
2013-03-16 17:14:21 +09:00
Randy Mackay
f263e81ed7 Copter: remove unused GPS and baro filters
Saves 24bytes of RAM
Removing the baro filter leads to noisier Baro Alt appearing in the log
so we should make the inertial nav altitude appear in the CTUN message
2013-03-16 00:20:15 +09:00
Randy Mackay
5380973225 Copter: only start delay timer after reaching wp location and altitude 2013-03-06 12:50:41 +09:00
Randy Mackay
a73f50494c TradHeli: remove duplicate RC_FAST_SPEED definition 2013-03-04 23:45:23 +09:00
Randy Mackay
cb6ffc7acf Copter: minor formatting fix for report_ins 2013-03-04 23:14:14 +09:00
Randy Mackay
998511f506 Copter: use unsigned long for dataflash log for gps time
Updated some formatting of comments in the same file
2013-03-04 23:13:06 +09:00
Randy Mackay
33bd984a91 Copter: remove unused input_voltage parameter 2013-03-03 23:23:54 +09:00
Randy Mackay
cb84ec9d9b Copter: add current based compass compensation 2013-03-03 23:02:36 +09:00
Andrew Tridgell
c2fd1512ff Copter: use voltage_average() so as to avoid INPUT_VOLTS 2013-03-03 16:16:01 +11:00
Randy Mackay
0d5e731a65 Copter: add compassmot to cli
Allows user to setup compensation for motor's interference on the
compass
2013-03-02 17:54:18 +09:00
Randy Mackay
476a6d0164 Copter: fix for acro throttle bug 2013-03-02 10:28:44 +09:00
Randy Mackay
6b2b69535f Copter: Compass log stores/retrieves motor offsets 2013-03-02 00:03:20 +09:00
Randy Mackay
d8515ff85e Compass: basic compensation for motor interference 2013-03-02 00:03:16 +09:00
Andrew Tridgell
637ecd5279 Copter: updates for new dataflash API 2013-03-01 07:18:26 +11:00
Andrew Tridgell
9a3bd17cfb Copter: fixes for new DataFlash API 2013-03-01 07:18:25 +11:00
Randy Mackay
e0506bd622 Copter: inav circle initial implementation 2013-02-26 11:35:35 +09:00
Randy Mackay
c8f09ac219 Copter: fix compile error for PX4 re Compass logging 2013-02-25 13:26:58 +09:00
Randy Mackay
d6ff5ae261 Copter: add roll-pitch slew for auto modes
Added reporting of roll, pitch inputs for ACRO, AUTO
2013-02-24 14:42:04 +09:00
Randy Mackay
e297ba7d18 Copter: update default loiter gains for inertial nav 2013-02-24 14:42:00 +09:00
Randy Mackay
102b5da59d Copter: remove unnecessary #defines from APM_Config.h 2013-02-24 14:41:56 +09:00
Randy Mackay
cbde042ec5 Copter: remove non-inav loiter and wp controllers
lon_speed, lat_speed changed to float
do_takeoff, do_land now set roll-pitch, yaw and nav modes specifically
removed fast_corners functionality (may need to be reimplemented with
new inertial nav controllers)
2013-02-24 14:41:52 +09:00
Randy Mackay
609676e26c Copter: add logging of compass values
Removed rarely used ITERM because we didn't have enough bits in the log
mask
2013-02-24 14:41:48 +09:00
Randy Mackay
6f27bc7ae5 Copter: remove filters from inav loiter 2013-02-24 14:41:44 +09:00