Commit Graph

59 Commits

Author SHA1 Message Date
Iampete1 ac1b8ab7be AC_WPNav: params always use set method 2022-08-03 13:43:48 +01:00
Peter Barker d73cd7d0e3 AC_WPNav: stop libraries including AP_Logger.h in .h files
AP_Logger.h is a nexus of includes; while this is being improved over
time, there's no reason for the library headers to include AP_Logger.h
as the logger itself is access by singleton and the structures are in
LogStructure.h

This necessitated moving The PID_Info structure out of AP_Logger's
namespace.  This cleans up a pretty nasty bit - that structure is
definitely not simply used for logging, but also used to pass pid
information around to controllers!

There are a lot of patches in here because AP_Logger.h, acting as a
nexus, was providing transitive header file inclusion in many (some
unlikely!) places.
2022-04-08 19:18:38 +10:00
Shiv Tyagi e01ca79251 AC_WPNav: rename circle_nav.set_radius to circle_nav.set_radius_cm 2022-03-01 09:31:10 +09:00
Josh Henderson e10edabd5d AC_WPNav: INAV rename for neu & cm/cms 2021-11-30 10:08:07 +11:00
Josh Henderson 9e11f09a7f AC_WPNav: inav use _xy() 2021-11-30 10:08:07 +11:00
Josh Henderson d5769f70ac AC_WPNav: get_bearing & get_horizontal_distance use Vector2f 2021-11-30 10:08:07 +11:00
Leonard Hall 94002101fd AC_WPNav: Separate landing and terrain following. 2021-09-06 16:00:19 +09:00
Andrew Tridgell 1d00cab9e6 AC_WPNav: convert circle, loiter and WPNav to double position 2021-06-24 21:34:30 +10:00
Andrew Tridgell bf91168cd6 AC_WPNav: cleanup position control APIs
use Vector2 for xy, float for z
2021-06-24 20:28:45 +10:00
Leonard Hall 166f059fc2 AC_WPNav: Fix before squash 2021-05-24 20:13:37 +10:00
Leonard Hall 538d8f82fb AC_WPNav: PosControl fixes 2021-05-24 20:13:37 +10:00
Iampete1 e995e8873c AC_Circle: add function to check for radius param change 2021-05-04 10:41:39 +10:00
giacomo892 a5708acaef AC_Circle: Restore radius every time 2021-04-28 11:36:58 +01:00
Iampete1 4e064ef812 AC_Circle: add Circle options 2020-09-30 17:58:12 +10:00
Iampete1 b1c3ea467b AC_Circle: constantly update velocity from params 2020-06-24 08:57:08 +09:00
Randy Mackay 46ad31ad01 AC_Circle: add is_active
allows vehicle code to know if circle's yaw is valid
2020-04-27 09:39:46 +09:00
Randy Mackay 3195a7cccd AC_Circle: z-axis target only updated during terrain following
This allows the circle flight mode to externally control the altitude target
2020-04-21 11:39:38 +09:00
Randy Mackay 03441f2250 AC_Circle: remove _rangefinder_use parameter
We will reuse the WPNAV_RFND_USE parameter indirectly
2020-04-16 17:30:29 +09:00
Randy Mackay 658bb646ca AC_Circle: support terrain altitudes 2020-04-16 17:30:29 +09:00
Matt Lawrence 189fee556f AC_WPNav: Circle mode pilot control of rate & radius 2020-01-07 09:30:33 +09:00
Randy Mackay b668c6f855 AC_Circle: improve target heading 2019-05-07 13:54:31 +09:00
Peter Barker 3faf7824c0 AC_WPNav: allow position control to get ekf navigation scalars directly 2018-10-09 10:47:38 +11:00
Michael du Breuil 65641c3cb7 AC_Circle: Cope with AC_PosControl renaming 2018-09-20 15:15:45 -07:00
liang.tang 8664ed006a AC_Circle: use stopping point to get closest point on circle 2018-07-26 12:12:07 +09:00
Randy Mackay e9c23b538e AC_Circle: run horizontal position control at main loop rate 2018-03-16 13:50:57 +09:00
Leonard Hall a356cfa529 AC_Circle: init resets desired velocity_xy 2018-03-16 13:50:57 +09:00
Leonard Hall d104e3a3c0 AC_Circle: remove xy mode and limit angle to maintain alt 2018-03-16 13:50:57 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 07c8d208bc AC_WPNav: Use DEGX100 define instead of hardcoded value (NFC) 2017-12-05 08:54:49 +09:00
Andrew Tridgell 17e1329068 AC_WPNav: converted to use AP_AHRS_View
for use in quadplane tailsitters
2017-02-18 17:26:43 +11:00
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.
2016-10-24 09:42:01 -02:00
Peter Barker c664eec93b AC_WPNav: remove unused variable _last_update 2016-10-24 08:57:56 -02:00
dgrat 6d3b491c02 AP_Math: Replace is_equal with a type safe template function
It makes sense to consider also other floating point types.
2016-05-10 11:41:26 -03:00
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.
2016-05-10 11:41:26 -03:00
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.
2016-02-27 02:51:33 -03:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Leonard Hall 5ab2a19173 AC_WPNav: loiter limits lean angle for alt loss 2015-09-07 15:10:11 +09:00
Gustavo Jose de Sousa ee2c388bb0 AC_WPNav: 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.
2015-08-11 16:28:41 +10:00
Tom Pittenger 93c6ed0ea2 AC_WPNav: compiler warnings: float to double 2015-07-27 10:30:15 +09:00
Randy Mackay 28c722c157 AC_Circle: rate change takes effect immediately 2015-07-23 16:21:20 +09:00
Randy Mackay 0264b1aa84 AC_Circle: set only xy position targets 2015-06-27 15:43:49 +09:00
Randy Mackay bb382a65e8 AC_Circle: init members and flags
Removed unused dir flag
Resolves Coverity warning
2015-06-08 14:46:37 +09:00
Andrew Tridgell c08b62f9e4 AC_WPNAV: revert AP_Math class change 2015-05-05 13:27:05 +10:00
Tom Pittenger 7fd285f483 AC_WPNav: Compiler warnings: nuke fast_atan2()
per Randy's suggestion, fast_atan2() is no longer necessary over atan2() because only copter uses it and copter is no longer supported on future builds of APM

ccd578664f (commitcomment-11025083)
2015-05-05 13:27:03 +10:00
Tom Pittenger 913d00f525 AP_WPNav: compiler warnings: apply is_zero(float) or is_equal(float) 2015-05-05 13:26:54 +10:00
Tom Pittenger b9865c5f3e AC_Circle: fix compile warnings re float constants 2015-04-24 12:23:38 +09:00
Jonathan Challinger 626521c366 AC_WPNav: update usage of update_xy_controller 2015-02-06 17:00:53 +09:00
Jonathan Challinger baa3e802ee AC_WPNav: clean up atan2 2015-02-03 14:48:04 +09:00
Jonathan Challinger 6eab698e85 AC_WPNav: remove various timing hacks 2014-12-31 14:03:20 +09:00
priseborough 11fb51ceba AC_WPNav: Add nav velocity gain scaler to interfaces
Allows gains to be adjusted to compensate for optical flow noise
2014-12-06 18:16:50 +11:00