Commit Graph

102 Commits

Author SHA1 Message Date
Andrew Tridgell d13d117e61 APM: removed reset_I() and instead auto-reset integrator in PID library
this prevents us resetting key integrators on waypoint change, while
still preventing old integrators being used when a PID starts to be
used again
2012-08-28 20:18:23 +10:00
uncrustify 13e0dd2c70 uncrustify libraries/PID/PID.h 2012-08-21 19:04:31 -07:00
uncrustify 330c6c07e3 uncrustify libraries/PID/PID.cpp 2012-08-21 19:04:31 -07:00
uncrustify 84816966ec uncrustify libraries/PID/examples/pid/pid.pde 2012-08-21 19:04:31 -07:00
Andrew Tridgell 5e8fe8d93e AP_Param: update PID libraries for new constructor syntax 2012-08-08 12:11:57 +10:00
Andrew Tridgell f6d7d1bc59 APM: changed PID library to do automatic deltat calculation
this fixes a problem with the HDNG2RLL PID, which was using the wrong
time base and prevents similar bugs from happening in the future
2012-07-06 19:59:18 +10:00
Andrew Tridgell 23ed5c2cee fixed imax load/save in PID 2012-02-13 16:22:53 +11:00
Andrew Tridgell 150a67c262 fixed PID initialisation 2012-02-13 16:22:53 +11:00
Andrew Tridgell 9c5a5473ab added indexes to group info structures 2012-02-13 16:22:52 +11:00
Andrew Tridgell f760b3c717 restore _fCut that was lost in AP_Param development 2012-02-13 16:22:51 +11:00
Andrew Tridgell bf4a77da81 convert libraries to new typesafe macros 2012-02-13 16:22:51 +11:00
Andrew Tridgell e5a0074312 modify the PID library for AP_Param 2012-02-13 16:22:51 +11:00
Andrew Tridgell 9c1e257826 fixed example in PID library 2012-01-23 08:47:46 +11:00
James Goppert 0c7c508541 Optional recursion added. 2011-09-30 17:17:51 -04:00
James Goppert 5489b84f8e Improvements to cmake. 2011-09-29 21:23:26 -04:00
James Goppert d887a28b91 Added ArduBoat/ ArduRover/ and APO library. 2011-09-29 14:12:15 -04:00
unknown a4e001bbcf Adding CMake support 2011-09-14 15:44:55 +02:00
jasonshort 4ec8805216 Reverted to older PID. Restored the older filter, and removed PI command. I am no longer using PID for the quad and have switched to PIPI loops which perform much better. The D term in this class is not that great.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3241 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-09-04 17:47:07 +00:00
jasonshort d192ceb8f8 upped D filter to 6
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3096 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-08-14 05:44:29 +00:00
tridge60@gmail.com 5c68a04c5d PID: fixed an uninitialised variable
we did not initialise derivative to zero

git-svn-id: https://arducopter.googlecode.com/svn/trunk@3082 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-08-13 04:46:21 +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 cf68e31729 fixed warnings in PID.h
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2560 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-15 12:25:00 +00:00
jasonshort 5a22080484 I am Adding A "PI" loop to the mix. This is a need for AC2. We can optimize the internals later, but I basically duped the get_PID and removed the D term internals.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2338 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-16 16:05:49 +00:00
james.goppert@gmail.com c1b6032e7f Eclipse makefile support for examples.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1860 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-09 19:38:12 +00:00
tridge60@gmail.com 860998d337 implemented typesafe PSTR()
This makes PSTR() type safe by using a 1 byte wrapper
structure. Attempts to use the wrong varient of a print function will
generate a compilation error.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1797 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-03-21 07:25:48 +00:00
jasonshort 240a3a2f2a quick.fix
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1688 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-19 21:01:32 +00:00
DrZiplok@gmail.com 944825772d Use AP_Var to store PID scaling values.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1652 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-14 04:45:31 +00:00
jasonshort c9227dbcaf fixed a scaling bug in imax
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1553 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-24 02:07:25 +00:00
mich146@hotmail.com 0328f926b5 Reinstate Float loading and saving
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1507 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-17 22:57:48 +00:00
jasonshort 55667fd905 removed EEPROMB references
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1315 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-28 18:42:56 +00:00
james.goppert 6c10842562 Fixed PID error for low pass filter.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1295 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-27 05:59:49 +00:00
jasonshort 68eec6805a update use EEPROM class, new scaled input for RC_Channel
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1264 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-26 01:17:04 +00:00
jasonshort f64fab442d added ability to get the integrator for debugging
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1117 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-13 04:05:55 +00:00
james.goppert d13850c941 Added load_gains to PID constructor.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1055 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-06 11:52:31 +00:00
james.goppert 665dbefbd4 Added storage options to PID.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1011 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-04 10:32:19 +00:00
jasonshort 2ac2faf7a7 git-svn-id: https://arducopter.googlecode.com/svn/trunk@979 f9c3cf11-9bcb-44bc-f272-b75c42450872 2010-11-29 01:44:25 +00:00
DrZiplok@gmail.com a64c5ef782 Correct misunderstanding about the intent of the external gain array.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@978 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-28 21:51:10 +00:00
DrZiplok@gmail.com 72cf1b4e57 Add a default ctor; due to 0 being magic, PID pid(0) is ambiguous.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@959 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-27 20:30:53 +00:00
DrZiplok@gmail.com 73eab31d0c Shrink the ctor slightly more
git-svn-id: https://arducopter.googlecode.com/svn/trunk@942 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-27 00:58:01 +00:00
DrZiplok@gmail.com e699812af4 Don't zero fields in the ctor that can be zeroed by reset_I; the code gets replicated for every static instance of the class, which is obscene.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@941 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-27 00:54:21 +00:00
DrZiplok@gmail.com 9a45c2babc Re-type delta t, explicitly size error args to get_pid.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@936 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 04:36:43 +00:00
james.goppert f04e58c6b3 Added default scalar of 1 to PID.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@935 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 03:16:37 +00:00
DrZiplok@gmail.com b0fbe39459 Remove spurious scaling
git-svn-id: https://arducopter.googlecode.com/svn/trunk@934 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 01:56:03 +00:00
DrZiplok@gmail.com 342b759fea Move the eeprom.h include out of the header, it's not needed there.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@933 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 01:54:47 +00:00
DrZiplok@gmail.com 52abef58d5 More syntax, etc. fixes. Compiles OK now.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@932 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 01:53:12 +00:00
DrZiplok@gmail.com dc40ee00ae Fix accessors, _RC
git-svn-id: https://arducopter.googlecode.com/svn/trunk@931 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 01:45:17 +00:00
DrZiplok 264cca6d24 With apologies to Jason for breaking his branch, clean this up and document it.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@930 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 01:30:21 +00:00
james.goppert 3ca85f94d4 Checked for dt>0 in PID and modified ctor
git-svn-id: https://arducopter.googlecode.com/svn/trunk@929 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-26 00:06:06 +00:00
james.goppert 7598c02f51 Added load/save gain overloads for float arrays to PID,
supports mavlink style gain get/set now


git-svn-id: https://arducopter.googlecode.com/svn/trunk@928 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-25 23:26:44 +00:00
james.goppert 00e7f9b6d0 Added lowpass filter on PID lib derivative calc
git-svn-id: https://arducopter.googlecode.com/svn/trunk@927 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-25 23:14:37 +00:00
jasonshort 391e4268c4 git-svn-id: https://arducopter.googlecode.com/svn/trunk@859 f9c3cf11-9bcb-44bc-f272-b75c42450872 2010-11-19 07:18:40 +00:00
jasonshort e7b26da27d A simple OO PID library
git-svn-id: https://arducopter.googlecode.com/svn/trunk@742 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-28 04:59:24 +00:00