David Dewey
17374ff5e8
AP_Math: fast_atan2
...
This is 126us per call vs 199us on the AVR. it is accurate to about
0.28 degrees
Committed by rmackay9 but contribution is from David Dewey
11 years ago
Randy Mackay
d81b7b507d
Math: add Leonard's fast tan function
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
83dc7dbc92
AP_Math: handle NaN in constrain(), returning average
...
this makes it less likely a NaN will propogate
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
38062bbb6d
AP_Math: support some more rotation combinations
12 years ago
Andrew Tridgell
a072afa223
AP_Math: expand some macros into functions
...
this saves some flash
12 years ago
uncrustify
533860dd73
uncrustify libraries/AP_Math/AP_Math.cpp
13 years ago
Andrew Tridgell
58a68c89d9
Math: added a function to combine standard rotations
...
this will allow us to have an overall board rotation plus a per-sensor
rotation
13 years ago
Andrew Tridgell
4422486d44
AP_Math: made rotation matrices more C++
...
thanks to Adam for the suggestion
13 years ago
Andrew Tridgell
9f0cb78f08
AP_Math: re-work quaternion functions to be more C++ like
...
thanks to Adam for the suggestion!
13 years ago
Andrew Tridgell
4d65cda0ea
AP_Math: added quaternion->matrix and earth frame routines
...
this will be used for 3d acceleration
13 years ago
Andrew Tridgell
8abbbe5713
AP_Math: better way of handling safe_sqrt()
...
better to test the result, than predict it
13 years ago
Andrew Tridgell
c7d5f06b21
AP_Math: added quaternion helper functions and a test suite
13 years ago
Andrew Tridgell
16ed8bc8f6
AP_Math: added rotmat <-> euler functions
...
these will make the dcm matrix manipulation easier to understand
13 years ago
Andrew Tridgell
17d16bc8c6
AP_Math: added safe_sqrt() function
...
this function will never return NAN. It will return zero for negative
numbers.
13 years ago
Andrew Tridgell
502fbf6e17
AP_Math: added a safe_asin() function
...
this adds range checking to asin()
13 years ago