Peter Barker
8cffcde7bd
AP_Math: move crc8_dvb_update into crc library
2021-11-29 19:02:38 +09:00
Andrew Tridgell
0b76a17e65
AP_Math: fixed expo_curve()
...
doesn't make sense as constexpr
2021-08-28 14:41:27 +09:00
Leonard Hall
ba70c50a07
AP_Math: Spelling fix
2021-08-14 10:44:08 +09:00
Leonard Hall
eff91e87ca
AP_Math: Control: Refactor to use Jerk
2021-08-14 10:44:08 +09:00
Leonard Hall
397cd8cbe0
AP_Math: Control: protect against divide by zero
2021-08-14 10:44:08 +09:00
Andrew Tridgell
7f3bc8ba1f
AP_Math: fix uses of single precision
2021-07-22 19:07:36 +09:00
Andrew Tridgell
aa4bbdfce1
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 19:07:36 +09:00
Andrew Tridgell
9a469bdaa9
AP_Math: fixed build
2021-07-22 19:07:36 +09:00
Andrew Tridgell
5660d31ca2
AP_Math: sync for 4.1.0beta releases
2021-07-22 19:07:36 +09:00
Andrew Tridgell
dddd78daf7
AP_Math: allow for double EKF build
2021-07-22 19:07:36 +09:00
Andrew Tridgell
978ea307b0
AP_Math: fixed the value LATLON_TO_CM
...
it didn't have enough digits of precision, and was inconsistent with
LOCATION_SCALING_FACTOR
2021-06-29 17:26:34 +09:00
Andrew Tridgell
aa03afafa7
AP_Math: added matrix3 tofloat and todouble
2021-06-24 21:34:30 +10:00
Andrew Tridgell
9b91cfe4ee
AP_Math: implement double versions of some position control methods
2021-06-24 21:34:30 +10:00
Andrew Tridgell
3a3a30ab22
AP_Math: define postype_t and vectors
2021-06-24 21:34:30 +10:00
Andrew Tridgell
3315ec5acc
AP_Math: added tofloat() and todouble() methods to Vector2 and Vector3
2021-06-24 21:34:30 +10:00
Andrew Tridgell
639570505b
AP_Math: cleanups from Leonards feedback
2021-06-24 20:28:45 +10:00
Andrew Tridgell
566dd8ca8b
AP_Math: cleanup API comments on control code
2021-06-24 20:28:45 +10:00
Andrew Tridgell
86f09cad09
AP_Math: cleanup position control APIs
...
use Vector2 for xy, float for z
2021-06-24 20:28:45 +10:00
Andrew Tridgell
fe4abc521a
AP_Math: make vector3 xy() method return a reference
2021-06-24 20:28:45 +10:00
Josh Henderson
566621e2ba
AP_Math: SCurve check direction.length_squared is_zero
2021-06-14 13:26:44 +09: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