Commit Graph

138 Commits

Author SHA1 Message Date
Andrew Tridgell 76e9adb8d4 ACM: make it possible to run CLI on radio port in ArduCopter 2012-11-21 21:41:34 +11:00
rmackay9 dab975301b ArduCopter: remove some variables no longer required with introduction of AP_state 2012-11-12 12:41:25 +09:00
Jason Short 1049381dbe ACM: Added fast descent with Bill P's equation for managed accerlation 2012-11-11 18:23:45 -08:00
Jason Short b10975baaf ACM : climb rate option using Bill P's equation 2012-11-09 22:15:16 -08:00
Jason Short 3e905ec750 Ap state updates 2012-11-09 22:15:15 -08:00
rmackay9 fabc149f45 ArduCopter: remove unused functions wrap_360f, wrap_180f and wrap_PI 2012-11-08 15:20:08 +09:00
rmackay9 af40201b14 ArduCopter: incorporate new version of inertial navigation
Moved several navigation functions from ArduCopter.pde to navigation.pde
2012-11-07 19:21:31 +09:00
Jason Short 158c4f8d14 ACM : Formatting 2012-10-28 12:12:38 -07:00
Jason Short 4eeaf4c984 ACM: Added notes, credit to decel code. added speed_min to calc. 2012-10-27 14:13:24 -07:00
rmackay9 e780bfd4c1 ArduCopter: remove some unhelpful constraints on nav_lat and nav_lon.
Increase other constraints from 3200 to 32000.  These constraints are there to ensure int32_t do not cause an overflow when added to an int16_t.
2012-10-24 22:04:35 +09:00
Jason Short fb9fe2c9a5 ACM : fix compiler warning on non returning function 2012-10-21 14:37:42 -07:00
Jason Short 97d3134ff0 ACM : Cast to int32_T
Don't think it really needs it, but I feel better with the cast.
2012-10-21 14:36:05 -07:00
Jason Short 96f0a32cd3 ACM Acceleration management
removed unused waypoint_radius var
removed slow_wp
updated speed management system to maintain a constant acceleration or deceleration of 1m/s
changed version to 2.8.1a
2012-10-21 14:32:39 -07:00
rmackay9 0299e2b51e ArduCopter: removed deprecated mag offset routine.
Also removed commented-out block of code from navigation.pde.
2012-10-17 19:47:21 +09:00
rmackay9 5e6951d3f4 ArduCopter: position lead filters modified to use lag which varies by gps 2012-09-20 15:49:09 +09:00
uncrustify a3f6cdc0bd uncrustify ArduCopter/navigation.pde 2012-08-21 19:19:50 -07:00
Jason Short 1e546b54be ACM : Nav rate limit lowered to prevent bad oscillations due to GPS latency. 2012-08-18 09:04:22 -07:00
rmackay9 1a2dd5b74b ArduCopter: renamed "_new_alt" parameter to just "new_alt" in force_new_altitude and set_new_altitude functions 2012-08-18 21:46:48 +09:00
Jason Short 1a1987b810 ACM : removed old note 2012-08-17 17:03:40 -07:00
Jason Short 7ac4d06d3f ACM: made target bearing the lead filtered location
Had some major nav trouble from crosstrack if I used the laggy position.
2012-08-16 15:38:25 -07:00
rmackay9 48b7d26c5d ArduCopter: changed all "int" to "int16_t" and a few "long"s to "int32_t".
Also moved "simple_counter" variable from global scope to the "update_simple_mode" function which is the only place that it's actually used.
2012-08-16 20:04:46 +09:00
rmackay9 5f2c662fc9 ArduCopter: replaced abs with labs as required in a few places.
Also fixed a small bug in the get_stabilize_pitch function in which it was using the roll (instead of pitch) to decide whether it should let the i term build-up or not.
2012-08-16 17:51:09 +09:00
Jason Short 2cc27b9804 ACM: Switched to filtered loc 2012-08-14 14:11:52 -07:00
Jason Short 0688eee9bc ACM : Added larger WP radius for fast waypoints so we don't loose speed angling in on the WP at the last second. 2012-08-10 10:02:32 -07:00
Jason Short 1980e0464c ACM: navigation - Alt cleanup, fast corner support 2012-08-09 16:59:44 -07:00
Andrew Tridgell 295a9ce39c ACM: change to use get_bearing_cd() instead of get_bearing() 2012-08-08 12:12:30 +10:00
Jason Short 6177a1f5de Added minimum speed for RTL 2012-07-20 13:27:35 -07:00
Jason Short 676f02da7c Arducopter: Adjusted speed of climb to not stall out before hitting peak 2012-07-19 17:53:49 -07:00
Jason Short 05a2d3ae35 Arducopter: Fix compile issue 2012-07-19 10:09:16 -07:00
Jason Short ec1d400adf Arducopter: Slower WP deceleration for RTL and WP navigation
Slower descent and slightly faster ascent
2012-07-19 09:50:18 -07:00
Jason Short f29aa0dc25 Arducopter
upped nav max to 32deg from 30
renamed calc_desired_speed to get_desired_speed
Added get_desired_climb_rate function to do smooth transitions in altitude
modified get_altitude_error to override the older altitude manager.
2012-07-18 22:57:11 -07:00
Jason Short c5d3620d2b Arducopter: INS
updated Nav control to use INS
2012-07-18 22:57:10 -07:00
Jason Short 9de2c00d93 Arducopter: WP_radius
Switching to stored WP_radius in meters, just like Arduplane
2012-07-10 21:53:38 -07:00
Andrew Tridgell a643d2aa6b ACM: use get_distance_cm() not get_distance()
this fixes a bug introduced in 28f2eb6b9
2012-07-11 07:50:07 +10:00
Jason Short 9e796899e4 Airspeed patch:
pre-calculated airspeed resistance pitches copter automatically to gain a certain speed allowing the speed controller to work off of a better set point - similar to Alt hold.
added param tilt_comp with a default of 54 which equals 19.5° of pitch to go 6m/s
upped Z and Y target speeds to int32_t for speed squared calculation
2012-07-09 13:13:32 -07:00
Andrew Tridgell 35b73b9d01 ACM: removed some Location functions which are now in AP_Math 2012-07-04 13:44:36 +10:00
Jason Short fcc38889b4 Navigation
increased speed governor to get faster WP travel
added param for WP tilt - basically a precalculated I term for wind resistance.
2012-07-03 17:34:50 -07:00
Jason Short c20c04ed24 removed GPS ground speed calc - was causing some funny business during the transition. 2012-07-03 17:16:14 -07:00
Jason Short d893cde785 navigation.pde : Added a drag/velocity prediction filter for improved I term wind correction. 2012-06-29 21:20:28 -07:00
Jason Short 50b3ef66a7 Navigation.pde : removed old cross tracking from Arduplane. Added new 2D cross tracking. Added use of GPS velocity when above 1.5m/s 2012-06-25 23:06:28 -07:00
Jason Short 6dc1e02f76 Inertial Control
I added inertial navigation based on the simulator data. This is an option only available if you compile with Arduino and set
#define INERTIAL_NAV ENABLED
in the APM_Config.h file.

This has been tested for one real flight and did not crash my quad, but consider it very alpha. The quad may be unpredictable at first until the error correction fixes poorly calibrated accels. Be Careful.

Most of the real work is in the inertia file, but the error correction, new variable defines and calibration calls are sprinkled throughout.

The Log should record RAW messages with special debugging values.
2012-06-13 22:34:45 -07:00
Jason Short 95076bf08e navigation.pde:
removed unneeded WP_Distance check
remove unneeded return for Navigate
removed unneeded rate_D calcs
removed unused functions
2012-05-17 11:05:05 -07:00
Jason Short 7278e8d1e5 removed retro loiter code since Angel has a branch now.
shrank speed filter to avoid latency
removed unused forward estimator code

placed code for switchover to gps.groundspeed at 1.5m/s

added clamp for D term when below .5m/s to eliminate noise

added hybrid I-term based on speed error and position

changes Loiter D term to use position rather than acceleration to avoid noise
2012-05-15 22:14:23 -07:00
Adam M Rivera 2ee8237b5f ArduCopter/Navigation: Updated code to reference the new g.retro_loiter param instead of the compile define. 2012-04-23 00:19:18 -05:00
Adam M Rivera 4430f75344 navigation.pde: Put the new calc_GPS_velocity method in a compiler if that checks the new RETRO_LOITER_MODE config value (saves space and ensures its not being used unless retro loiter mode is enabled) 2012-04-19 10:21:04 -05:00
Adam M Rivera ad13854ab7 Loiter: Made the "retro loiter" routines configurable. Add RETRO_LOITER_MODE ENABLED to APM_Config.h to enable the older loiter shtuff. 2012-04-19 10:16:29 -05:00
Adam M Rivera c7c6dd70b9 navigation.pde: Added calc_GPS_velocity. Added constraint to x/y error and x/y rate error. 2012-04-18 23:06:15 -05:00
rmackay9 8f0bc57967 ArduCopter - navigation.pde - added logging of Loiter PID controllers 2012-04-11 23:52:25 +09:00
rmackay9 7dc18b53ad ArduCopter - navigation - corrected comment in check_missed_wp function to clarify that you've passed the waypoint when the direction to the way point is more than 100 degrees off (not 10 degrees off) from your original bearing towards the waypoint 2012-03-20 17:11:22 +09:00
rmackay9 ce6b1ccc75 ArduCopter - Navigation.pde - corrected comment re wp_distance and get_distance to clarify that they are in cm (not meters!) 2012-03-20 16:13:38 +09:00