Peter Barker
6c0b4206c5
AP_Common: remove is-zero checks for Location::offset
...
Only one call in 160 actually passes these in as zeroes, so doing the
checks vastly outweighs the benefits of not doing the maths
We do call this a lot when doing terrain checks.
5 years ago
Michael du Breuil
6e0cceff0d
AP_Common: Remove extra comparison from longitude_scale()
6 years ago
Peter Barker
4e5842a150
AP_Common: add initialised() method to Location
...
Sometimes code paths are crossed when they shouldn't be. This method
can help in the short term if a codepath is calling methods on a
Location when it is not initialised, but generally a vehicle should be
calling position_ok() and other methods rather than this one.
6 years ago
Peter Barker
ab7ee4fefb
AP_Common: Location.cpp: add sanity checks
6 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
2352dd3f12
AP_Common: clean includes up in Location.h
6 years ago
Pierre Kancir
121e5d0abf
AP_Math: move location_3d_diff_NED to Location and rename
6 years ago
Pierre Kancir
29b2d7996b
AP_Common: 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
00fa07ef33
AP_Math: move location_diff to Location and rename
6 years ago
Pierre Kancir
a30404fb11
AP_Common: move location_update to Location and rename to offset_bearing
6 years ago
Pierre Kancir
6faf1d2849
AP_Common: move get_bearing_cd to Location and rename to get_bearing_to
6 years ago
Peter Barker
fd294101ec
AP_Common: Location: move sanitize to be a method on location
6 years ago
Peter Barker
22c0175d7f
AP_Location: use enum class for AltFrame enumeration
6 years ago
Peter Barker
a1c751919c
AP_Common: move longitude_scale into Location class
6 years ago
Peter Barker
7f63720257
AP_Common: Location.cpp: force handling of all alt frames
...
By removing the default case we will generate a compiler error a new alt
frame is not handled
6 years ago
Peter Barker
57804e3118
AP_Common: unify Location_Class and Location
6 years ago
Peter Barker
a3a012b77e
AP_Common: remove packed nature of Location, move flags out of union
...
This saves ~2.5kB on fmuv3
6 years ago
Peter Barker
dc202c1ff9
AP_Common: Location: use AP_AHRS singleton
7 years ago
Peter Barker
9a345160c1
AP_Common: fail attempts to use frame-above-home if home is not set
7 years ago
Pierre Kancir
79cd137625
AP_Common: remove AP_AHRS_NavEKF include from location class
7 years ago
Peter Barker
302e5c6871
AP_Common: have get_vector_xy_from_origin_NE take a Vector2f rather than 3f
...
Also, rename it from get_vector_xy_from_origin_NED
7 years ago
murata
f9add59b58
Global: Aggregate the same definitions.
...
Global: Aggregate the same definitions.
8 years ago
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
8 years ago
Tom Pittenger
b78255cc25
AP_Common: avoid using AP_Math is_zero() because it is classless
...
- because it is classless it can not be called like AP_Math::is_zero() and will then conflict with local definition of is_zero()
9 years ago
Tom Pittenger
3edd95b99b
AP_Common: add Location::is_zero and ::zero member functions
9 years ago
Tom Pittenger
f085666032
AP_Common: fix compile when using AP_TERRAIN_AVAILABLE 0
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
Randy Mackay
5161d63f8b
Location: operator= uses const reference
9 years ago
Randy Mackay
d6309a3a1a
Location: remove unused methods
9 years ago
Randy Mackay
1bfb565e18
Location: rename set_alt to set_alt_cm
9 years ago
Randy Mackay
cd999a2091
Location: initial class implementation
9 years ago