Andrew Tridgell
e6590382d8
AP_Common: improved accuracy of get_bearing()
...
make base function ftype, then convert to int32_t for get_bearing_to()
2022-03-12 08:00:49 +09:00
Randy Mackay
f6e6ca197f
Location: get_vector_from_origin gets units comment
2021-12-01 09:03:40 +09:00
Iampete1
407b70b82e
AP_Common: location: add get alt distance method
2021-09-28 09:31:13 +10:00
Randy Mackay
70c6694798
AP_Common: add Location::linear_interpolate_alt
2021-07-22 08:51:41 +09:00
Andrew Tridgell
416c0724d2
AP_Common: use double precision for more location functions when available
...
this makes the location functions more accurate at long distances when
EKF double enabled
2021-07-14 17:34:40 +10:00
Andrew Tridgell
3ded1e6c10
AP_Common: added ftype precision offset call
2021-07-14 17:34:40 +10:00
Peter Barker
b625596dfa
AP_Common: use singleton to access AP_Terrain data
2021-07-12 17:34:44 +10:00
Andrew Tridgell
6a3b12956a
AP_Common: make longitude_scale() a static
...
this changes the use of longitude_scale() to use the average latitude
instead of the lattitude at one end of the line when calculating
positions and distances. It means we obey the basic geometry rule
that:
pos1 + offs = pos2
pos2 - offs == pos1
2021-07-10 07:20:41 +10:00
Andrew Tridgell
b8e42be5d1
AP_Common: added double methods for SITL
2021-07-10 07:20:41 +10:00
Andrew Tridgell
a7f31929ea
AP_Common: use longitude scaling from definitions.h
2021-06-29 17:26:34 +09:00
Andrew Tridgell
77d83b9c77
AP_Common: fixed Location class for wrap at 180 degrees longitude
...
this allows us to fly missions across the date line
2021-06-25 15:33:55 +10:00
Andrew Tridgell
61faeb2d7f
AP_Common: added double methods for SITL
2021-06-24 21:34:30 +10:00
Andrew Tridgell
71f207403e
AP_Common: make angles in degrees end in _deg
...
to make it obvious it is not radians
2021-06-05 13:05:30 +10:00
Josh Henderson
dce01fbb43
AP_Common: make Location(Vector3f) require ALTFRAME
2021-03-30 08:56:35 +09:00
Rishabh
55923d8b7b
AP_Common: Add new method to extrapolate location from bearing and pitch
2020-08-24 08:53:20 +09:00
Michael du Breuil
a99f67fd5b
AP_Common: Add a radian method for getting location bearings
2019-10-25 08:48:22 +08:00
Michael du Breuil
819d1b5246
AP_Common: Include altitude in the init check for a location
2019-09-17 09:30:56 +10:00
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.
2019-06-18 09:07:56 +09:00
Peter Barker
71d16557fa
AP_Common: Location: add WARN_IF_UNUSED to boolean methods
2019-05-09 13:03:49 +10:00
Pierre Kancir
ff4587a33a
AP_Math: move location define to Location class
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
Peter Barker
2352dd3f12
AP_Common: clean includes up in Location.h
2019-04-16 10:00:29 +10:00
Pierre Kancir
121e5d0abf
AP_Math: move location_3d_diff_NED to Location and rename
2019-04-09 20:59:48 +10:00
Pierre Kancir
29b2d7996b
AP_Common: move check_latlng to Location
2019-04-08 12:56:01 -07:00
Pierre Kancir
b10e75f4e1
AP_Math: move locations_are_same to Location and rename to same_latlon_as
2019-04-08 08:05:05 -07:00
Pierre Kancir
00fa07ef33
AP_Math: move location_diff to Location and rename
2019-04-08 08:00:52 -07:00
Pierre Kancir
a30404fb11
AP_Common: move location_update to Location and rename to offset_bearing
2019-04-06 09:10:28 +11:00
Pierre Kancir
6faf1d2849
AP_Common: move get_bearing_cd to Location and rename to get_bearing_to
2019-04-06 09:10:28 +11:00
Peter Barker
fd294101ec
AP_Common: Location: move sanitize to be a method on location
2019-04-02 10:19:38 +11:00
Peter Barker
22c0175d7f
AP_Location: use enum class for AltFrame enumeration
2019-03-19 10:31:18 +11:00
Peter Barker
a1c751919c
AP_Common: move longitude_scale into Location class
2019-03-12 10:11:12 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
8b54b6a5cf
AP_Common: Move LOCATION_ALT_MAX_M declaration from AP_Common.h to Location.h
...
This reduces the scope of this constant, and moves it to the file that actually depends on it
2019-02-13 11:53:18 +09:00
Peter Barker
57804e3118
AP_Common: unify Location_Class and Location
2019-01-16 11:45:29 +11:00
Peter Barker
a3a012b77e
AP_Common: remove packed nature of Location, move flags out of union
...
This saves ~2.5kB on fmuv3
2019-01-16 11:45:29 +11:00
Peter Barker
dc202c1ff9
AP_Common: Location: use AP_AHRS singleton
2018-06-01 16:18:33 +01:00
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
2017-12-15 01:24:13 +00:00
Tom Pittenger
3edd95b99b
AP_Common: add Location::is_zero and ::zero member functions
2016-07-20 22:32:47 -07:00
Randy Mackay
85963cecb4
Location: add additional comments
2016-04-30 10:33:01 +09:00
Randy Mackay
5161d63f8b
Location: operator= uses const reference
2016-04-30 10:33:01 +09:00
Randy Mackay
d6309a3a1a
Location: remove unused methods
2016-04-30 10:33:01 +09:00
Randy Mackay
1bfb565e18
Location: rename set_alt to set_alt_cm
2016-04-30 10:33:01 +09:00
Randy Mackay
cd999a2091
Location: initial class implementation
2016-04-30 10:33:01 +09:00