Refactor Feedforward Angle and RC Smoothing - mashup of 12578 and 12594 (#12605)
* Refactor Feedforward Angle and RC Smoothing
* update rc_smoothing at regular intervals
* add Earth Ref to OSD, update pid and rate PG
* Initialise filters correctly
* refactoring to improve performance
* Save 24 cycles in Horizon calculations, other optimisations
At a cost of 40 bytes
* save 25 cycles and 330 bytes in rc_smoothing
* feedforward max rate improvements
* typo fix
* Karatebrot's review suggestions part one
* Karatebrot's excellent suggestions part 2
* more efficient if we calculate inverse at init time
Co-Authored-By: Jan Post <post@stud.tu-darmstadt.de>
* Horizon delay, to ease it in when returning sticks to centre
* fix unit tests after horizon changes
Co-Authored-By: 4712 <4712@users.noreply.github.com>
* horizon_delay_ms, default 500
* fix unit test for feedforward from setpointDelta
* Final optimisations - thanks @Karatebrot for your advice
* increase horizon level strength default to 75 now we have the delay
* restore Makefile value which allowed local make test on mac
---------
Co-authored-by: Jan Post <post@stud.tu-darmstadt.de>
Co-authored-by: 4712 <4712@users.noreply.github.com>
19 files changed: