Andrew Tridgell
e2b0e07973
AP_Math: removed unused matrix rotation code
...
we only need to rotate vectors
12 years ago
Randy Mackay
540ca25b84
AP_Math: add rotateXY
12 years ago
Andrew Tridgell
5024da2695
AP_Math: fixed indent-tabs-mode
12 years ago
Andrew Tridgell
f4189e083b
AP_Math: added mulXY() for matrix3 and vector3
...
returns the XY components of the product
12 years ago
uncrustify
7e19ae5868
uncrustify libraries/AP_Math/matrix3.h
13 years ago
Andrew Tridgell
0ba57d05eb
AP_Math: added matrix column extraction functions
13 years ago
Andrew Tridgell
c30b0d85a3
Math: moved more template functions to the .cpp files
...
save a bit more code space for larger functions
13 years ago
Andrew Tridgell
a6d66dc45b
Math: added mul_transpose() operation
...
this is equivalent to multiplying by m.transposed(), but is more
efficient
13 years ago
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
13 years ago
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
13 years ago
Andrew Tridgell
31e566475b
Math: added zero() and identity() methods to Matrix3f
13 years ago
Andrew Tridgell
4422486d44
AP_Math: made rotation matrices more C++
...
thanks to Adam for the suggestion
13 years ago
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
13 years ago
Andrew Tridgell
17170da96e
AP_Math: added is_nan() methods to vector3f and matrix3f
13 years ago
Andrew Tridgell
62e92f406e
AP_Math: make out vector and matrix elements used types with fixed sizes
...
this prevents differences between CPU types
13 years ago
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
14 years ago
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
14 years ago
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
15 years ago
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
15 years ago
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
15 years ago
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
15 years ago
DrZiplok@gmail.com
ac2e14c4ec
Remove a bunch of probably wrong const cruft. Ditch the dubious array index operators from vector2.
...
15 years ago
DrZiplok@gmail.com
815e5f871a
Remove the trivial operator= implementations, the default shallow copy is fine.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@537 f9c3cf11-9bcb-44bc-f272-b75c42450872
15 years ago
DrZiplok@gmail.com
646045ef44
Some minor fixes prompted while looking at the code for other reasons.
...
Return non-const values from assignment. Fix operator* for matrix3.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@536 f9c3cf11-9bcb-44bc-f272-b75c42450872
15 years ago
DrZiplok@gmail.com
b918f21567
Replace the questionable rotation operation with a conventional transposition.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@442 f9c3cf11-9bcb-44bc-f272-b75c42450872
15 years ago
DrZiplok@gmail.com
097161cd8d
Beginnings of a math library for ArduPilot(Mega) systems.
...
15 years ago