Andy Piper
87a369727a
AP_Math: specialize float and double functions to use fabsf() and simple comparison otherwise
3 years ago
Andrew Tridgell
999268cbba
AP_Math: fixup matrix algorithms to be in cpp file
...
this fixes an issue where optimize O2 was forced on any file that
included AP_Math.h. It also fixes the test suite for matrix_alg, and
fixes the type handling to be consistent
4 years ago
bugobliterator
3b3e2c01f8
AP_Math: templatize matrix_alg methods
4 years ago
Andrew Tridgell
720f9a1de0
AP_Math: cleanup maths functions
...
use class template instantiation, and cleanup const in matrix code
4 years ago
bugobliterator
05fe49a51f
AP_Math: disable INEXACT flag from Float exception
5 years ago
Andrew Tridgell
13a2367278
AP_Math: change optimisation from -O3 to -O2
5 years ago
Pierre Kancir
79a9e8dfad
AP_Math: Matrix_alg fix implicite cast from bool to float
8 years ago
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
8 years ago
Murilo Belluzzo
70942472d3
AP_Math: Matrix: Change deallocator to match allocator used
9 years ago
Pierre Kancir
a8e5ff93b5
AP_Math: Correct missing declaration warning
9 years ago
Ricardo de Almeida Gonzaga
481e3a2af6
AP_Math: Fix typos
9 years ago
Gustavo Jose de Sousa
b594b5a08b
AP_Math: matrix_alg: disable FE_OVERFLOW in inverse4x4() for SITL
...
There are occasional overflows on the determinant calculation in inverse4x4()
when using calibration SITL model.
9 years ago
Gustavo Jose de Sousa
a7543d369f
AP_Math: matrix_alg: protect inverseixi() against overflow
...
Fail on inverse3x3() and inverse4x4() if there's float overflow during the
determinant calculation.
9 years ago
Andrew Tridgell
97d27ce58f
AP_Math: fixed memory leak
...
found by coverity
9 years ago
Jonathan Challinger
83d5a6664a
AP_Math: minor changes to matrix_alg in response to review
9 years ago
bugobliterator
1a4b4fa85e
AP_Math: add inverse matrix test to check if inverse(mat)*mat = I
...
where I is an identity matrix (a matrix with diagonal elements = 1)
9 years ago
bugobliterator
fe62a049bd
AP_Math: implement LU decomposition based matrix inverse
...
Replaces previous matlab generated code, which was giving imprecise results
9 years ago
Tom Pittenger
103af93ec3
AP_Math: compiler warnings - float compare to constant (zero)
9 years ago
Andrew Tridgell
c9ec8b3f67
AP_Math: added O3 optimisation to core math libraries
...
this costs some flash space but speeds things up considerably
9 years ago
Siddharth Bharat Purohit
1ffbffa0e7
AP_Math: check if failed to allocate memory
10 years ago
Gustavo Jose de Sousa
46774136a6
AP_Compass: 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
Jonathan Challinger
1c100498d4
AP_Math: use is_zero instead of defining our own epsilon
10 years ago
Siddharth Bharat Purohit
b654b1c21b
AP_Math: add inverse matrix to math library
10 years ago