Andy Piper
87a369727a
AP_Math: specialize float and double functions to use fabsf() and simple comparison otherwise
3 years ago
Iampete1
22100dd37c
AP_Math: move to 32 digit rotation constants
4 years ago
Iampete1
dbd95f8163
AP_Math: make duplicate rotations clear
4 years ago
Iampete1
6c5424aad6
AP_Math: add roll +- 45 rotations
4 years ago
Andrew Tridgell
168e860f70
AP_Math: fixed a few more single precision calls
4 years ago
Andrew Tridgell
0f2f0d4cb2
AP_Math: allow for double EKF build
4 years ago
Andrew Tridgell
fe4abc521a
AP_Math: make vector3 xy() method return a reference
4 years ago
Andrew Tridgell
f19b604a0c
AP_Math: added xy() method on Vector3
...
useful for getting xy length
4 years ago
Rishabh
547f0efd57
AP_Math: Add segment to plane intersection function
4 years ago
Leonard Hall
5c47c0a131
AP_Math: Fix before squash
4 years ago
Andrew Tridgell
53e5bef0c2
AP_Math: added rotate_xy to Vector3f
...
this makes it easy to rotate a vector3f in xy plane for earth/body
navigation
4 years ago
Randy Mackay
e2b46d05dc
AP_Math: Vector2,3 get limit_length methods
4 years ago
Rishabh
1262d73071
AP_Math: Add new methods to support 3D avoidance
4 years ago
Rishabh
79d5e432ee
AP_Math: Add new method to extrapolate 3D vector given distance, yaw, pitch
4 years ago
Andrew Tridgell
720f9a1de0
AP_Math: cleanup maths functions
...
use class template instantiation, and cleanup const in matrix code
4 years ago
Rishabh
0779cf436e
AP_Math: Added function to calculate shortest distance betwwen point and line segment in 3D
5 years ago
Peter Barker
58a8e54d83
AP_Math: create and use INTERNAL_ERROR macro so we get line numbers
5 years ago
Mark Whitehorn
7d3d664ddf
AP_Math: generate internalError on call to Vector3<T>::rotate and Quaternion::from_rotation with bad rotation value
5 years ago
Randy Mackay
338548c5eb
AP_Math: move HALF_SQRT_2 def to rotation.h
...
This allows it to be used by the Quaternion class
5 years ago
Andrew Tridgell
13a2367278
AP_Math: change optimisation from -O3 to -O2
5 years ago
Andrew Tridgell
e2eda63d2c
AP_Math: added new rotation for PITCH_7
6 years ago
Pierre Kancir
f1270b4b22
AP_Math: const correctness
6 years ago
Michael du Breuil
48610ea0a0
AP_Math: Remove an unneeded safe_sqrtf, leverage is_zero
6 years ago
Jacob Walser
f97ac4af30
AP_Math: add custom rotation option
7 years ago
Jacob Walser
e738f33770
AP_Math: Add ROTATION_PITCH_315 and ROTATION_ROLL_90_PITCH_315
7 years ago
Randy Mackay
2aa1f3f100
AP_Math: replace divide with multiply in distance_to_segment
8 years ago
Randy Mackay
e892bbbac0
AP_Math: add Vector3f::distance_to_segment
8 years ago
Lucas De Marchi
008ac0a2a8
AP_Math: remove unused double instantiation
8 years ago
Andrew Tridgell
b00fd95725
AP_Math: define Vector3l for += op
8 years ago
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.
8 years ago
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.
9 years ago
Andrew Tridgell
16e0a6d7b0
AP_Math: fixed angle between two vector3s
9 years ago
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.
9 years ago
Jonathan Challinger
7ed8b3814f
AP_Math: add rotate_inverse to Vector3
9 years ago
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.
9 years ago
Andrew Tridgell
c9ec8b3f67
AP_Math: added O3 optimisation to core math libraries
...
this costs some flash space but speeds things up considerably
9 years ago
Andrew Tridgell
0b897e04bb
AP_Math: revert AP_Math class change
10 years ago
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
10 years ago
Tom Pittenger
1c3ad00aa7
AP_Math: compiler warnings: use double for the constant so the template can handle it
10 years ago
Tom Pittenger
ac4e7b2b03
AP_Math: compiler warnings: apply is_equal(float)
10 years ago
Andrew Tridgell
728dbf24db
AP_Math: fixed vector inequality test
...
many thanks to cat888
fixes issue #2039
10 years ago
Jonathan Challinger
9e5a30d5ba
AP_Math: change ROTATION_YAW_293_PITCH_68_ROLL_180 to ROLL_90
10 years ago
Andrew Tridgell
8d54368650
AP_Math: fixed build warning
10 years ago
Randy Mackay
3d2c9910b3
AP_Math: add yaw 293, pitch 68, roll 180 rotation
10 years ago
Niels Joubert
879eb5936b
AP_MATH: Adding WGS GPS conversions, CRC16 checks, and double-precision Vectors and Matrices
11 years ago
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.
12 years ago
Andrew Tridgell
468e55d425
AP_Math: added two new vector/matrix ops for kalman airspeed filter
12 years ago
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
12 years ago
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.
12 years ago
Andrew Tridgell
38062bbb6d
AP_Math: support some more rotation combinations
12 years ago