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
Randy Mackay
6145794da2
AP_Math: remove duplicate RADIUS_OF_EARTH definition
9 years ago
Randy Mackay
39340e70f8
Math: add Vector2 is_zero method
10 years ago
Valmantas Palikša
d4daf19151
AP_Math: Move simple math function implementations to header for better
...
compile time optimization
Functions like sq() are better moved to the header file as inline.
Compiler can then optimize these out when used in code, this saves cpu
cycles with stack push, pop during function calls.
10 years ago
Tom Pittenger
4771d19073
AP_Math: added locations_are_same(loc1,loc2) helper
...
returns true if lat and lng are the same, ignores alt and options
10 years ago
Siddharth Bharat Purohit
1ffbffa0e7
AP_Math: check if failed to allocate memory
10 years ago
Gustavo Jose de Sousa
46774136a6
AP_Compass: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
10 years ago
Jonathan Challinger
1c100498d4
AP_Math: use is_zero instead of defining our own epsilon
10 years ago
Siddharth Bharat Purohit
b654b1c21b
AP_Math: add inverse matrix to math library
10 years ago
Randy Mackay
46c652e42f
Math: maxf and minf functions
10 years ago
Gustavo Jose de Sousa
4790371f9b
AP_Math: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
10 years ago
Lucas De Marchi
0471de2342
AP_Math: use ARRAY_SIZE macro
10 years ago
Lucas De Marchi
fb2eb262e7
AP_Math: use ARRAY_SIZE instead of defining another one
10 years ago
Andrew Tridgell
6009ae55b1
AP_Math: fixed build of eulers example sketch
10 years ago
Andrew Tridgell
8f41d97548
AP_Math: fixed build error on PX4
...
variable set but not used with recent longitude_scale change
10 years ago
Andrew Tridgell
099392d3ca
AP_Math: don't optimise longitude_scale on faster CPUs
...
it causes problems with replay
10 years ago
Andrew Tridgell
3edac37929
AP_Math: removed unused include in example
10 years ago
Andrew Tridgell
4d040bbb94
AP_Math: convert example from .pde to .cpp
10 years ago
Andrew Tridgell
2b828a794e
AP_Math: fixed example build
10 years ago
Randy Mackay
114c4f4077
AP_Match: fix example sketch
10 years ago
Andrew Tridgell
2a8f645d81
AP_Math: use matrix3 euler312 operations in quaternion library
10 years ago
Andrew Tridgell
7aa7e03169
AP_Math: added euler312 functions (for gimbal)
10 years ago
Andrew Tridgell
605b8b4ece
AP_Math: converted rotations example to cpp
...
this is just a test conversion before we start converting on-mass
10 years ago
Andrew Tridgell
062c9406bd
AP_Math: fixed rotations example build
10 years ago
Tom Pittenger
5f677c2b5b
AP_Math: float to double promotion via cos instead of cosf
10 years ago
Tom Pittenger
e20ffa8c75
AP_Math: replace fabs() with fabsf()
10 years ago
Randy Mackay
9dede2f0ec
Math: remove duplicate HALF_SQRT_2 definition
10 years ago
Andrew Tridgell
77a2b4acf6
AP_Math: removed fast_atan
10 years ago
Andrew Tridgell
0b897e04bb
AP_Math: revert AP_Math class change
10 years ago
Andrew Tridgell
936fbbb362
AP_Math: removed AP_Math class
10 years ago
Tom Pittenger
4ec2fb3a9c
AP_Math: Compiler warnings: nuke fast_atan2()
...
per Randy's suggestion, fast_atan2() is no longer necessary over atan2() because only copter uses it and copter is no longer supported on future builds of APM
ccd578664f (commitcomment-11025083)
10 years ago
Tom Pittenger
330e4126bb
Ap_Math: compile warnings: float to double. use atan2f instead of atan2
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
6e6f481ecb
AP_Math: compiler warnings: apply is_zero(float) or is_equal(float)
10 years ago
Tom Pittenger
35f7a466e5
AP_Math: compiler warnings: apply is_zero(float) or is_equal(float)
10 years ago
Tom Pittenger
a5d2f3a82f
AP_Math: compiler warnings: float to double
10 years ago
Tom Pittenger
ac4e7b2b03
AP_Math: compiler warnings: apply is_equal(float)
10 years ago
Tom Pittenger
c93c773de2
AP_Math: change is_equal and is_zero to static class for better visability
10 years ago
Tom Pittenger
bdda11b327
AP_Math: compiler warning: is_zero special case for vector3.h in a template
10 years ago
Andrew Tridgell
eca675c556
AP_Math: fix for HAL_SITL rename
10 years ago
Andrew Tridgell
24b051565b
AP_Math: added normalize() method to Matrix3f
10 years ago
Randy Mackay
fecbf06008
AP_Math: fix example sketches
10 years ago
Randy Mackay
eaedeeb7bf
AP_Math: add quaternion.initialise
10 years ago
Randy Mackay
0392292489
AP_Math: inline is_equal, add is_zero
10 years ago
dgrat
726d7df710
AP_Math: add is_equal to compare floats
10 years ago
Jonathan Challinger
3812773485
AP_Math: make quaternion divide by zero protection more conservative
10 years ago
Jonathan Challinger
fb8da1b2d8
AP_Math: add get_euler_(roll|pitch|yaw) functions to quaternion
10 years ago
Tom Pittenger
10c933966b
AP_Math: fix compile warning re float constants
10 years ago
Tom Pittenger
a8dda9f2ed
AP_Math: fix compile warnings re float constants
10 years ago