kritz
84b3da227c
Canonical Quaternion with tests ( #81 )
2019-08-22 15:05:14 +02:00
Matthias Grob
56b069956d
slice test: fix trailing whitespace style
2019-03-08 20:20:08 +01: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
Oskar Weigl
93375fbd3c
Fix copy-paste error
2019-03-08 19:17:40 +00:00
Oskar Weigl
5872bbc28c
Add slicing tests that are not pure row slicing
...
I had a look at the implementation of `slice`, and I found it odd that it doesn't have a copy loop. The current implementation does a raw memcpy of the underlying contiguous row-major data. As far as I can tell, this could only slice along rows. Interestingly, I found that the tests only tested for slicing along rows, so this bug would go unnoticed.
I added some tests that checks slicing along columns also. I have a feeling this would break, and we need to fix the implementation of `slice`. However I could be wrong, and hence I'm submitting these tests first to verify.
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
7ab2b24e65
tests: urt: refactor
2019-02-24 17:14:05 +00:00
TSC21
4aab44fe01
Travis CI: update MacOS version to use
2019-02-24 17:14:05 +00:00
TSC21
707967d117
add test to .urt()
2019-02-24 17:14:05 +00:00
TSC21
210c76c04b
add test to setNaN()
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
Beat Küng
807472bfd7
README: document how to run tests
2018-10-01 10:17:16 +02:00
Bart Slinger
30d5a79432
testing float/double with Type template
2018-09-18 09:39:17 +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
7495794386
test zero divisions
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
98b8e2d43b
formatting
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
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