Andrew Tridgell
36174d198f
AP_Math: fix uses of single precision
2021-07-22 16:01:01 +10:00
Andrew Tridgell
3fd0bf734b
AP_Math: added test for SCurve::calculate_path
...
this was the values shown in the core dump for failing guided mode
test in CI
2021-07-22 16:01:00 +10:00
Andrew Tridgell
0579870593
AP_Math: fixed build
2021-07-22 16:01:00 +10:00
Andrew Tridgell
dd2995af5d
AP_Math: sync for 4.1.0beta releases
2021-07-22 16:01:00 +10:00
Andrew Tridgell
e7afa628d1
AP_Math: allow for double EKF build
2021-07-22 16:01:00 +10:00
Andrew Tridgell
0e37a44942
AP_Math: fixed the value LATLON_TO_CM
...
it didn't have enough digits of precision, and was inconsistent with
LOCATION_SCALING_FACTOR
2021-07-04 08:19:11 +10:00
Andrew Tridgell
f45ef772f3
AP_Math: added matrix3 tofloat and todouble
2021-07-04 08:19:11 +10:00
Andrew Tridgell
c2211db91d
AP_Math: implement double versions of some position control methods
2021-07-04 08:19:11 +10:00
Andrew Tridgell
d40475cf7b
AP_Math: define postype_t and vectors
2021-07-04 08:19:11 +10:00
Andrew Tridgell
2f2d1c985a
AP_Math: added tofloat() and todouble() methods to Vector2 and Vector3
2021-07-04 08:19:11 +10:00
Andrew Tridgell
889bd2547f
AP_Math: cleanups from Leonards feedback
2021-07-04 08:19:11 +10:00
Andrew Tridgell
848cac37c2
AP_Math: cleanup API comments on control code
2021-07-04 08:19:11 +10:00
Andrew Tridgell
6e99028d69
AP_Math: cleanup position control APIs
...
use Vector2 for xy, float for z
2021-07-04 08:19:11 +10:00
Andrew Tridgell
070a004f26
AP_Math: make vector3 xy() method return a reference
2021-07-04 08:19:11 +10:00
Josh Henderson
32359e209d
AP_Math: SCurve check direction.length_squared is_zero
2021-07-04 08:19:10 +10:00
Andrew Tridgell
f19b604a0c
AP_Math: added xy() method on Vector3
...
useful for getting xy length
2021-06-13 07:50:02 +10:00
Rishabh
b9fbf1a661
AP_Math: Update segment_to_segment_dis test
2021-06-12 13:31:52 +09:00
Rishabh
547f0efd57
AP_Math: Add segment to plane intersection function
2021-06-12 13:31:52 +09:00
Pierre Kancir
519b1a6913
AP_Math: correct and increase unit test coverage
...
AP_Math: correct some tests
AP_Math: more vector2 tests
AP_Math: make test_vector2 complete
AP_Math: add initial unittest for vector3
2021-06-09 18:06:18 +10:00
Randy Mackay
b263a1d751
AP_Math: add Quaternion::roll_pitch_difference
2021-06-08 12:55:17 +09:00
Andrew Tridgell
154ae64e63
AP_Math: support either polarity in linear_interpolate()
2021-06-05 13:05:30 +10:00
Peter Barker
d77d258442
AP_Math: add tests for the sqrt_controller
2021-06-04 23:00:19 +10:00
Leonard Hall
5c47c0a131
AP_Math: Fix before squash
2021-05-24 20:13:37 +10:00
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
2021-05-24 20:13:37 +10:00
Leonard Hall
c4bb8baf0c
AP_Math: Control: Add XY S-Curve shapers and shaping limits
2021-05-24 20:13:37 +10:00
Leonard Hall
3530d9121f
AP_Math: minor format fix to SCurve::advance_target_along_track
2021-05-12 19:53:57 +09:00
Tom Pittenger
ba6bb21560
AP_Math: added helper for16bit float conversions
2021-04-28 19:22:53 -07:00
hs293go
93a13bbf0e
AP_Math: Implement tests for the Quaternion class
...
These tests cover Quaternion multiplication, conversion to rotation
matrix, and the optimized rotation operator
2021-04-19 15:34:45 +10: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
Randy Mackay
bc0da915c4
AP_Math: add SplineCurve library
...
Co-authored-by: Leonard Hall <leonardthall@gmail.com>
includes corrections from peer review
2021-04-03 12:07:59 +09:00
Leonard Hall
af7403f4e9
AP_Math: add SCurve library
...
SCurve const more local variables
rename update to get_jerk_vel_pos_at_time
removed unused update
debug output in SITL
fixes to ensure finished at end of path
fixes including validity check
includes corrections from peer review
2021-04-03 12:07:59 +09:00
Randy Mackay
0e506a71a1
AP_Math: remove control's limit_vector_length
...
these have been moved to Vector2f and Vector3f
2021-04-03 12:07:59 +09:00
Randy Mackay
e2b46d05dc
AP_Math: Vector2,3 get limit_length methods
2021-04-03 12:07:59 +09:00
Leonard Hall
3bb0482795
AP_Math: add update_pos_vel_accel to control
...
also add shape_vel, shape_pos_vel and stopping_distance
also add calculation of kinematic limits
2021-04-03 12:07:59 +09:00
Andrew Tridgell
1f60eb68ec
AP_Math: removed assert calls
...
these waste flash space and do not do us any good
2021-03-25 14:03:40 +11:00
Andrew Tridgell
e884e4c5ac
AP_Math: added fixedwing_turn_rate() helper
2021-02-27 14:42:20 +11: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
Rishabh
f3d825bebe
AP_Math: Add unit tests for 3-D lines
2021-02-01 14:34:13 +09:00
Rishabh
1262d73071
AP_Math: Add new methods to support 3D avoidance
2021-02-01 14:34:13 +09:00
Rishabh
79d5e432ee
AP_Math: Add new method to extrapolate 3D vector given distance, yaw, pitch
2021-02-01 14:34:13 +09:00
Andrew Tridgell
a1fb0592a9
AP_Math: specialise polyfit for vectors
...
this is needed to get the precision good enough for wide temperature
ranges when summing the resulting polygon coefficients
2021-01-21 13:09:21 +11:00
Andrew Tridgell
999268cbba
AP_Math: fixup matrix algorithms to be in cpp file
...
this fixes an issue where optimize O2 was forced on any file that
included AP_Math.h. It also fixes the test suite for matrix_alg, and
fixes the type handling to be consistent
2021-01-21 13:09:21 +11:00
bugobliterator
3b3e2c01f8
AP_Math: templatize matrix_alg methods
2021-01-21 13:09:21 +11:00
Andrew Tridgell
64d9f43d94
AP_Math: added polygon fitting code
2021-01-21 13:09:21 +11:00
Andrew Tridgell
720f9a1de0
AP_Math: cleanup maths functions
...
use class template instantiation, and cleanup const in matrix code
2021-01-21 13:09:21 +11:00
Leonard Hall
1e38440c83
AP_Math: add control common functions
2021-01-20 18:19:40 +11:00
Andrew Tridgell
d9dbcb17c4
AP_Math: enable constrain value with line numbers on all boards
2021-01-19 10:24:39 +11:00
Peter Barker
c81df7b5ad
AP_Math: add tests for circle-segment-intersection
2021-01-04 13:58:42 +11:00
Peter Barker
f534963413
AP_Math: consolidate error checking
2021-01-04 13:58:42 +11:00
murata
4ffc559ccc
AP_Math: judge isnan judgment before operation
2021-01-04 13:58:42 +11:00