Iampete1
dcfc6ae642
PID: use new defualt pattern
2023-01-24 10:16:56 +11:00
Iampete1
8618b085be
PID: params always use set method
2022-08-03 13:43:48 +01:00
Iampete1
66a5a289d7
PID: use set and defualt
2022-07-20 17:59:59 +10:00
Peter Barker
a10ed0e87f
PID: stop libraries including AP_Logger.h in .h files
...
AP_Logger.h is a nexus of includes; while this is being improved over
time, there's no reason for the library headers to include AP_Logger.h
as the logger itself is access by singleton and the structures are in
LogStructure.h
This necessitated moving The PID_Info structure out of AP_Logger's
namespace. This cleans up a pretty nasty bit - that structure is
definitely not simply used for logging, but also used to pass pid
information around to controllers!
There are a lot of patches in here because AP_Logger.h, acting as a
nexus, was providing transitive header file inclusion in many (some
unlikely!) places.
2022-04-08 19:18:38 +10:00
Peter Barker
b47733142f
GLOBAL: rename DataFlash_Class to AP_Logger
2019-01-18 18:08:20 +11:00
Michael du Breuil
f8ac4efb1d
PID: Add a full reset method
2017-10-17 14:37:11 -07:00
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Fernandes Pinheiro, Daker
51bf638ad3
PID: Remove unused method get_pid_4500
2016-07-06 08:45:01 +09:00
Grant Morphett
944541b287
PID: Added PID_Info to class for PID logging
2016-05-31 08:44:52 +10:00
Ricardo de Almeida Gonzaga
287eb69502
PID: Fix typos
2016-05-13 19:20:05 -03:00
Ricardo de Almeida Gonzaga
5bd034a5a8
Global: start using cmath instead of math.h
2016-04-05 21:06:19 -07:00
Lucas De Marchi
96c30aea39
PID: replace header guard with pragma once
2016-03-16 18:40:44 +11:00
Gustavo Jose de Sousa
e925820d90
PID: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Tom Pittenger
f3d13656ba
PID: fix compile warnings re float constants
2015-04-24 14:04:24 +09:00
Andrew Tridgell
6862791d66
PID: fixed indent-tabs-mode
2013-05-30 09:50:37 +10:00
Andrew Tridgell
6123ea2dac
PID: added get_pid_4500()
...
this is a version of get_pid() that returns an int16_t constrained to
-4500 to 4500. This will prevent overflow errors for large PID gains
in ArduPlane and Rover
2013-04-01 22:17:04 +11:00
Andrew Tridgell
fe964fcda0
PID: change to float input/output
...
this makes the PID library a bit more flexible for smaller range
numbers. Note that this library is used on ArduPlane and Rover, not
Copter
2013-02-09 20:36:26 +11:00
Andrew Tridgell
306d53b4ae
PID: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Pat Hickey
39d14c8a93
PID: ported to AP_HAL
2012-12-20 14:51:31 +11:00
Pat Hickey
3f1d9d7f69
AP_Param: #include <AP_Param.h> fixups for libraries & sketches
...
* I mostly went through with grep and added an #include <AP_Param.h> below
every #include <AP_Common.h>. Not all of these example sketches might
strictly need AP_Param.
2012-12-20 14:51:19 +11:00
Andrew Tridgell
816fe9d35a
PID: use NAN to flag a D reset
...
this saves a byte per PID for a flag, and gives us a safe way to
reset_I() without causing a spike in D
2012-11-27 18:41:31 +11:00
uncrustify
13e0dd2c70
uncrustify libraries/PID/PID.h
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
150a67c262
fixed PID initialisation
2012-02-13 16:22:53 +11:00
Andrew Tridgell
f760b3c717
restore _fCut that was lost in AP_Param development
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
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
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
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
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
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
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