Joshua Henderson
4e3a66a4d3
AP_Math: quaternion add is_zero() & zero()
...
& length_squared() & add unit tests
2022-01-19 18:03:17 +11:00
Josh Henderson
9b74452270
AP_Math: add Internal_Error for quaternion of 0 length
2021-09-28 19:09:16 +10:00
Peter Barker
be076e5b1a
AP_Math: correct descriptions of quaternion functions
2021-08-19 10:00:35 +10:00
Iampete1
22100dd37c
AP_Math: move to 32 digit rotation constants
2021-07-28 18:09:05 +10:00
Iampete1
dbd95f8163
AP_Math: make duplicate rotations clear
2021-07-28 18:09:05 +10:00
Iampete1
6c5424aad6
AP_Math: add roll +- 45 rotations
2021-07-28 18:09:05 +10:00
Peter Barker
118d3f085f
AP_Math: quaternion: add from_euler(Vector3&)
2021-07-28 17:20:28 +10:00
Andrew Tridgell
1486a473bd
AP_Math: remove unused rotation_matrix_norm()
2021-07-10 07:20:41 +10:00
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
Randy Mackay
b263a1d751
AP_Math: add Quaternion::roll_pitch_difference
2021-06-08 12:55:17 +09:00
hs293go
8bc02ab00b
AP_Math: Implement quaternion vector rotation operator
...
Overloads operator*() with semantics of applying a rotation to a vector, in
common with usage in Eigen/OpenGL. This implementation carries out 30
operations, compared to 58 operations for the q*v*q.inverse() formula
2021-04-19 15:34:45 +10:00
Patrick José Pereira
5d7d955378
AP_Math: Add missing const in member functions
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Peter Barker
58a8e54d83
AP_Math: create and use INTERNAL_ERROR macro so we get line numbers
2020-04-30 13:21:36 +10:00
Mark Whitehorn
7d3d664ddf
AP_Math: generate internalError on call to Vector3<T>::rotate and Quaternion::from_rotation with bad rotation value
2020-04-28 10:52:21 +10:00
Randy Mackay
26e4dd6fef
AP_Math: correct quaternion::from_rotation for pitch-180
2020-04-09 19:41:08 +09:00
Randy Mackay
61a06bbb04
AP_Math: add quaternion rotate, from_rotation and invert
2020-04-09 19:41:08 +09:00
Randy Mackay
9c8a5a7392
AP_Math: add comments above some quaternion methods
...
thanks to jchallinger
2020-04-03 10:16:07 +09:00
Andrew Tridgell
13a2367278
AP_Math: change optimisation from -O3 to -O2
2019-09-28 08:57:26 +10:00
Randy Mackay
07f7d793df
AP_Math: add quaternion::angular_difference
2019-02-22 13:00:07 +09:00
Pierre Kancir
f1270b4b22
AP_Math: const correctness
2018-12-22 08:39:06 +09:00
Andrew Tridgell
3b8ec3a2a0
AP_Math: allow double precision maths where needed
2018-05-07 11:43:23 +10:00
Pierre Kancir
fb7a00799f
AP_Math: quaternion fix missing return
2016-12-05 10:33:41 -08: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
Leonard Hall
e0eecd56b2
AP_Math: use is_zero and float constants
2016-06-24 16:16:34 +09:00
Leonard Hall
7f933140c7
AP_Math: small formatting fix to quaternion rotation_matrix
...
No functional change
2016-06-24 16:16:33 +09:00
Leonard Hall
8afd29cc85
AP_Math: add quaternion::rotation_matrix_norm
2016-06-24 16:16:28 +09:00
Gustavo Jose de Sousa
39f72610e2
AP_Math: quaternion: fix style
...
Remove trailing spaces and run astyle.
2016-05-10 16:16:37 +10:00
Jonathan Challinger
0a701088d4
AP_Math: fix bug in Quaternion::operator*=
2015-12-14 11:15:33 +09: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
2a8f645d81
AP_Math: use matrix3 euler312 operations in quaternion library
2015-05-25 09:08:31 +10:00
Tom Pittenger
5f677c2b5b
AP_Math: float to double promotion via cos instead of cosf
2015-05-16 08:21:49 +10:00
Tom Pittenger
330e4126bb
Ap_Math: compile warnings: float to double. use atan2f instead of atan2
2015-05-05 13:27:00 +10:00
Jonathan Challinger
3812773485
AP_Math: make quaternion divide by zero protection more conservative
2015-04-28 11:42:13 +10:00
Jonathan Challinger
fb8da1b2d8
AP_Math: add get_euler_(roll|pitch|yaw) functions to quaternion
2015-04-28 11:42:13 +10:00
Tom Pittenger
10c933966b
AP_Math: fix compile warning re float constants
2015-04-24 14:25:02 +09:00
Jonathan Challinger
6baec4952b
AP_Math: add conversions to and from 3-1-2 euler angles
2015-04-07 21:20:51 -07:00
Jonathan Challinger
a1d4f40c16
AP_Math: change quaternion operator* and operator/ to const
2015-04-07 21:20:51 -07:00
Jonathan Challinger
07735fefa6
AP_Math: fix div by zero in quaternion
2015-04-07 21:20:51 -07:00
Paul Riseborough
255252f387
AP_Math: Fix bug in quaternion division
2015-02-03 09:49:16 +11:00
Paul Riseborough
17445d03f0
AP_Math: Add quaternion division
2015-02-03 09:49:16 +11:00
Jonathan Challinger
3befe74afa
AP_Math: change quaternion class to use const references where optimal
2014-10-20 06:24:30 +11:00
Jonathan Challinger
1f7e393e38
AP_Math: refactor quaternion library
2014-10-20 06:24:22 +11:00
Andrew Tridgell
689f230d40
AP_Math: added quaternion.from_rotation_matrix()
2014-02-15 12:20:31 +11:00
Andrew Tridgell
90c41981ac
AP_Math: added quaternion normalization
2014-02-15 05:27:51 +11:00
Andrew Tridgell
96df09fd08
AP_Math: add const to quaternion API
2013-12-30 14:33:17 +11: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
uncrustify
424baf3f29
uncrustify libraries/AP_Math/quaternion.cpp
2012-08-21 19:03:33 -07:00
Andrew Tridgell
d948a28e7c
Math: change signs in quaternion library
...
thanks to Justin for the suggestion
2012-03-19 17:29:02 +11:00
Andrew Tridgell
5c6368bad3
AP_Math: allow null pointers in Quaternion::to_euler()
...
this matches the Matrix3f method
2012-03-11 15:37:07 +11:00