Commit Graph

80 Commits

Author SHA1 Message Date
Andrew Tridgell 011915eb1c Plane: added error checking to rally load save
sanity check the rally points
2013-10-03 12:21:08 +10:00
Michael Day 497c95de8e Plane: Add support for rally points.
Added parameter RALLY_TOTAL.

Added handlers for new MAVLink messages RALLY_POINT and
RALLY_FETCH_POINT.

defines.h modified to make room in EEPROM to store rally points.

rally.pde added and is responsible for ensuring rally points get
stored in the correct spot in EEPROM.

Multiple Rally/RTL point support now done.  If rally points have
been defined, then when RTL mode is entered, the closest Rally
point is chosend and the plane loiters at that point.

Note only 10 rally points can be defined; this is to save space in
the APM's EEPROM.
2013-10-03 12:21:08 +10:00
Andrew Tridgell dd6a69f588 Plane: added WP_MAX_RADIUS parameter
useful when using AUTO_FBW_STEER for manual steering in competitions
2013-09-13 17:43:08 +10:00
Andrew Tridgell a00e4a1e83 Plane: send GCS message on relay change
makes it easier to debug
2013-08-30 15:05:16 +10:00
Andrew Tridgell 45cf82ba15 Plane: removed CONFIG_RELAY check
relay is always available
2013-08-30 14:40:47 +10:00
Andrew Tridgell a33573352e Plane: fixes for updated AP_Math and AHRS APIs
Pair-Programmed-With: Brandon Jones <brnjones@gmail.com>
2013-08-05 10:30:04 +10:00
Andrew Tridgell 3c97fad2ec Plane: changes for GPS field changes 2013-07-10 14:04:22 +10:00
Andrew Tridgell 3c177867a4 Plane: allow enable/disable of camera log messages in CLI 2013-07-10 12:23:36 +10:00
Andrew Tridgell 1d6748cf3f Plane: use a glide slope in RTL when descending
when above the target altitude in RTL come down slowly, when below
climb rapidly

This fixes issue #39
2013-07-05 14:56:58 +10:00
Andrew Tridgell a5bda3ffef Plane: changed to using a "aircraft parameters" structure
this structure can be passed to libraries to give them easy access to
critical user parameters
2013-07-04 16:56:57 +10:00
Paul Riseborough d62636d309 Plane: added new TECS altitude controller
Includes improvements to takeoff/launch detect logic to support hand
launching for X-8 flight
2013-07-04 16:56:57 +10:00
Andrew Tridgell 515d726ee0 Plane: use RC_Channel::rc_channel() instead of rc_ch[] 2013-06-03 16:23:48 +10:00
Andrew Tridgell eba7d6da9a Plane: removed the old crash_timer code
This code is less relevent with the new L1 navigation, and could cause
issues with the pilot not having control after a long dive.

Thanks to Soren for pointing out the issues

See issue #305
2013-05-28 11:19:28 +10:00
Andrew Tridgell 9f0f482dd7 Plane: fixed LOITER_TIME to start when loiter starts
thanks to Paul Riseborough for finding this bug!
2013-04-15 21:39:14 +10:00
Andrew Tridgell 75f4a43e2d Plane: fixed LOITER_TURNS command
and cleanup more loiter variables
2013-04-15 21:31:11 +10:00
Andrew Tridgell e918293e86 Plane: explain verify_*() commands 2013-04-15 14:41:15 +10:00
Andrew Tridgell 19b92b5bd8 Plane: removed "circle waypoint" completion test
this is redundent with the location_passed_point() test
2013-04-15 14:39:18 +10:00
Andrew Tridgell 994d8e354a Plane: allow for negative WP_LOITER_RAD for conter-clockwise loiter
this follows the same convention as missions
2013-04-15 10:52:32 +10:00
priseborough 70a186464b Plane: added LEVEL_ROLL_LIMIT parameter
this replaces both TKOFF_HEAD_HOLD and RUDDER_STEER, allowing users to
instead select a roll limit for takeoff and landing
2013-04-12 21:59:52 +10:00
Andrew Tridgell 11eb0cfce1 Plane: update for new AP_Navigation controller class
this switches ArduPlane over to use the L1 navigation controller, via
a generic nav_controller object pointer.

Note that the nav_controller controls all types of navigation now,
including level flight and heading hold. This provides a cleaner
abstraction than the old method of special case navigation handling

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-04-12 12:48:09 +10:00
tobias 217b8d7a59 cleanup: use const for struct Location pointers and references
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Andrew Tridgell a69c9ff674 Plane: added logging of DIGICAM events 2013-04-02 13:08:38 +11:00
Andrew Tridgell dfb14d760b Plane: added HIL_SERVOS option
this allows for real servo output in HIL
2013-03-30 14:38:43 +11:00
Andrew Tridgell fcde3ceb24 Plane: also avoid rudder on takeoff with TOFF_HEAD_HOLD==0 2013-03-27 16:36:39 +11:00
Randy Mackay c2055557f5 Plane: add support for GPS fix type 2D 2013-03-27 11:41:51 +09:00
Andrew Tridgell e8806b14ec Plane: enable MAV_CMD_DO_DIGICAM_CONTROL 2013-02-14 09:35:56 +11:00
Andrew Tridgell 9d3224ef34 Plane: fixed target speed reload on landing
thanks to Doug for this fix!
2013-02-11 11:40:36 +11:00
Jochen Tuchbreiter c5f19f5df8 Plane: Implement issue 80: counterclockwise loiter
- libraries/AP_Common/AP_Common.h: Use bit 2 of Location.options to store
  loiter direction
- ArduPlane/defines.h: New bitmask MASK_OPTIONS_LOITER_DIRECTION for struct
  Location bit 2
- ArduPlane/ArduPlane.pde: New variable loiter_direction
- ArduPlane/GCS_Mavlink.pde: For mavlink loiter-commands use sign of param3 to
  detemine direction. Set Location.option flag accordingly
- ArduPlane/commands.pde: Make sure loiter-directions get saved into EEPROM
  correctly
- ArduPlane/commands_logic.pde: Set loiter_direction on all loiter-actions
  as well as RTL/instant loiter
- ArduPlane/navigation.pde: Yield loiter_direction in update_loiter
2013-02-05 10:29:31 +11:00
Andrew Tridgell ebb7f27962 Plane: minor signed/type fixups 2013-01-27 13:16:26 +11:00
Randy Mackay d2767b911c AP_Math: switch get_distance_cm to return uint32_t
Includes changes required on ArduCopter and ArduPlane side as well
2013-01-26 17:04:12 +09:00
Andrew Tridgell 9a2e77b797 Plane: fully disable relay and mount code on APM1-1280
this saves some more flash space
2012-12-20 14:53:23 +11:00
Pat Hickey 92b0c302f2 ArduPlane: Ported to AP_HAL 2012-12-20 14:51:36 +11:00
Andrew Tridgell 84300c85d6 APM: make it possible to run the CLI on any serial port 2012-11-21 21:41:34 +11:00
Andrew Tridgell 2324997e16 APM: added ALT_OFFSET parameter
useful to adjust for barometric pressure changes during a long flight
2012-09-19 16:23:25 +10:00
Andrew Tridgell 7e8ef0ae95 APM: fixed handling of DO_REPEAT_SERVO and DO_REPEAT_RELAY 2012-09-17 14:45:47 +10:00
Andrew Tridgell 127117b640 APM: ensure DO_SET_SERVO channels are enabled 2012-09-16 15:08:14 +10:00
Andrew Tridgell 589c8fcc12 APM: report throttle and ground speed mission changes 2012-09-12 13:09:32 +10:00
Andrew Tridgell 7e672628ea APM: removed the GPS_enabled flag
this fixes using GPS_PROTOCOL to specify a specific GPS with a GPS
that takes a few updates before it works (eg. needing baud rate
changes).

This makes it easier to use an APM1-1280 with more features enabled
2012-09-11 13:37:34 +10:00
Andrew Tridgell f26b9ab286 APM: prevent crosstrack from takeoff point after takeoff completion 2012-09-08 11:37:14 +10:00
Andrew Tridgell 85e9fa8c3b APM: fixed another problem with DO_JUMP
off by one error!
2012-08-28 20:18:24 +10:00
Andrew Tridgell d13d117e61 APM: removed reset_I() and instead auto-reset integrator in PID library
this prevents us resetting key integrators on waypoint change, while
still preventing old integrators being used when a PID starts to be
used again
2012-08-28 20:18:23 +10:00
Andrew Tridgell c9cf483822 APM: added XTRK_USE_WIND parameter
when enabled this will use the wind estimation code to adjust the
navigation bearing, allowing the navigation code to cope with much
higher levels of wind while using a compass
2012-08-25 17:49:26 +10:00
Andrew Tridgell 4668f8b7db APM: ensure takeoff_complete is reset 2012-08-22 16:17:55 +10:00
Andrew Tridgell 95c941664f APM: fixed bug in do_jump() navigation
this avoids a problem where the jump can cause the next command to be
reset to 0
2012-08-22 15:29:46 +10:00
uncrustify 4793162a9d uncrustify ArduPlane/commands_logic.pde 2012-08-21 18:58:11 -07:00
Andrew Tridgell 6300fa7399 math: more abs() fixes
abs() is 16 bit
2012-08-16 15:17:42 +10:00
Andrew Tridgell ad73c229ab APM: added LAND_FLARE_ALT and LAND_FLARE_SEC
these allow you to configure the altitude and time before touchdown to
flare the plane and lock the heading. Useful on larger planes.
2012-08-15 18:11:16 +10:00
Andrew Tridgell df3c8a5bc0 APM: when land_complete is true, use land_pitch
this gives a flare on final landing
2012-08-15 12:39:35 +10:00
Andrew Tridgell 2d7fcbd14b APM: reload airspeed and throttle after landing
this allows for restarting a mission after landing with reasonable
airspeed values
2012-08-15 12:39:35 +10:00
Andrew Tridgell e26e8b3b67 APM: added RDRSTEER_ PID for steering on ground
this allows for rolling takeoff with steering, and use of rudder in
landing
2012-08-15 12:39:35 +10:00