58 Commits

Author SHA1 Message Date
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
96cb9ab146 add NaN value set for Matrix; add return of URT of a matrix 2019-02-24 17:14:05 +00: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
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
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
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
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
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
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
Daniel Agar
f00edc9442 update to astyle 2.06 and fix formatting 2017-02-24 20:47:41 -05:00
James Goppert
63aea23f9e Add cholesky decomp, Closes #30, and dynamic print buf 2017-02-03 17:54:16 -05:00
James Goppert
0eb8aa0c0b Support more of mathlib function for easier swap in px4. 2016-08-16 19:03:54 -04:00
James Goppert
558777f34c Fix formatting. 2016-08-16 12:43:42 -04:00
James Goppert
262a715d90 Fix some when building in px4. 2016-08-16 12:37:41 -04:00
James Goppert
4f13809420 Added axis angle accessors, removed == operator. 2016-08-16 11:05:01 -04:00
James Goppert
e6a6b4680c Use quaternion multiplaction for quaternion derivative. 2016-08-16 01:03:23 -04:00
jaredkw
3509329f30 Define M_PI float, change logical and to && 2016-05-11 18:35:05 -04:00
MaEtUgR
b2eb4d13d8 Matrix.setCol off by one bug fixed
The Column Vector you are copying from, only has one Column and it is indexed by 0 not 1.
I also completed the unit test stub that would have found this bug.
2016-05-05 13:18:51 +02:00
Matthias Grob
65679fbcbb Features and fixes
* added the trace function for a SquareMatrix

* added Vector3.hat() and it's counterpart Dcm.vee()
for skewsymskew symmetric matrix operations in relation to the cross product
see https://en.wikipedia.org/wiki/Hat_operator

* Matrix::write_string produced runtime errors when I used it in PX4 posix simulation, i simplified it

* a Matrix3f is a SquareMatrix

* added tests for SquareMatrix.trace, Vector3.hat and Dcm.vee

* added a test for quaternion initialisation from array

* preventing buffer overflows in Matrix.write_string method
2016-04-28 15:16:36 -04:00
James Goppert
07fba8322a Fix for effective cpp. 2016-03-18 20:56:41 -04:00
James Goppert
0e14e11183 Added support for attitude_estimator_q functions. 2016-03-15 06:35:13 -04:00
mcsauder
46c83a8c18 Correct a few indexing copy/paste errors that likely previously only functioned properly on square matrices. 2016-02-25 18:51:28 -07:00
James Goppert
95e3d7d6ce Added set function. 2016-02-16 14:54:15 -05:00
James Goppert
5a01e6c939 Added slice function for matrix. 2016-02-16 12:22:08 -05:00
James Goppert
a92d5c1338 Removed unneeded headers. 2016-01-24 02:44:25 -05:00
James Goppert
ffbe58ca10 Added better roundtrip euler test. 2016-01-24 00:39:21 -05:00
James Goppert
d761bd3721 Fixed formatting. Made traivs more verbose. 2016-01-23 23:33:25 -05:00
James Goppert
38211e1aff Fix testing mechanism. 2016-01-23 23:26:26 -05:00
James Goppert
cc800454d2 Formatting. 2016-01-11 22:05:34 -06:00
James Goppert
684a6b626d Merge branch 'quaternion'
Conflicts:
	test/attitude.cpp
2016-01-11 21:59:28 -06:00
Thomas Gubler
45e6012818 matrix scalar pre multiplication and general scalar multiplication for
quaternions
2015-12-26 13:15:39 +01:00
Thomas Gubler
99ac532746 remove unnecessary ; 2015-12-26 12:07:12 +01:00
Thomas Gubler
d999923a35 support for std::cout 2015-12-26 12:07:12 +01:00
Roman
10b395a782 added more quaternion methods 2015-12-19 09:47:03 +01:00
jgoppert
42f2e60b24 Added runge kutta integration. 2015-11-11 23:31:43 -05:00
jgoppert
9b995e19f3 Added vector2. 2015-11-07 14:27:12 -05:00
jgoppert
1fb0f33eb4 Removed old references to matrix.hpp. 2015-11-07 11:08:17 -05:00
Lorenz Meier
6abd2f782a Re-add Matrix.hpp 2015-11-07 09:42:33 +01:00
Lorenz Meier
713aee154b Remove both versions of matrix / Matrix 2015-11-07 09:41:38 +01:00
jgoppert
550108cf1d More testing. 2015-11-05 17:29:57 -05:00
jgoppert
7136e5b7d1 More work on gimbal lock case. 2015-11-05 16:54:19 -05:00
jgoppert
5566b3dc77 expm testing and fixes. 2015-11-05 15:39:41 -05:00
jgoppert
fd64e7e93a More testing and cleanup. 2015-11-05 12:28:39 -05:00