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.
10 years ago
Andrew Tridgell
fce95178e7
PID: convert example from .pde to .cpp
10 years ago
Andrew Tridgell
f449b34fdd
PID: fix for HAL_SITL rename
10 years ago
Tom Pittenger
f3d13656ba
PID: fix compile warnings re float constants
10 years ago
Andrew Tridgell
184420355d
PID: fixed example build
11 years ago
Kevin Hester
c2184cb8e4
PID: fixup line endings
11 years ago
Andrew Tridgell
37ad9e3f82
PID: fixed example build
12 years ago
Andrew Tridgell
6862791d66
PID: fixed indent-tabs-mode
12 years ago
Andrew Tridgell
ba83950fc4
libraries: replace constrain() with constrain_float()
...
this makes the type much more obvious. Thanks to Tobias for the
suggestion.
12 years ago
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
12 years ago
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
12 years ago
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
12 years ago
Andrew Tridgell
374af1cd14
build: change from Arduino.mk to apm.mk
12 years ago
Andrew Tridgell
62bfded26c
PID: fixed example build
12 years ago
Pat Hickey
eb530b86e8
move Arduino.mk to /mk/Arduino.mk
12 years ago
Andrew Tridgell
7d27e420ae
AP_HAL: remove unnecessary Arduino.h includes
12 years ago
Andrew Tridgell
306d53b4ae
PID: updates for new AP_Param API
12 years ago
Pat Hickey
39d14c8a93
PID: ported to AP_HAL
12 years ago
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.
12 years ago
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
12 years ago
Andrew Tridgell
f6fce1e238
PID: don't reset _last_error on reset_I()
...
resetting _last_error when you have a non-zero D term causes the D
contribution to the next call to be massively amplified. This can
cause crazy behaviour on auto takeoff in ArduPlane if you have a
non-zero D term for the roll or picth controllers
Thanks to Chris Miser for providing the tlog that allowed this bug to
be found.
12 years ago
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
13 years ago
uncrustify
13e0dd2c70
uncrustify libraries/PID/PID.h
13 years ago
uncrustify
330c6c07e3
uncrustify libraries/PID/PID.cpp
13 years ago
uncrustify
84816966ec
uncrustify libraries/PID/examples/pid/pid.pde
13 years ago
Andrew Tridgell
5e8fe8d93e
AP_Param: update PID libraries for new constructor syntax
13 years ago
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
13 years ago
Andrew Tridgell
23ed5c2cee
fixed imax load/save in PID
13 years ago
Andrew Tridgell
150a67c262
fixed PID initialisation
13 years ago
Andrew Tridgell
9c5a5473ab
added indexes to group info structures
13 years ago
Andrew Tridgell
f760b3c717
restore _fCut that was lost in AP_Param development
13 years ago
Andrew Tridgell
bf4a77da81
convert libraries to new typesafe macros
13 years ago
Andrew Tridgell
e5a0074312
modify the PID library for AP_Param
13 years ago
Andrew Tridgell
9c1e257826
fixed example in PID library
13 years ago
James Goppert
0c7c508541
Optional recursion added.
14 years ago
James Goppert
5489b84f8e
Improvements to cmake.
14 years ago
James Goppert
d887a28b91
Added ArduBoat/ ArduRover/ and APO library.
14 years ago
unknown
a4e001bbcf
Adding CMake support
14 years ago
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
14 years ago
jasonshort
d192ceb8f8
upped D filter to 6
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3096 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
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
14 years ago
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
14 years ago
tridge60@gmail.com
cf68e31729
fixed warnings in PID.h
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2560 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
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
14 years ago
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
14 years ago
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
14 years ago
jasonshort
240a3a2f2a
quick.fix
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1688 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
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
14 years ago
jasonshort
c9227dbcaf
fixed a scaling bug in imax
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1553 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
mich146@hotmail.com
0328f926b5
Reinstate Float loading and saving
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1507 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago