Commit Graph

78 Commits

Author SHA1 Message Date
Randy Mackay 06ea18f97e Filter: fix LPF example sketch 2015-04-17 22:54:06 +09:00
Randy Mackay 99a9a88529 Filter: dt check fix for LPF 2015-04-17 10:59:03 +09:00
Jonathan Challinger f20a91ec95 Filter: add dt<0 check to LPF 2015-04-17 10:47:06 +09:00
Randy Mackay 22e1156c31 Filter: add some comments to LowPassFilter 2015-04-17 10:47:04 +09:00
Jonathan Challinger 76da2868d0 Filter: rework LowPassFilter 2015-04-17 10:46:42 +09:00
Randy Mackay ca92821445 Filter: LowPassFilter gets another div-by-zero check 2015-04-01 10:34:28 -07:00
Jonathan Challinger 57f8a4d29d Filter: add get_cutoff_frequency 2015-04-01 10:15:07 -07:00
Andrew Tridgell f3706d63c7 Filter: prevent copying the filter parms on apply 2015-03-12 12:50:30 +11:00
Andrew Tridgell b36122dec0 Filter: removed stdio.h
breaks AVR build
2015-03-12 12:50:30 +11:00
Jonathan Challinger 0133f0bb57 LowPassFilter2p: split into LowPassFilter2pfloat and LowPassFilter2pVector3f 2015-03-12 12:50:27 +11:00
Randy Mackay 4b78b2ce80 Filter: add get method to LowPassFilter 2015-03-03 15:48:58 +09:00
Randy Mackay cf35bd3f42 LowPassFilter: add div by zero check 2014-09-21 17:33:59 +09:00
Andrew Tridgell b16d84023e Filter: fixed example build 2014-08-13 22:12:20 +10:00
Randy Mackay a0369b85d1 LowPassFilter: make methods non-virtual
No classes inherit from this class so no need for set_cutoff_frequency,
set_time_constant and reset(T) to be declared virtual.  Saves 6 bytes of
RAM.
2014-02-10 20:47:05 +09:00
Randy Mackay 38222d65e9 DerivativeFilter: update and slope non-virtual
No classes inherit from DerivativeFilter so no need to be virtual.
Saves 4bytes of RAM.
2014-02-10 20:47:02 +09:00
Randy Mackay 4040be9990 FilterWithBuffer: make get_sample non-virtual
virtual added to apply() and reset() declaration inline with base class.
This should have no impact on memory usage or functionality
2014-02-10 20:47:00 +09:00
Tobias f4000e66e6 Filter: add consts 2013-10-27 13:39:28 +09:00
Andrew Tridgell 99da118faa Filter: added in Leonards LowPassFilter2p filter
this is a backport from PX4
2013-09-26 22:38:32 +10:00
Andrew Tridgell 97b7130bb9 libraries: update license header to GPLv3
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Tobias 338c054da2 Filter: validity of array index was checked AFTER accessing the element.
(correction decreased Program size by 12 bytes)
2013-07-08 12:17:59 +10:00
James Bielman 4fa7bb1486 Add AVR compatibility header for missing math.h definitions.
- Define float versions of math functions to the double versions
  on AVR (eg. #define sinf sin).
- These macros appear to be missing in older versions of avr-libs.
- Include AP_Math.h rather than math.h to get these definitions.
2013-01-16 13:52:17 +11:00
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.
2013-01-16 13:52:01 +11:00
Andrew Tridgell d00b06d449 Filter: added a butter filter to example 2013-01-16 09:15:35 +11:00
Andrew Tridgell befc6b7b9b Filter: fixed butter filter build on px4 2013-01-16 09:15:22 +11:00
Pat Hickey 53ea7c564e Butter filter: needs header guards 2013-01-15 12:47:43 -08:00
Jonathan Challinger c66571b87d Filter: added 2nd-order butterworth filters. 2013-01-14 19:18:47 -08:00
Andrew Tridgell 30b50a858d Filter: fixed a warning on PX4 2013-01-11 21:17:34 +11:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell 2ba2e1c279 Derivative: removed reference to DESKTOP_BUILD 2013-01-02 15:40:01 +11:00
rmackay9 120b494d83 Filter: #include AP_Buffer.h no longer needed now that completementary filter has been moved to InertialNav library 2013-01-02 09:19:39 +11:00
Andrew Tridgell a1187519a8 AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches 2012-12-20 14:52:37 +11:00
Andrew Tridgell 32afc3f9ae Filter: fixed example warnings 2012-12-20 14:52:36 +11:00
Pat Hickey eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +11:00
Andrew Tridgell 7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Andrew Tridgell cead629fc4 Filter: fixed merge error 2012-12-20 14:51:39 +11:00
Pat Hickey 475da4eca4 CONFIG_HAL_BOARD - test sketches fixed up, build all passes 2012-12-20 14:51:37 +11:00
Pat Hickey a4f1f6a5db AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR 2012-12-20 14:51:28 +11:00
Pat Hickey c56c4ae240 Various example sketches: hal.uart0->begin(115200) is redundant. use console.
just assume uart0 is initialized by the HAL, because it is. DRY.
also, don't ever use uart0 explicitly in example sketches, use console
and let the hal figure it out.
2012-12-20 14:51:25 +11:00
Pat Hickey 84e0dd406e Filter: ported to AP_HAL 2012-12-20 14:51:25 +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
rmackay9 395eb25041 ThirdOrderCompFilter: delete because now combined with AP_InertialNav library 2012-12-10 00:48:43 +09:00
rmackay9 e6686dcab8 ThirdOrderCompFilter: remove last_time_constant_xy and _z static variables to save 8 bytes. 2012-12-06 10:24:58 +09:00
Andrew Tridgell 5a0632340c Filter: fixed example build 2012-11-24 21:08:48 +11:00
rmackay9 957d366cca Filter: improved low pass filter allows setting gain using time_step and cutoff freq 2012-11-19 01:06:06 +09:00
rmackay9 50a4838879 AP_Motors, AP_RangeFinder, Filter: fixes to example sketches 2012-11-08 00:29:43 +09:00
rmackay9 b13264c884 AP_InertialNav: reanme AP_InertialNav and ThirdOrderCompFilter classes to resolve desktop build compiler errors 2012-11-07 22:24:00 +09:00
rmackay9 5f34d41b59 ThirdOrderCompFilter3D: fix compiler error 2012-11-07 19:47:48 +09:00
rmackay9 dc7146c9ce ThirdOrderCompFilter3D: first implementation of complementary filter for use with inertial navigation 2012-11-07 19:20:43 +09:00
uncrustify 84847da218 uncrustify libraries/Filter/Filter.h 2012-08-21 19:04:30 -07:00
uncrustify 5948f825ba uncrustify libraries/Filter/ModeFilter.h 2012-08-21 19:04:30 -07:00