Michael du Breuil
aafa2f3998
AP_Math: Remove template parameter from constructor
...
Not valid in C++20, and makes GCC 14.1.1 very unhappy.
2024-07-10 10:07:24 +10:00
Andrew Tridgell
0f2f0d4cb2
AP_Math: allow for double EKF build
2021-07-10 07:20:41 +10:00
Andrew Tridgell
aa03afafa7
AP_Math: added matrix3 tofloat and todouble
2021-06-24 21:34:30 +10:00
Peter Barker
4c434c2df9
AP_Math: add WARN_IF_UNUSED to bool methods
2019-07-26 09:26:02 +09:00
Pierre Kancir
d47e9c8514
AP_Math: add missing include on matrix3
2019-04-02 19:00:02 +11:00
Andrew Tridgell
8170fbcf80
AP_Math: added a comment on conventions for to_euler()
2018-07-18 16:07:19 +10:00
Andrew Tridgell
3f226cd2b9
AP_Math: added from_rotation() method to Matrix3
...
this is used to get a rotation matrix from a rotation enum
2017-11-23 14:26:11 +11:00
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.
2016-10-24 09:42:01 -02:00
Jonathan Challinger
80d9092993
AP_Math: remove rotateXY and rotateXYinv
2016-10-13 10:02:14 +11:00
Gustavo Jose de Sousa
3b05ec1157
AP_Math: make vectors and matrix constructors constexpr
...
That allows some object to be constructed at compile time.
2016-05-16 19:08:36 -03:00
Gustavo Jose de Sousa
3f2ad764ca
AP_Math: Matrix3: add inverse() and invert() functions
...
Additionally, add unit tests.
2016-05-16 19:08:35 -03:00
Gustavo Jose de Sousa
06eea2838f
AP_Math: Matrix3: add det() function
...
Function to calculate determinant. Additionally, add unit tests.
2016-05-16 19:08:35 -03:00
Andrew Tridgell
6165c42535
AP_Math: added from_axis_angle() method on Matrix3f
...
for arbitrary rotations in simulator
2016-04-22 10:28:15 +10:00
Lucas De Marchi
b4a8a0b961
AP_Math: replace header guard with pragma once
2016-03-16 18:40:41 +11:00
Peter Barker
80bc7a50d7
AP_Math: define MATH_CHECK_INDEXES
...
Wrapped in ifndefs so the top-level Makefile can override
Assume MATH_CHECK_INDEXES is always defined
2016-02-19 12:34:23 -02:00
Lucas De Marchi
fb28f426da
AP_Math: remove check for AVR CPUs
...
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:14 +11:00
Andrew Tridgell
7aa7e03169
AP_Math: added euler312 functions (for gimbal)
2015-05-25 09:03:11 +10:00
Andrew Tridgell
24b051565b
AP_Math: added normalize() method to Matrix3f
2015-05-05 09:45:52 +10:00
Grant Morphett
300a02f4e4
AP_Math: Changes to fix the warnings in rover sitl build.
...
We are starting the process of resolving all the warnings in the
ardupilot builds of all vehicles and platforms.
2015-02-11 18:16:46 +11:00
Daniel Frenzel
b1a9d6bbcc
AP_Math: Using const references in matrix3
...
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:05 +10:00
Niels Joubert
879eb5936b
AP_MATH: Adding WGS GPS conversions, CRC16 checks, and double-precision Vectors and Matrices
2014-04-05 13:42:23 +11:00
Andrew Tridgell
1e0f3f5398
AP_Math: make to_euler() const
2014-02-15 05:27:51 +11:00
Paul Riseborough
f2c2811ef3
AP_AHRS & AP_Math: fixed bug in use of AHRS_TRIM parameters
2014-01-19 07:19:43 +11:00
Andrew Tridgell
4c99d09265
AP_Math: fixed build of vectorN class on PX4
2013-12-31 10:28:27 +11:00
Andrew Tridgell
2e9744d0b3
AP_Math: prevent transpose usage error in matrix API
2013-12-30 14:33:17 +11:00
Andrew Tridgell
2c1e0ba130
AP_Math: added vectorN class, and index checking
2013-12-30 14:33:17 +11:00
Andrew Tridgell
828eed1984
AP_Math: allow vector3 and matrix3 objects to be used as arrays
2013-12-29 18:39:09 +11:00
Andrew Tridgell
18896d9c9b
AP_Math: fixed DOS CR/LF errors
2013-09-19 16:26:32 +10:00
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell
e2b0e07973
AP_Math: removed unused matrix rotation code
...
we only need to rotate vectors
2013-08-30 13:01:34 +10:00
Randy Mackay
540ca25b84
AP_Math: add rotateXY
2013-07-20 17:59:06 +09:00
Andrew Tridgell
5024da2695
AP_Math: fixed indent-tabs-mode
2013-05-30 09:51:51 +10:00
Andrew Tridgell
f4189e083b
AP_Math: added mulXY() for matrix3 and vector3
...
returns the XY components of the product
2013-05-05 13:47:23 +10:00
uncrustify
7e19ae5868
uncrustify libraries/AP_Math/matrix3.h
2012-08-21 19:03:34 -07:00
Andrew Tridgell
0ba57d05eb
AP_Math: added matrix column extraction functions
2012-08-11 22:06:02 +10:00
Andrew Tridgell
c30b0d85a3
Math: moved more template functions to the .cpp files
...
save a bit more code space for larger functions
2012-06-27 16:01:49 +10:00
Andrew Tridgell
a6d66dc45b
Math: added mul_transpose() operation
...
this is equivalent to multiplying by m.transposed(), but is more
efficient
2012-03-23 16:48:52 +11:00
Andrew Tridgell
fe55a76335
Math: moved matrix multiple operations to .cpp file
...
this means we only link this in once, rather than for every use of
matrix multiply, which saves us some flash space
We need to be careful not to put large pieces of code in template
headers, as if the operation is used a lot, it costs us a lot of code
space
2012-03-21 10:43:48 +11:00
Andrew Tridgell
c16b353ea7
Math: added rotate() method to Matrix3f
...
this is the core method used to update the DCM matrix with a gyro
vector. Moving it to AP_Math allows us to have a test for it
2012-03-19 17:29:02 +11:00
Andrew Tridgell
31e566475b
Math: added zero() and identity() methods to Matrix3f
2012-03-19 17:29:02 +11:00
Andrew Tridgell
4422486d44
AP_Math: made rotation matrices more C++
...
thanks to Adam for the suggestion
2012-03-11 15:37:07 +11:00
Andrew Tridgell
289c64c0b9
Math: added vector3.rotate() and matrix3.rotation() methods
...
these operate on a "enum Rotation" which defines a set of standard
rotations. These are much faster than our previous method, plus use
less memory
2012-03-11 15:37:07 +11:00
Andrew Tridgell
17170da96e
AP_Math: added is_nan() methods to vector3f and matrix3f
2012-02-24 11:52:55 +11:00
Andrew Tridgell
62e92f406e
AP_Math: make out vector and matrix elements used types with fixed sizes
...
this prevents differences between CPU types
2011-12-16 20:09:11 +11:00
DrZiplok@gmail.com
f10cbb011f
::transposed does not change the matrix; make it const.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1648 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-14 04:26:05 +00:00
DrZiplok@gmail.com
290635b354
Minor code size optimisation; use memset to zero *this rather than explicitly assigning zero to the vector elements. Still not quite optimal for matrix3 as it gets three memsets, but still cheaper in terms of code size.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1212 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-20 01:52:23 +00:00
rmackay9@yahoo.com
8708675b1f
added constructor with 9 elements to matrix3.h
...
corrected matrix * vector function.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@551 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-25 02:43:11 +00:00
DrZiplok@gmail.com
7721e622aa
Rather than subclassing from the templated classes, just typedef directly to them.
...
This should solve the issues related to assigning to the convenience types.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@543 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 05:45:43 +00:00
rmackay9@yahoo.com
15e6469ca9
added downcasting to MATRIX3_CTORS. this fixes some problems with setting the results from a formula to a variable (i..e m1 = m2*2).
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@541 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 05:39:50 +00:00
rmackay9@yahoo.com
b3e1b6c57d
minor corrections to the operator *= and constructor so that matrix can be more easily created from vector objects
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@540 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 03:14:15 +00:00