kritz
84b3da227c
Canonical Quaternion with tests ( #81 )
2019-08-22 15:05:14 +02:00
Oskar Weigl
5ccfa74c72
Fix const error
2019-03-08 19:17:40 +00:00
Oskar Weigl
eea6b59973
Implement slice as copy loop
2019-03-08 19:17:40 +00:00
TSC21
ec436d5aee
define FLT_EPSILON; be descriptive about upper_right_triangle() method
2019-02-24 17:14:05 +00:00
TSC21
7355a29a2a
tests: use __FLT_EPSILON__ in comparisons
2019-02-24 17:14:05 +00:00
TSC21
96cb9ab146
add NaN value set for Matrix; add return of URT of a matrix
2019-02-24 17:14:05 +00:00
Daniel Agar
6b0777d815
stdlib_imports cinttypes currently unavailable in NuttX toolchain ( #79 )
2019-01-21 09:12:36 -05:00
Matthias Grob
18fba8221c
quaternion: improve comments
2018-12-16 20:16:38 +01:00
Matthias Grob
a4f39c0f89
quaternion: reuse existing dot product
2018-12-16 20:16:38 +01:00
Matthias Grob
9c0acfba36
Matrix: remove unsafe copyToRaw method
...
It used a pointer and could therefore not do correct type checking
for index out of bound or struct memebr order.
Has to be considered unsafe and bad practise.
We should switch to arrays as representation for vectors
inside the messages instead of foo_x, foo_y, foo_z fields.
2018-11-20 16:39:44 +00:00
Beat Küng
0d3bff5e00
Vector2: add explicit constructor for Vector3
...
Initialize from the first 2 elements.
2018-10-01 10:17:16 +02:00
Bart Slinger
707e288019
explicit casting
2018-09-18 09:39:17 +02:00
Bart Slinger
480c5f1f8e
static assert M>=N. floats to Type, arguments as const reference
2018-09-18 09:39:17 +02:00
Bart Slinger
3f2d3cf58d
fix a div/0 condition
2018-09-18 09:39:17 +02:00
Bart Slinger
983a3f0212
use Matrix and Vector class for A and tau
2018-09-18 09:39:17 +02:00
Bart Slinger
0009328257
least squares solver for MxN matrices using QR householder algorithm
2018-09-18 09:39:17 +02:00
Daniel Agar
dc3af80977
constructors use array size rather than pointers
2018-08-31 08:11:02 +02:00
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
21d47424c6
Quaternion mark const helpers const
2018-04-01 17:02:20 -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
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
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
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
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
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
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
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
Daniel Agar
cfa68c2196
clang-tidy trivial cleanup
2017-02-24 20:47:41 -05:00