Commit Graph

35 Commits

Author SHA1 Message Date
Andrew Tridgell afb928081a AP_Math: use ftype for a few internal trig fns 2021-07-10 07:20:41 +10:00
Andrew Tridgell 0f2f0d4cb2 AP_Math: allow for double EKF build 2021-07-10 07:20:41 +10:00
Andrew Tridgell 720f9a1de0 AP_Math: cleanup maths functions
use class template instantiation, and cleanup const in matrix code
2021-01-21 13:09:21 +11:00
Peter Barker 2f8c0dd65b AP_Math: remove use of Vector3 as function 2020-06-16 11:06:47 +10:00
Andrew Tridgell 13a2367278 AP_Math: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Pierre Kancir 97ce39bf0c AP_Math: use direct assignment for rotate() 2019-02-06 21:41:30 +11:00
Pierre Kancir f1270b4b22 AP_Math: const correctness 2018-12-22 08:39:06 +09: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
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02: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 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 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 c9ec8b3f67 AP_Math: added O3 optimisation to core math libraries
this costs some flash space but speeds things up considerably
2015-10-20 14:36:53 +11:00
Andrew Tridgell 7aa7e03169 AP_Math: added euler312 functions (for gimbal) 2015-05-25 09:03:11 +10:00
Randy Mackay 9dede2f0ec Math: remove duplicate HALF_SQRT_2 definition 2015-05-05 14:23:14 +09:00
Andrew Tridgell 24b051565b AP_Math: added normalize() method to Matrix3f 2015-05-05 09:45:52 +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 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 f4189e083b AP_Math: added mulXY() for matrix3 and vector3
returns the XY components of the product
2013-05-05 13:47:23 +10:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell 38062bbb6d AP_Math: support some more rotation combinations 2013-01-13 17:32:48 +11:00
uncrustify d6e803fd3c uncrustify libraries/AP_Math/matrix3.cpp 2012-08-21 19:03:33 -07: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 58a68c89d9 Math: added a function to combine standard rotations
this will allow us to have an overall board rotation plus a per-sensor
rotation
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