Josh Henderson
28d9be1cc0
AP_Math: get_horizontal_cm() simplify
3 years ago
Josh Henderson
2a15cf86ad
AP_Math: Location get_bearing & get_horizontal_distance use Vector2f
3 years ago
Pierre Kancir
4f31c3dcd5
AP_Math: move line_path_proportion to Location
6 years ago
Pierre Kancir
e06d7dbbf7
AP_Math: move location_passed_point to Location and rename
6 years ago
Peter Barker
11dcdc58e0
AP_Math: clean up includes a little
6 years ago
Pierre Kancir
121e5d0abf
AP_Math: move location_3d_diff_NED to Location and rename
6 years ago
Pierre Kancir
e787922ab0
AP_Math: move check_latlng to Location
6 years ago
Pierre Kancir
b10e75f4e1
AP_Math: move locations_are_same to Location and rename to same_latlon_as
6 years ago
Pierre Kancir
058cade92c
AP_Math: use get_distance_NE instead of location_diff
6 years ago
Pierre Kancir
00fa07ef33
AP_Math: move location_diff to Location and rename
6 years ago
Pierre Kancir
b31e5bf055
AP_Math: move location_update to Location and rename to offset_bearing
6 years ago
Pierre Kancir
88b29ff18c
AP_Math: move get_bearing_cd to Location and rename to get_bearing_to
6 years ago
Pierre Kancir
f6941beeb9
AP_Math: fix circulary inclusion error
6 years ago
Peter Barker
e6a8e337c7
AP_Math: move sanitize to be a method on location
6 years ago
Peter Barker
431bd77d7e
AP_Math: move print_latlon into sole caller
6 years ago
Peter Barker
499cc45ac0
AP_Math: move longitude_scale into Location class
6 years ago
Dr.-Ing. Amilcar do Carmo Lucas
65ccef04b9
AP_Math: replace location_offset() and get_distance() C function calls with Location object member (C++) function calls
...
This allows removing duplicated code in the AP_Math/location.cpp file
6 years ago
Peter Barker
31fa9e582e
AP_Math: adjust for Location_Class and Location unification
6 years ago
Peter Barker
ce37c9f69b
AP_Math: adjust for location flags being moved out of union
6 years ago
Michael du Breuil
9cd1be1d6f
AP_Math: Speed up location calculations slightly
7 years ago
Andrew Tridgell
61c8dfac31
AP_Math: split out double precision location functions
...
this allows ALLOW_DOUBLE_MATH_FUNCTIONS to be used
7 years ago
Andrew Tridgell
3b8ec3a2a0
AP_Math: allow double precision maths where needed
7 years ago
Dr.-Ing. Amilcar Do Carmo Lucas
e13281ab2d
AP_Math: add overloaded functions get_horizontal_distance_cm() and get_bearing_cd() (NFC)
7 years ago
Dr.-Ing. Amilcar Do Carmo Lucas
ec1790dad9
AP_Math: Use DEGX100 define instead of hardcoded value (NFC)
7 years ago
Tom Pittenger
1abeb03d2b
AP_Math: remove HAL_CPU_CLASS_16
8 years ago
Michael du Breuil
97c57764c4
AP_Math: Add a 3D location difference, returning NED
8 years ago
Lucas De Marchi
87038d8ef1
AP_Math: add casts to consider literals as doubles
...
Since we pass -fsingle-precision-constant to the compiler, add casts to
make literals real doubles.
8 years ago
murata
f9add59b58
Global: Aggregate the same definitions.
...
Global: Aggregate the same definitions.
8 years ago
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.
9 years ago
Tom Pittenger
00aaa78757
AP_Math: add separate check_lat() and check_lng()
9 years ago
Tom Pittenger
7b4c503052
AP_Math: use new check_latlng helper
9 years ago
Tom Pittenger
ce9ecf9f3d
AP_Math: added check_latlng helper
9 years ago
Ricardo de Almeida Gonzaga
481e3a2af6
AP_Math: Fix typos
9 years ago
dgrat
41661f815f
AP_Math: Replace the pythagorous* functions with a variadic template
...
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
9 years ago
dgrat
76362caee0
AP_Math: Replace wrap_* functions with template versions
9 years ago
Andrew Tridgell
e8142b0b5b
AP_Math: added wrap_360()
9 years ago
Michael du Breuil
bb7cf6c0b6
AP_Math: Update location_sanitize to sanitize for lat/lng
9 years ago
Tom Pittenger
278fb2e60d
AP_Math: add location sanity checker/fixer util
9 years ago
dgrat
672acdc8ef
AP_Math: Created location.h header for location functions
...
Helps to order AP_Math functions by purpose.
9 years ago
dgrat
5148e41c1a
AP_Math: Cleaned macro definitions
...
Moved Definitions into a separate header. Replaced PI with M_PI and
removed the M_PI_*_F macros.
9 years ago
Jonathan Challinger
fff275fd99
AP_Math: add wrap_2PI
9 years ago
Lucas De Marchi
fb28f426da
AP_Math: remove check for AVR CPUs
...
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
9 years ago
Lucas De Marchi
c7871d1bca
AP_Math: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1
9 years ago
Lucas De Marchi
20c6ffc5e3
Replace use of UARTDriver::printf_P() with UARTDriver::printf()
...
This also starts to show warnings on places that were already using
wrong printf format strings.
10 years ago
Lucas De Marchi
2c38e31c93
Remove use of PSTR
...
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.
This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.
AVR-specific places were not changed.
10 years ago
Randy Mackay
6145794da2
AP_Math: remove duplicate RADIUS_OF_EARTH definition
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
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
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