optimize math (#5287)
commitc11d016bc7991923834157654b0e73c2e42921d1
authorPetr Ledvina <ledvinap@gmail.com>
Sat, 3 Mar 2018 12:26:33 +0000 (3 13:26 +0100)
committerMichael Keller <github@ike.ch>
Sat, 3 Mar 2018 12:26:33 +0000 (4 01:26 +1300)
tree3d9a98647d1cdb6f5583b0ef8d44f53ecef05655
parentb64802d931283e5b82d579fb3db485f06f4d51c2
optimize math (#5287)

* optimize math

Results in considerable flash saving

* log_approx, exp_approx, pow_approx

Taken from https://github.com/jhjourdan/SIMD-math-prims/blob/master/simd_math_prims.h

* Fix pow in rangefinder

* Use approximate function in baro calculation

Maximum error is < 20cm

* fixup! Fix pow in rangefinder
make/source.mk
src/main/common/explog_approx.c [new file with mode: 0644]
src/main/common/filter.c
src/main/common/maths.h
src/main/io/osd.c
src/main/sensors/barometer.c
src/main/sensors/rangefinder.c