Commit Graph

36 Commits

Author SHA1 Message Date
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
Randy Mackay 52d5109a6c AC_Circle: initialise members to reduce compiler warnings 2014-07-16 14:38:34 +09:00
Randy Mackay 915dad2da4 AC_Circle: use fast_atan2 to calc bearing from center
This does not save much time because it's only called at initialisation
2014-06-06 18:51:09 +09:00
Randy Mackay 1cb297580f Copter: reduce Circle init twitch by using stopping point 2014-05-08 16:15:57 +09:00
Randy Mackay 966340a02a Circle: integrate update_xy_controller name change 2014-04-21 13:31:57 +09:00
Randy Mackay 94d38ee294 AC_Circle: add get_closest_point_on_circle
init_start_angle method added to use current heading or position to
decide on initial start angle
2014-04-16 16:28:04 +09:00
Randy Mackay 6af705d455 AC_Circle: bug fix for pos target when radius is zero 2014-02-16 13:46:38 +11:00
Randy Mackay 598a1b1f43 AC_Circle: use trig values from ahrs 2014-02-15 05:27:48 +11:00
Randy Mackay 17177adccf AC_Circle: remove debug comment 2014-02-15 05:27:46 +11:00
Randy Mackay 864f64b61a AC_Circle: circle control library 2014-02-15 05:27:40 +11:00