Andrew Tridgell
e2eda63d2c
AP_Math: added new rotation for PITCH_7
2019-05-29 17:12:32 +10:00
Pierre Kancir
f1270b4b22
AP_Math: const correctness
2018-12-22 08:39:06 +09:00
Michael du Breuil
48610ea0a0
AP_Math: Remove an unneeded safe_sqrtf, leverage is_zero
2018-11-07 10:43:28 +11:00
Jacob Walser
f97ac4af30
AP_Math: add custom rotation option
2018-04-24 13:04:37 +01:00
Jacob Walser
e738f33770
AP_Math: Add ROTATION_PITCH_315 and ROTATION_ROLL_90_PITCH_315
2018-04-24 13:04:37 +01:00
Randy Mackay
2aa1f3f100
AP_Math: replace divide with multiply in distance_to_segment
2017-09-09 14:05:41 +09:00
Randy Mackay
e892bbbac0
AP_Math: add Vector3f::distance_to_segment
2017-09-09 14:05:41 +09:00
Lucas De Marchi
008ac0a2a8
AP_Math: remove unused double instantiation
2017-02-06 09:27:22 -08:00
Andrew Tridgell
b00fd95725
AP_Math: define Vector3l for += op
2016-11-09 17:08:13 +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
dgrat
41661f815f
AP_Math: Replace the pythagorous* functions with a variadic template
...
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
Andrew Tridgell
16e0a6d7b0
AP_Math: fixed angle between two vector3s
2016-01-01 12:41:05 +11:00
Lucas De Marchi
ba3325ffd3
AP_Math: rename rotation
...
The rotations are supposed to follow the name of the enum, in order. The
ROTATION_YAW_293_PITCH_68_ROLL_90 was added with the name of an
intrinsic 321 rotation, but the matrix is actually a 123 rotation,
following the other rotations already present.
Change the name to follow the other names.
2015-12-30 20:22:27 -02:00
Jonathan Challinger
7ed8b3814f
AP_Math: add rotate_inverse to Vector3
2015-12-29 10:46:34 -08: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
0b897e04bb
AP_Math: revert AP_Math class change
2015-05-05 13:27:06 +10:00
Tom Pittenger
820f0bf02a
AP_Math: compiler warnings: float to double promotion
...
cast as float because we're in magical template land where T minus T means promote to double
2015-05-05 13:26:58 +10:00
Tom Pittenger
1c3ad00aa7
AP_Math: compiler warnings: use double for the constant so the template can handle it
2015-05-05 13:26:57 +10:00
Tom Pittenger
ac4e7b2b03
AP_Math: compiler warnings: apply is_equal(float)
2015-05-05 13:26:51 +10:00
Andrew Tridgell
728dbf24db
AP_Math: fixed vector inequality test
...
many thanks to cat888
fixes issue #2039
2015-04-01 20:40:37 -07:00
Jonathan Challinger
9e5a30d5ba
AP_Math: change ROTATION_YAW_293_PITCH_68_ROLL_180 to ROLL_90
2015-01-02 17:15:18 +09:00
Andrew Tridgell
8d54368650
AP_Math: fixed build warning
2014-11-25 08:17:15 +11:00
Randy Mackay
3d2c9910b3
AP_Math: add yaw 293, pitch 68, roll 180 rotation
2014-11-22 14:09:16 +09: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
a295a01bbc
AP_Math: added missing 90 degree rotations
...
this ensures we can handle all 90 degree rotations of the compass and
main board. A test in examples/rotations shows that we have them all.
2013-08-30 13:01:33 +10:00
Andrew Tridgell
468e55d425
AP_Math: added two new vector/matrix ops for kalman airspeed filter
2013-07-22 12:50:00 +10:00
Andrew Tridgell
43c3c60de2
AP_Math: moved a lot of vector templates to cpp from .h
...
this reduces the code size quite a lot on AVR
2013-04-12 12:48:08 +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
Andrew Tridgell
a072afa223
AP_Math: expand some macros into functions
...
this saves some flash
2012-12-20 14:52:38 +11:00
uncrustify
a208fbb2d9
uncrustify libraries/AP_Math/vector3.cpp
2012-08-21 19:03:34 -07:00
Andrew Tridgell
fe865bc1dc
Math: added comment
2012-06-27 16:01:49 +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
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
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