276 Commits

Author SHA1 Message Date
Daniel Agar
f1bee775a0 use default constructors and skip unnecessary initialization 2018-08-31 08:11:02 +02:00
Daniel Agar
1bcf48bd82 Quaternion from_dcm don't pass by value 2018-08-30 12:07:48 -04:00
Roman Bapst
b815fc97c4 replace quiet_NaN() with INFINITY (#70)
- solves undefined symbols for QURT

Signed-off-by: Roman <bapstroman@gmail.com>
2018-06-12 12:24:51 -04:00
Daniel Agar
03a3e3ad46 helper_functions add wrap_2pi 2018-06-10 10:56:45 +02:00
Daniel Agar
abc8f82d49
travis-ci add codecov.io (#69) 2018-06-09 21:08:56 -04:00
Daniel Agar
21d47424c6 Quaternion mark const helpers const 2018-04-01 17:02:20 -04:00
James Goppert
e7c95fa027 Fix README/cmake format. 2018-03-28 00:11:03 -04:00
James Goppert
d142ac234c Fix coverage and bug in matrix equal test. 2018-03-28 00:09:01 -04:00
Daniel Agar
50446a55c8 Matrix add == and != operators 2018-03-27 15:05:22 -04:00
Daniel Agar
61af508755 helper_functions include required px4_defines header 2018-03-19 02:24:38 -04:00
Daniel Agar
41a1cc7583 LICENSE minor changes to template 2017-12-05 10:56:04 -05:00
Matthias Grob
f835d39017 Quaternion/Vector: Small refactor for review: put more comments, switched type conversions, took out default destination vector because confusing 2017-12-04 15:34:13 +01:00
Matthias Grob
af2610ec04 Test: added check for quaternion vector to vector rotation constructor
including all the parallel vector corner cases
2017-12-04 15:34:13 +01:00
Matthias Grob
84cd7483ae Quaternion: added constructor which generates the shortest rotation that maps one vector to another
including tedious corner case handling for parallel vectors with 180 degree rotations
2017-12-04 15:34:13 +01:00
Matthias Grob
d513c94f85 Test: added check for Vector.norm_squared() 2017-12-04 15:34:13 +01:00
Matthias Grob
5130da206a Vector: added norm_squared() because sometimes you can safe the sqrt operation 2017-12-04 15:34:13 +01:00
Matthias Grob
41ad2bdea5 Matrix: added copyToRaw method to allow copying to a pointer
because most uORB messages still contain all components of a vector one by one after each other
2017-11-17 09:30:56 +01:00
Matthias Grob
308a6c91cb Test: added copyTo tests for Vector3, Quaternion and Matrix including clolumn-major order 2017-11-16 04:42:54 +01:00
Matthias Grob
1dffd5930b Matrix: add copyTo copying data to an array and copyToColumnMajor which does the same but with column-major order
same functionality explicitly for quaternions can be deleted
2017-11-16 04:42:54 +01:00
Matthias Grob
3bd94fcd6f Test vector: structured & commented, added normalize and unit_or_zero tests, removed duplicate data preparation 2017-11-06 17:58:52 +01:00
Matthias Grob
9e59691e43 Vector: Additional normalization with check for zero norm because it occurs so many times in applications 2017-11-06 17:58:52 +01:00
Matthias Grob
f4243160e2 Quaternion: changed comments because of typos and unclear inconsistent indexing 2017-10-17 17:37:23 +02:00
Matthias Grob
d259ab2108 Test: add Quaternion rotate() test that catches non-commutating rotations 2017-10-17 17:37:23 +02:00
Matthias Grob
ee2219b836 Quaternion: replace conversion in rotate() with AxisAngle call 2017-10-17 17:37:23 +02:00
Matthias Grob
b241cf5c95 Quaternion: Adjusted rotate() to the Hamilton convention (which we switched to)
Note: This error was not caught by a test because the test included only trivial cases which do not explore non-commuting quaternions.
2017-10-17 17:37:23 +02:00
Matthias Grob
6b1fea76d0 Quaternion: added and adjusted comments to further explain conjugation and derivative functionality 2017-10-17 17:37:23 +02:00
Matthias Grob
0527471a52 Matrix: adjust buffer size calculation to account for additional characters
Note: If the buffer is too small there's no memory corruption because of the snprintf limit but part of the output gets missing.
2017-10-17 17:37:23 +02:00
Matthias Grob
0a772f59dd Quaternion: added direct efficient body z-axis calculation with test 2017-09-26 11:20:56 +02:00
Matthias Grob
976461eb0f Dcm: more efficient conversion from quaternion, extend reuse of multiplications 2017-09-26 11:20:56 +02:00
Matthias Grob
baf54ad29f quaternion: correcting comments
^(-1) went missing and some phrase was inprecise
2017-09-25 12:18:10 +01:00
James Goppert
e595ebb9a7 Switch to Hamilton quaternions and add Cholesky decomposition. 2017-08-31 11:09:20 +02:00
Nate Weibley
471e96ff6f Provide const dataptr access 2017-03-23 20:22:45 -07:00
Nate Weibley
2ad3ec46b9 Mark simple min, max, abs methods as const 2017-03-23 20:22:45 -07:00
Nate Weibley
66e1b406b8 Remove artifical need to virtualize dtors 2017-03-23 20:22:45 -07:00
Pavel Kirienko
499b897e5f Style fix 2017-03-17 12:18:39 -04:00
Pavel Kirienko
99b44c0242 NuttX math lib workaround 2017-03-17 12:18:39 -04:00
Pavel Kirienko
8dbe4a7531 NuttX workaround 2017-03-17 12:18:39 -04:00
Pavel Kirienko
23def31d21 Fixed stdlib imports 2017-03-17 12:18:39 -04:00
Pavel Kirienko
e09cf12e2e Removed all uses of C library from tests 2017-03-17 12:18:39 -04:00
Pavel Kirienko
9ebf5f89db Removed all use of C library from the matrix namespace 2017-03-17 12:18:39 -04:00
Pavel Kirienko
552dad40a1 Fixed inclusions in matrix/ 2017-03-17 12:18:39 -04:00
Pavel Kirienko
b74749fb61 Un-poisoned fabs 2017-03-17 12:18:39 -04:00
Pavel Kirienko
8af7b8c130 Poisoned the C library identifiers 2017-03-17 12:18:39 -04:00
Daniel Agar
cf924956d7 test vector3 using matrix::isEqual 2017-02-24 20:47:41 -05:00
Daniel Agar
d81ddb0f37 travis-ci only check formatting once 2017-02-24 20:47:41 -05:00
Daniel Agar
de3517a5c7 cmake add asan and ubsan 2017-02-24 20:47:41 -05:00
Daniel Agar
cfa68c2196 clang-tidy trivial cleanup 2017-02-24 20:47:41 -05:00
Daniel Agar
5f2f6f0308 rename cmake "Profile" to "Coverage" and add builds 2017-02-24 20:47:41 -05:00
Daniel Agar
fb87165051 cmake add check 2017-02-24 20:47:41 -05:00
Daniel Agar
f00edc9442 update to astyle 2.06 and fix formatting 2017-02-24 20:47:41 -05:00