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
Andrew Tridgell
a072afa223
AP_Math: expand some macros into functions
...
this saves some flash
12 years ago
uncrustify
a208fbb2d9
uncrustify libraries/AP_Math/vector3.cpp
13 years ago
Andrew Tridgell
fe865bc1dc
Math: added comment
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
58a68c89d9
Math: added a function to combine standard rotations
...
this will allow us to have an overall board rotation plus a per-sensor
rotation
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