Commit Graph

1219 Commits

Author SHA1 Message Date
jasonshort e1b677a25d Reworked the filtering algorithm based on Maxbotics recommendations to use a Mode filter
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2965 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-30 20:35:36 +00:00
jasonshort 61dc79f65b Added some missing functions needed to get HIL to compile
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2964 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-30 20:34:23 +00:00
jasonshort eb39d2d53a Added ability to grab an unfiltered value from the ADC
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2963 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-30 20:33:45 +00:00
tridge60@gmail.com da2a1d72e2 GPS: fixed the GPS specific test programs
This fixes the build

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2962 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-30 08:48:17 +00:00
mich146@hotmail.com 358fd56d57 Fix Hil build on 2560
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2961 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-30 01:39:12 +00:00
jasonshort 915a564b8f Changed the PID derivative filter to a moving average with 4 samples. Having great luck with it and High kD when using noisy sensors.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2957 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-29 21:52:37 +00:00
tridge60@gmail.com 6061ee4b81 HIL: fixed radio_status in setHIL() for APM_RC
thanks to Michael Oborne for noticing this!

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2952 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-28 12:11:25 +00:00
rmackay9@yahoo.com 48b2f0bd9e TradHeli - updated gps mount design files
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2949 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-26 14:13:48 +00:00
rmackay9@yahoo.com 84a6fc4834 TradHeli - mounting plate and gps mount design files
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2946 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-26 12:42:36 +00:00
jphelirc 8907ee5b0a fixed defaults
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2944 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-26 03:44:16 +00:00
jphelirc 2d094da38e added relay control to CH6
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2943 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-26 03:37:41 +00:00
tridge60@gmail.com 586acf4342 fixed quad PWM clipping
this adopts the simpler approach suggested by Jason.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2936 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-22 21:25:59 +00:00
mich146@hotmail.com 7210d6decb fix float issues - crosstrack & target alt
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2935 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-21 23:36:22 +00:00
rmackay9@yahoo.com f5d17f756a ACM - partial integration of optical flow sensor
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2934 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-21 23:14:53 +00:00
tridge60@gmail.com e80ed6d687 quad: fixed the clipping of PWM outputs
when we clip a motor output we need to decrease the opposite motor by
the same amount, otherwise we lose the ability to control the quad
when the servo outputs are extreme

Found using the quad HIL test. Thanks to Jani for testing this on a
real quad!

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2929 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-20 00:33:04 +00:00
rmackay9@yahoo.com 09256e12da DataFlash library - changed to use standard arduino SPI library
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2928 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-19 23:00:18 +00:00
tridge60@gmail.com 6e179db689 HIL: fixed build with HIL and logging
thanks to Jani for noticing this

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2925 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-19 10:51:07 +00:00
tridge60@gmail.com efae9dddd5 HIL: we only need 50Hz attitude for HIL
putting it in the fastest loop clogged up mavlink too much

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2923 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-19 09:49:57 +00:00
rmackay9@yahoo.com 3d641a3b45 AP_OpticalFlow - fixes to position calculations (lat was reversed and would calculate position even with surface quality was very low)
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2913 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-18 21:51:27 +00:00
jasonshort c79ff4f583 doubled Slew rate limiter to 2 m/s max @ 10 hz.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2912 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-18 18:18:47 +00:00
tridge60@gmail.com 98980d6f61 HIL: fixed altitude calculation
ACM uses a zero home altitude, so we need an offset when using GPS for
altitude

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2910 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-18 12:44:02 +00:00
tridge60@gmail.com 60bf2182e4 GPS-HIL: set new_data on setHIL()
this fixes navigation for ACM in HIL

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2909 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-18 12:42:36 +00:00
jasonshort b3e629cfbf 2.0.37
Added rate of change limit for noisy Sonars.
converted to static functions - Tridge
New Throttle PIDs from Jack

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2904 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 19:14:23 +00:00
jasonshort e07c0aab7a 2.0.37
Added rate of change limit for noisy Sonars.
converted to static functions - Tridge


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2902 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 19:08:29 +00:00
jasonshort d04d32c40c 2.0.37
Added rate of change limit for noisy Sonars.
converted to static functions - Tridge


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2901 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 19:08:17 +00:00
jasonshort a1733ee901 Added a slew rate limit
reworked filter, same results, just wanted to get rid of modulus.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2900 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 19:05:18 +00:00
tridge60@gmail.com 6b0c938176 CLI: make it possible to completely disable the CLI
set CLI_ENABLED to DISABLED for no CLI. This saves a lot of memory

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2895 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:34:05 +00:00
tridge60@gmail.com e6d9a6921a HIL: don't access dcm functions in HIL mode
the dcm is not valid in HIL_MODE_ATTITUDE

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2894 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:53 +00:00
tridge60@gmail.com 863e77677e HIL: enable reception of GPS and ATTITUDE via MAVLink
this allows us to get GPS position and ATTITUDE in HIL_MODE_ATTITUDE

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2893 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:42 +00:00
tridge60@gmail.com 93a8deac7d HIL: send location information
we don't send MSG_LOCATION in HIL mode during GPS updates, as we don't
call the GPS update routines, so we need to send MSG_LOCATION as part
of the Position stream

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2892 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:33 +00:00
tridge60@gmail.com aff9e9a831 HIL: when in HIL_MODE_ATTITUDE, we get altitude from gps setHIL
we need to skip the barometer and sonar calls

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2891 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:17 +00:00
tridge60@gmail.com eb2a6403e0 don't force config in default APM_Config.h
defaults for these are already in config.h, but protected with #ifndef
wrappers. The #ifndef wrappers are useful to allow users to have
makefile targets for different configs, so you can (for example), do
"make heli" with a local makefile

This makes it easier for developers to ensure that all configs build
correctly

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2890 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:33:09 +00:00
tridge60@gmail.com df6a1b51f3 make a lot more functions and variables static
this saves about 1k of code space through better compiler optimisation

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2889 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:32:00 +00:00
tridge60@gmail.com 0b1262a685 make main variables and functions static
this makes most of the variables and functions in the main
ArduCopterMega.pde code static, which allows the compiler to optimise
better, and exposes unused variables as compiler warnings

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2888 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:31:46 +00:00
tridge60@gmail.com f9105a056e logging: moved the default log_bitmask calculation to compile time
this saves a little bit of code by moving the calculation of the
default log bitmask to compile time from runtime

(merge from APM)

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2887 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:31:17 +00:00
tridge60@gmail.com 8a7466d1a2 make it possible to completely disable logging
set LOGGING_ENABLED  to DISABLED to disable all logging. This saves
about 10k of flash when disabled.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2886 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:31:07 +00:00
tridge60@gmail.com fdf090b471 allow flight modes to be setup over MAVLink
this adopts the same method of setting up flight modes over MAVLink as
APM now has

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2885 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:30:53 +00:00
tridge60@gmail.com 855b88852e fixed a bunch of compiler warnings
mostly signed/unsigned warnings

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2884 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 10:30:21 +00:00
mich146@hotmail.com 8aad21fcc8 add level command via mavlink, and fix fall through
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2877 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-17 00:14:50 +00:00
jasonshort b6db64f9be 2.0.36
Added Yaw control when descending in Alt hold
lowered kP & kD for Alt hold a tad
Adjusted RTL behavior to do speed control up to 4m to home, then go into Loiter
Fixed issue with AUTO not getting proper input.
Added Limit to high side of motors

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2874 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 23:08:07 +00:00
jasonshort df26281296 2.0.36
Added Yaw control when descending in Alt hold
lowered kP & kD for Alt hold a tad
Adjusted RTL behavior to do speed control up to 4m to home, then go into Loiter
Fixed issue with AUTO not getting proper input.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2873 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 22:32:54 +00:00
jasonshort af8afecbb8 2.0.36
Added Yaw control when descending in Alt hold
lowered kP & kD for Alt hold a tad
Adjusted RTL behavior to do speed control up to 4m to home, then go into Loiter


git-svn-id: https://arducopter.googlecode.com/svn/trunk@2872 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 22:12:52 +00:00
jasonshort 05c058148b tweaked WP speed so long distances wont blow up equation.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2871 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 22:02:47 +00:00
jasonshort 59023505f9 Added in limit for alt hold to prevent I term run up.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2870 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-16 21:53:47 +00:00
jphelirc 24abae3c6d ESC setup notes
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2847 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-14 02:52:08 +00:00
jasonshort f46647d8b8 minor cosmetics
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2846 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-14 02:01:51 +00:00
tridge60@gmail.com 48f010f80c compass: fixed a compiler warning
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2844 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-13 09:10:24 +00:00
tridge60@gmail.com a9278b6fcd build: added EXTRAFLAGS to make rules
this allows you to create a local makefile like this:

 include Makefile

 hil:
	make -f Makefile EXTRAFLAGS="-DHIL_MODE=HIL_MODE_ATTITUDE -DSERIAL3_BAUD=115200"

and then use 'make hil'

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2843 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-13 09:07:09 +00:00
jasonshort b7b0212506 Cleaned up or reverse code.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2842 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-13 05:54:40 +00:00
jasonshort 100e3bac60 2.0.35
Added camera reversing parameters in AP_Var
Added RTL Throttle Hold set/check
Added dynamic speed control to slow down as you reach waypoints and RTL Home
upped Yaw Dead zone slightly.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2841 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-12 20:04:15 +00:00