Randy Mackay
032544f876
AP_Math: add vector2f::offset_bearing
2020-05-11 10:22:15 +09:00
Andrew Tridgell
d198b723b2
AP_Math: define ROTATION_MAX_AUTO_ROTATION
...
we don't want to use ROTATION_PITCH_7 in our auto rotation mix, as it
is too close to level
2020-01-07 15:47:27 +09:00
Siddharth Purohit
fb48d8ee1b
AP_Math: add method for generating hash
2019-10-19 09:55:38 +11:00
Andrew Tridgell
66b4e92444
AP_Math: make fill_nanf() use a signalling NaN
...
we want use of these values to trigger a FPE
2019-10-01 17:35:26 +10:00
Peter Barker
6fe09b6120
AP_Math: move is_valid_octal into adsb
...
This doesn't ensure the value is octal digits - there's more magic in
it.
2019-10-01 09:18:15 +10:00
Peter Barker
189ef5f1e7
AP_Math: define != for Vector2<int>
2019-09-28 07:58:48 +09:00
Andrew Tridgell
13a2367278
AP_Math: change optimisation from -O3 to -O2
2019-09-28 08:57:26 +10:00
Peter Barker
975804fa35
AP_Math: remove unit_mod concept from wrap functions
...
devcall decided it would be clearer to have non-shared implementation
for the _cd variants
2019-09-25 13:19:44 +10:00
Andrew Tridgell
9b746b89db
AP_Math: added fill_nanf()
...
used in SITL to invalidate memory
2019-09-24 12:51:54 +10:00
Peter Barker
5692f3d79e
AP_Math: stop returning float for integer wrap_180/wrap_360 etc
2019-09-18 12:57:02 +10:00
Peter Barker
84d999142f
AP_Math: add more tests for wrap functions
2019-09-18 12:57:02 +10:00
Randy Mackay
c7ca9c04f8
AP_Math: add comment to vector2f::point_on_segment
2019-08-10 12:21:01 +09:00
Peter Barker
4c434c2df9
AP_Math: add WARN_IF_UNUSED to bool methods
2019-07-26 09:26:02 +09:00
Andrew Tridgell
2480a62e55
AP_Math: added speed/distance conversions
2019-07-13 11:05:57 +10:00
murata
c5a471e778
AP_Math: Common modbus crc method
2019-07-12 15:33:21 +10:00
Randy Mackay
614b0f6dc8
AP_Math: Polygon_intersects handles unclosed polygons
2019-07-07 04:08:34 -07:00
Peter Barker
da5d5c9203
AP_Math: add tests for Vector2
2019-06-13 19:36:49 +10:00
Randy Mackay
c2bcc0d5f0
AP_Math: define Vector2f::perpendicular
2019-06-11 13:13:22 +09:00
Randy Mackay
071e340827
AP_Math: Polygon_closest_distance_line returns neg numbers
...
value is negative distance from intersection to p2
2019-06-11 13:13:22 +09:00
Andrew Tridgell
6eb816fd3b
AP_Math: add Polygon_closest_distance_line
...
Also add optimisations
2019-06-11 13:13:22 +09:00
Andrew Tridgell
a5fd7ac5ca
AP_Math: add vector2f::closest_distance_between_line_and_point_squared
...
also add vector2f::closest_distance_between_line_and_point and vector2f::closest_distance_between_lines_squared
2019-06-11 13:13:22 +09:00
Andrew Tridgell
2457bf71d4
AP_Math: add simplified vector2f::closest_point
...
this simpler version assumes the line segment originates at the origin
2019-06-11 13:13:22 +09:00
Andrew Tridgell
c8e49259a0
AP_Math: add vector2f::closest_distance_between_radian_and_point_squared
2019-06-11 13:13:22 +09:00
Andrew Tridgell
dbf337e1b3
AP_Math: move closest_point to cpp
2019-06-11 13:13:22 +09:00
Andrew Tridgell
bfc28dfde9
AP_Math: move normalize, reflect, project and perpendicular to cpp
2019-06-11 13:13:22 +09:00
Andrew Tridgell
01e541b7d1
AP_Math: minor formatting changes to length method
2019-06-11 13:13:22 +09:00
Andrew Tridgell
4c4de1f021
AP_Math: vector2f::length_squared always returns float
2019-06-11 13:13:22 +09:00
Andrew Tridgell
46617e6c72
AP_Math: remove unused include from Vector2
2019-06-11 13:13:22 +09:00
Andrew Tridgell
69781cda42
AP_Math: add Vector2::angle
2019-06-11 13:13:22 +09:00
Peter Hall
ea4ecebfc4
AP_Math: add speed unit converstion defs
2019-06-03 10:48:19 +09:00
Peter Barker
e4de5a17d1
AP_Math: add pitch-7 to rotation tests
2019-05-29 17:12:32 +10:00
Andrew Tridgell
e2eda63d2c
AP_Math: added new rotation for PITCH_7
2019-05-29 17:12:32 +10:00
Peter Barker
977fe09276
AP_Math: add a more complex polygon for Polygon_outside tests
2019-05-29 15:34:02 +10:00
Peter Barker
d3971c18fa
AP_Math: more tests for closed-vs-open polygons
2019-05-29 15:34:02 +10:00
Peter Barker
d74e6db12e
AP_Math: add more tests for Polygon_outside
2019-05-29 15:34:02 +10:00
Peter Barker
36fe9a18a0
AP_Math: make Polygon_outside cope with being passed unclosed polygons
2019-05-29 15:34:02 +10:00
Peter Barker
64aafb2af2
AP_Math: add Polygon_outside tests for long template instantiation
2019-05-28 09:08:07 +10:00
Peter Barker
51a0401383
AP_Math: correct Polygon_outside floating point instatiation
...
This routine was entemplatificated from the integer version, which was
designed to be perfect across representable ranges of points. The
floating point version suffered from a rounding problem.
2019-05-28 09:08:07 +10:00
Peter Barker
b35b65eed1
AP_Math: add GTEST suite for Polygon_outside
2019-05-28 09:08:07 +10:00
Peter Barker
f09efe0908
AP_Math: correct URL for Polygon_outside algorithm
2019-05-24 13:17:43 +10:00
Francisco Ferreira
6e95a144ef
AP_Math: add macro for m/s to knots convertion
2019-05-21 09:41:15 +10:00
murata
c6bcb1d54c
AP_Math: Collect CRC16 into CRC file
...
AP_Math: Collect CRC16 into CRC file
2019-05-21 09:19:19 +10:00
Andrew Tridgell
85ce10adfd
AP_Math: fixed test build
2019-05-15 15:33:48 +10:00
murata
7f42be5d3e
AP_Math: Commonize the CRC4 method
2019-04-24 08:44:11 -07:00
Mark Whitehorn
b515431008
AP_Math: add expo and throttle_curve functions
2019-04-23 09:46:38 +10:00
Peter Barker
b22d3a0103
AP_Math: avoid casting floats to int32's for temporary variables
...
Note the use of 64-bit integer arithmetic further down, however
2019-04-23 09:36:17 +10:00
Pierre Kancir
ff4587a33a
AP_Math: move location define to Location class
2019-04-23 09:20:43 +10:00
Pierre Kancir
1854681e09
AP_Math: use past_interval_finish_line and line_path_proportion from Location
2019-04-23 09:20:43 +10:00
Pierre Kancir
4f31c3dcd5
AP_Math: move line_path_proportion to Location
2019-04-23 09:20:43 +10:00
Pierre Kancir
e06d7dbbf7
AP_Math: move location_passed_point to Location and rename
2019-04-23 09:20:43 +10:00