Commit Graph

1312 Commits

Author SHA1 Message Date
Andrew Tridgell 103da0c889 Plane: when no GPS lock always send GPS messages 2013-12-11 17:29:26 +11:00
Michael Day b0a0316dd6 Plane: Now using AP_Arming library. 2013-12-11 17:29:23 +11:00
Andrew Tridgell 6ed21c12db Plane: added logging of 2nd compass 2013-12-10 15:32:11 +11:00
Andrew Tridgell 49f49648ec Plane: changes for compass healthy API 2013-12-09 17:47:38 +11:00
Andrew Tridgell 02af644010 Plane: report both sets of sensors in MAVLink 2013-12-09 17:34:07 +11:00
Andrew Tridgell b637ab35e4 Plane: lower the priority of mount update 2013-12-09 17:34:07 +11:00
Andrew Tridgell d642254f18 Plane: breakup one second loop into 3 pieces
this prevents it not running when gimbal is active
2013-12-09 17:34:07 +11:00
Andrew Tridgell 65c97a2f5f Plane: updates for compass API change 2013-12-09 17:34:06 +11:00
Randy Mackay b6462c23af Plane: disable external leds 2013-11-30 22:53:55 +09:00
Andrew Tridgell 1124e84ae0 Plane: fixed APM1 build 2013-11-30 06:56:16 +11:00
Andrew Tridgell 6b4a3ef98b Plane: added MAVLink sonar logging 2013-11-28 21:49:27 +11:00
Andrew Tridgell 5a0cb5dea4 Plane: added sonar logging to dataflash 2013-11-28 21:49:27 +11:00
Randy Mackay 45ab18f131 Plane: rename Log_Write_SERVO to Log_Write_RCOU 2013-11-27 20:18:16 +09:00
Andrew Tridgell 079d48f6cc Plane: use log system ID if available 2013-11-26 13:00:03 +11:00
Andrew Tridgell 8383abc1fe Plane: added SERIAL2_BAUD and rename SERIAL3_BAUD to SERIAL1_BAUD 2013-11-26 13:00:03 +11:00
Andrew Tridgell a05a32dbda Plane: added RCIN and SRVO logging 2013-11-26 09:04:43 +11:00
Andrew Tridgell 457183b6f5 Plane: cope with uartD being NULL 2013-11-23 21:44:45 +11:00
Andrew Tridgell 5f32f44366 Plane: fixed mavlink_queue[] size 2013-11-23 19:29:23 +11:00
Andrew Tridgell 2fa5e6310d Plane: added 3rd telemetry stream on platforms that have it
this generalises the gcs object usage
2013-11-23 19:29:22 +11:00
Andrew Tridgell 490a061c6f Plane: added HIL_ERR_LIMIT
this allows DCM to recover if HIL attitude drifts too far from true attitude
2013-11-23 18:50:57 +11:00
Andrew Tridgell 17c9cedac1 Plane: send out HIL servo updates as soon as we can
this improves the servo responsiveness of HIL a lot
2013-11-23 18:50:57 +11:00
Andrew Tridgell 1e36ebc31b Plane: reset HIL attitude if off by more than 5 degrees 2013-11-23 18:50:56 +11:00
Andrew Tridgell 8bfe59cea5 Plane: send SIMSTATE messages in HIL
this allows better tracking of the simulator state, to see if issues
are caused by DCM failure
2013-11-23 18:50:56 +11:00
Andrew Tridgell 58b767b8e4 Plane: rename geofence structure
makes using gdb easier as it doesn't mix up the structure and the
pointer
2013-11-23 18:50:55 +11:00
Randy Mackay c01a3debd6 Plane: log INS errors in PM message 2013-11-18 13:08:40 +09:00
Andrew Tridgell 56f574684d Plane: fixed throttle failsafe with reversed throttle 2013-11-17 15:32:53 +11:00
Andrew Tridgell 2af69b7131 Plane: make batter failsafe docs clearer 2013-11-09 18:14:02 +11:00
Andrew Tridgell 7e10811673 Plane: send firmware and git version in tlog 2013-11-09 10:09:20 +11:00
Andrew Tridgell eee1364f05 Plane: update comments on ALT_CTRL_ALG and NAV_CONTROLLER 2013-11-08 07:54:16 +11:00
Andrew Tridgell c1bc093cf5 Plane: removed unused variable 2013-11-07 13:54:25 +11:00
Andrew Tridgell 1aa29df52d Plane: report INS and airspeed health 2013-11-07 12:48:17 +11:00
Andrew Tridgell 53c3dff334 Plane: allow changing of loiter direction while loitering
useful for causing path capture failures in the sim
2013-11-07 11:54:28 +11:00
Andrew Tridgell 1328bbf040 Plane: log the AHRS error terms in dataflash
also log raw IMU at 10Hz with default config
2013-11-07 10:19:13 +11:00
Andrew Tridgell 691eaabe94 Plane: prepare for 2.76 release 2013-11-05 15:55:08 +11:00
Andrew Tridgell 78604bd84e Plane: only send GPS_RAW_INT if new data
this reduces link load when asking for high rate telemetry
2013-11-05 14:40:51 +11:00
Andrew Tridgell 5e4b243c7b Plane: make DataFlash objects static 2013-11-04 21:37:50 +11:00
Andrew Tridgell ae8ef344bf Plane: added time to most plane log messages 2013-11-04 21:37:30 +11:00
Andrew Tridgell 231b5ab793 Plane: prevent too large combined pitch/roll angles
this reduces the roll limit by cos(pitch) and pitch minimum by
cos(roll). This prevents unreasonable attitudes in all stabilised
modes

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-11-04 21:21:42 +11:00
Andrew Tridgell ff5f2ceae5 Plane: update for API changes 2013-11-04 21:21:42 +11:00
Andrew Tridgell b1c9b57c73 Plane: mark 2.76beta1 2013-11-02 21:48:17 +11:00
Andrew Tridgell 26a3860af2 Plane: fixed PM message 2013-11-02 21:41:30 +11:00
Andrew Tridgell 5a92ce4af6 Plane: added altitude and ground speed to NTUN logs 2013-11-02 21:41:11 +11:00
Andrew Tridgell fe3943e686 Plane: faster startup
make it less likely to send wrong INS_PRODUCT_ID, plus don't waste as
much time
2013-11-02 21:41:11 +11:00
Randy Mackay 328de5fc7b Plane: add @Increment to battery failsafe descriptions 2013-10-29 11:23:54 +09:00
Andrew Tridgell bcb0deb888 Plane: ready for 2.75 release 2013-10-28 18:22:25 +11:00
Andrew Tridgell 3ff407cb75 Plane: improved perf monitoring with SCHED_DEBUG 2013-10-28 17:10:00 +11:00
Andrew Tridgell cfa38df528 Plane: allow parameters to download at full speed 2013-10-28 10:34:32 +11:00
Andrew Tridgell a407609dbe Plane: tag 2.75beta5 2013-10-26 07:57:35 +11:00
Andrew Tridgell b897285737 Plane: set system time on GPS lock 2013-10-24 14:22:48 +11:00
Andrew Tridgell 3289041428 Plane: added MAVLink SYSTEM_TIME message 2013-10-24 14:22:47 +11:00
Andrew Tridgell 6f3458eb25 Plane: fixed setting of waypoint when not in AUTO
this fixes a bug where the next waypoint is set incorrectly if set via
MAVLink when not in AUTO
2013-10-23 09:40:41 +11:00
Andrew Tridgell 210ca08abd Plane: changed to 2.75beta4 2013-10-18 11:53:51 +11:00
Andrew Tridgell 4239498b62 Plane: moved fast_loop() into main scheduler table 2013-10-15 09:52:23 +11:00
Andrew Tridgell 294b669948 Plane: fixed rally altitude to be in meters
this matches the docs
2013-10-14 16:38:40 +11:00
Andrew Tridgell 5adf4e1706 Plane: improve THROTTLE_NUDGE docs 2013-10-14 15:40:26 +11:00
Andrew Tridgell 5e1f5ffb7f Plane: removed some old defines 2013-10-14 14:40:30 +11:00
Andrew Tridgell 7f6eecd9d5 Plane: cleanup cruft in Makefile 2013-10-13 21:41:01 +11:00
Andrew Tridgell a3168bcbaa Plane: fixes for AP_Mount API 2013-10-13 11:03:31 +09:00
Andrew Tridgell 035ac3800a Plane: use G_Dt for acro angle integration
also cleanup some other uses of performance timing
2013-10-12 13:30:27 +11:00
Andrew Tridgell 05115684c1 Plane: pass FlightStage to TECS
this will allow for better throttle and pitch control on landing
2013-10-12 13:14:30 +11:00
Andrew Tridgell 0ec322ee47 Plane: support MAV_CMD_DO_SET_CAM_TRIGG_DIST 2013-10-11 21:37:27 +11:00
Andrew Tridgell 72505cf4e5 Plane: release 2.75beta3 2013-10-11 16:29:08 +11:00
Andrew Tridgell 8e5d1430da Plane: use ins.wait_for_sample() 2013-10-08 17:31:15 +11:00
Andrew Tridgell 2bb497703c Plane: avoid delay_microseconds() until fixed on PX4 2013-10-08 14:55:38 +11:00
Andrew Tridgell 48ed480d59 Plane: improved latency of main loop
use a 500usec delay
2013-10-08 11:50:54 +11:00
Andrew Tridgell e6af7dad3d Plane: switched to L3G4200D driver for Linux 2013-10-08 11:50:54 +11:00
Andrew Tridgell a4604ab317 Plane: honor zero RALLY_LIMIT_KM 2013-10-06 14:54:50 +11:00
Andrew Tridgell 5bf1463e7a Plane: added RALLY_LIMIT_KM
this will prevent an embarressing use of a rally point from the wrong
airfield
2013-10-06 14:51:13 +11:00
Andrew Tridgell 365e82aecb Plane: use a rally point when out of mission items 2013-10-05 23:07:32 +10:00
Andrew Tridgell 61dd04ccb5 Plane: auto-update home and baro calibration when disarmed
this takes advantage of the PX4 arming state to ensure position and
baro calibration is updated
2013-10-05 18:45:45 +10:00
Andrew Tridgell 536fbb4a30 Plane: if pilot gives aileron input then disable ground steering
otherwise it would be very tricky to do a low pass!
2013-10-05 07:46:27 +10:00
Andrew Tridgell d32e58db84 Plane: split out the channel stick mixing
makes code a bit clearer
2013-10-05 07:46:27 +10:00
Andrew Tridgell 3be939eb03 Plane: give manual steering when still
useful for servo testing
2013-10-05 07:46:27 +10:00
Andrew Tridgell d275f50539 Plane: added GROUND_STEER_ALT and GROUND_STEER_DPS
this uses the new AP_SteerController steering controller developed for
the rover code to allow for ground steering of planes
2013-10-05 07:46:27 +10:00
Andrew Tridgell 081510d37a Plane: added ACRO_LOCKING parameter
this enables/disables the attitude locking in acro mode, allowing acro
to be a pure rate controller
2013-10-05 07:45:12 +10:00
Randy Mackay 6e2b1093fc Plane: mavlink ext status to use SYS_STATUS_SENSOR enum 2013-10-04 13:21:01 +09:00
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
Randy Mackay 21360aeebf Plane: sent current as -1 to GCS when can't be monitored 2013-10-03 11:16:33 +09:00
Randy Mackay 9722276827 Plane: batt curr and remaining should be int16 2013-10-03 11:16:26 +09:00
Randy Mackay cb91440c63 Plane: remove test_battery from CLI 2013-10-03 11:16:22 +09:00
Randy Mackay 9388ea3848 Plane: integrate BattMonitor exhausted method
BatteryMonitor object made static
Removed unused macros for battery voltage and current monitoring
2013-10-03 11:16:21 +09:00
Andrew Tridgell 74c8c8aafa Plane: auto-upgrade battery variables in EEPROM 2013-10-03 11:16:12 +09:00
Randy Mackay c64d444b5a Plane: integrate BattMonitor 2013-10-03 11:16:08 +09:00
Andrew Tridgell 65976831e2 Plane: moved Linux logs to logs directory 2013-10-01 13:05:18 +10:00
Andrew Tridgell eef693f243 Plane: removed some compat code
fixes warnings
2013-09-30 21:06:43 +10:00
Andrew Tridgell 24099a520d Plane: updates for AP_HAL::MemberProc 2013-09-30 21:06:43 +10:00
Andrew Tridgell 444d053dc2 Plane: enable Oilpan and BMP085 on Linux 2013-09-29 01:02:05 +10:00
Andrew Tridgell f68778d453 Plane: be friendly to multi-tasking OSes 2013-09-28 22:04:15 +10:00
Andrew Tridgell 287db19119 Plane: updates for Stub -> HIL 2013-09-28 22:04:15 +10:00
Andrew Tridgell 88959004d7 Plane: use new scheduler API 2013-09-28 21:24:03 +10:00
Andrew Tridgell 1fd0f73e3f Plane: use DataFlash_File on Linux 2013-09-28 21:24:02 +10:00
Andrew Tridgell c3d0b315cf Plane: added HAL_LINUX includes 2013-09-28 21:24:02 +10:00
Andrew Tridgell 650ff258db Plane: update for new INS API 2013-09-27 10:49:00 +10:00
Mike McCauley 6a8c1a0c36 Plane: Added flymaple to ArduPlane 2013-09-24 13:51:28 +10:00
Mike McCauley aa800472be Plane: defines.h added Flymaple INS 2013-09-24 13:51:28 +10:00
Mike McCauley 3ddcdba659 Plane: Parameters BATTERY_MONITORING for Flymaple 2013-09-24 13:51:28 +10:00
Mike McCauley 18c6b00b5b Plane: Added definitions for Flymaple 2013-09-24 13:51:28 +10:00
Andrew Tridgell 4f310aaec8 Plane: fixed build with print() base change 2013-09-23 18:10:22 +10:00
Mike McCauley 767884b7f1 Plane: workaround conflicts between wirish and APM compatibility 2013-09-23 18:10:21 +10:00
Kevin Hester 996eda0080 Plane: Report MAV_STATE_ACTIVE if flying, MAV_STATE_STANDBY otherwise
(There are also various error states MAV_STATE_CRITICAL that are unchanged
by this check in).

The is_flying() check is similar to the code in suppress_throttle, but
I wanted to make it very optimistic on thinking we are flying - which is
not what you want for set_throttle...

(AC has similar MAV_STATE_ACTIVE vs MAV_STATE_STANDBY behavior now)
2013-09-21 21:57:07 +10:00
Andrew Tridgell bcce2e4fc5 Plane: use new Baro API 2013-09-21 21:31:03 +10:00
Andrew Tridgell 36466e91ed Plane: run SENSOR_OFFSETS message at 1/10 of the requested rate
this message wastes bandwidth, as the values change very slowly
2013-09-21 09:35:45 +10:00
Andrew Tridgell c4dcdcf5a2 Plane: only send RC_CHANNELS_SCALED in HIL
saves a bit of telemetry bandwidth
2013-09-21 09:30:29 +10:00
Andrew Tridgell b28a4f21f2 Plane: fixed uartA baud rates for APM1 2013-09-21 09:30:29 +10:00
Andrew Tridgell e455ee0a94 Plane: fixed throttle suppression for AUTO_FBW_STEER=1 2013-09-20 17:20:06 +10:00
Andrew Tridgell 1869cd52e1 Plane: fixed AUTO_FBW_STEER stick mixing 2013-09-20 17:20:06 +10:00
Andrew Tridgell 328e900364 Plane: changed TKOFF_THR_DELAY default to 2
this makes it safer for hand launch with pusher props
2013-09-19 21:42:21 +10:00
Paul Riseborough 43cf0736a3 Plane: Auto Takeoff Check updates
Adds additional launch angle protection and protection against early
exit from auto causing unexpected motor start on re-entry
2013-09-19 21:37:31 +10:00
Randy Mackay ab4274aa8d Plane: disable battery failsafe when usb connected 2013-09-19 17:43:08 +09:00
Andrew Tridgell 21a4da0d29 Plane: removed flash_leds() calls 2013-09-19 18:38:28 +10:00
Andrew Tridgell 4bd6b2f428 Plane: use new usb_connected() function 2013-09-19 16:23:58 +10:00
Andrew Tridgell 8a76d82de4 Plane: set failsafe_radio AP_Notify bits 2013-09-18 11:58:54 +10:00
Andrew Tridgell 150e7a3f16 Plane: prevent arming tone on startup 2013-09-18 10:56:06 +10:00
Andrew Tridgell 95a696ea36 Plane: enable failsafe battery reporting 2013-09-18 10:50:34 +10:00
Andrew Tridgell ec0c894306 Plane: use the projected position for geofencing and waypoints 2013-09-17 21:05:25 +10:00
Andrew Tridgell 43ffe91546 Plane: added FS_ACTION of 2 for glide
this allows people without specified settings in their receiver for
failsafe to choose FBWA zero throttle glide on throttle failsafe. That
can be a better choice when flying at a R/C club field
2013-09-15 15:05:39 +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 cc6acac1dd Plane: added AUTO_FBW_STEER option
this is an unusual option that gives FBWA flight control in AUTO
mode. It is being added to support use of APM in an aerial robotics
competition where students need to pilot the plane, but they still
need waypoint triggering of payloads
2013-09-13 14:38:09 +10:00
Andrew Tridgell de7b42e323 Plane: changed to AP_Vehicle.h 2013-09-13 11:46:54 +10:00
Andrew Tridgell 8010d7fd78 Plane: update battery pin docs 2013-09-12 13:43:22 +10:00
Andrew Tridgell fe5a4ab710 Plane: fixed Vcc 2013-09-12 13:26:27 +10:00
Andrew Tridgell 0c8d56632e Plane: fixed SR0 and SR3 autodocs 2013-09-12 09:53:24 +10:00
Andrew Tridgell f6688582a6 Plane: added FENCE_ACTION=3 behaviour
this makes it safer to enable the geofence as a receiver failsafe
mode. It retains manual throttle control, so if it triggers on the
ground due to the receiver losing signal from the transmitter then the
throttle can be kept low, preventing an unexpected takeoff.
2013-09-08 07:31:10 +10:00
Craig3DRobotics 630095adaa Revert "Copter: Corrected SR0 & SR3 parameter descriptions"
This reverts commit 6568234018.
2013-09-06 09:58:19 -07:00
Craig3DRobotics 2b726abe0e Plane: Correction on SR0 & SR3 parameter description. 2013-09-05 22:29:10 -07:00
Andrew Tridgell 4a8c9a7765 Plane: support reboot to bootloader 2013-09-04 11:59:16 +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 4762b3e7c6 Plane: change to 2.75beta2 2013-08-30 14:02:21 +10:00
Andrew Tridgell a93f7c39a9 Plane: updates for new notify API 2013-08-30 13:01:35 +10:00
Randy Mackay ad8bd16725 Plane: integrate AP_Notify 2013-08-30 13:01:35 +10:00
Andrew Tridgell 2ba9ce60e3 Plane: fixed comment 2013-08-30 13:01:34 +10:00
Andrew Tridgell 8733391315 Plane: call airspeed MAVLink logging function 2013-08-30 13:01:34 +10:00
Andrew Tridgell 5cec9b65c9 Plane: constrain calibration to roll/pitch limits 2013-08-30 13:01:34 +10:00
Andrew Tridgell 364790414c Plane: support new RADIO_STATUS msg 2013-08-24 17:59:13 +10:00
Andrew Tridgell b16e3e4c85 Plane: changed FBW min to 9 m/s
6 m/s is too dangerous for widely used planes
2013-08-18 11:42:23 +10:00
Andrew Tridgell 8dd0aa12ed Plane: prevent GPS speed spikes at startup from breaking airspeed cal
the filter can be affected by a huge GPS velocity spike
2013-08-18 11:42:22 +10:00
Andrew Tridgell 4425b6af7c Plane: update for new TECS API 2013-08-14 14:59:01 +10:00
Andrew Tridgell accfd46633 Plane: update for new APM_Control API 2013-08-14 14:57:41 +10:00
Andrew Tridgell 8378dc9779 Plane: use reference to AHRS 2013-08-13 13:49:34 +10:00
Andrew Tridgell 5cfdf52381 Plane: change default modes to FBWA not STABILIZE 2013-08-13 13:42:27 +10:00
Andrew Tridgell d4ca3ebf65 Plane: check for parameter send at default of 10Hz
50Hz can cause overruns, especially on PX4 which can drain the tx
buffer very rapidly
2013-08-13 13:42:25 +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 e22f58c9fc Plane: fixed build with OBC failsafe 2013-08-03 09:18:01 +10:00
Andrew Tridgell 890b77447a Plane: allow integrator in stabilize mode when no stick input
fixes issue #472
2013-08-02 21:55:34 +10:00
Andrew Tridgell c083c15240 Plane: use a larger serial buffer
this makes higher rate MAVLink possible again
2013-08-02 18:46:54 +10:00
Andrew Tridgell c3b5f20a45 Plane: run TECS 50Hz code when throttle suppressed
this fixes auto-launch detection using TECS
2013-08-02 18:46:48 +10:00
Andrew Tridgell 8428779558 Plane: make it easier to find task numbers 2013-08-02 18:46:42 +10:00
Andrew Tridgell 62cc84aba3 Plane: use new scheduler load_average() function
this also simplifies the main loop
2013-08-02 18:46:28 +10:00
Andrew Tridgell 233b033e8c Plane: removed old speed/altitude control algorithms
Use TECS only. This makes the code a lot simpler and easier to
properly document
2013-07-22 13:28:11 +10:00
Andrew Tridgell c0697d0a2d Plane: mark 2.75beta1 2013-07-22 12:50:30 +10:00
Andrew Tridgell 965dc228c2 Plane: fixed GUIDED mode change of altitude down 2013-07-22 12:50:02 +10:00
Andrew Tridgell b8fa83ff54 Plane: change default slewrate to 100%/second 2013-07-22 12:50:02 +10:00
Andrew Tridgell 29c854e676 Plane: remove unused function 2013-07-22 12:50:02 +10:00
Andrew Tridgell 6e288551ab Plane: fixed reversion to pre-failsafe mode
if AUTO was entered using GCS, we need to switch back to the old mode,
not control channel
2013-07-22 12:50:02 +10:00
Andrew Tridgell 74dabad1f3 Plane: added SKIP_GYRO_CAL parameter
useful for starting the sim at high altitudes, and for starting planes
without having to hold them still
2013-07-22 12:50:01 +10:00
Andrew Tridgell c8a83e17d0 Plane: remove old AIR_START code
this was never used or tested
2013-07-22 12:50:01 +10:00
Andrew Tridgell 7673ca0bac Plane: updates for new EAS2TAS scaling 2013-07-22 12:50:01 +10:00
Andrew Tridgell 9bbe6c1967 Plane: update to new license boilerplate for GPLv3
we had LGPLv2 in some places, despite the fw being GPLv3
2013-07-22 12:50:01 +10:00
Andrew Tridgell 882aa68c16 Plane: use new airspeed calibration code
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-07-22 12:50:01 +10:00
Andrew Tridgell 53b1b9b575 Plane: added note on type of airspeed in docs 2013-07-22 12:50:01 +10:00
Andrew Tridgell 2d5deddd30 Plane: set mode CIRCLE on short failsafe in AUTO
this makes the code match the docs
2013-07-22 12:50:00 +10:00
Andrew Tridgell 9b70675b12 Plane: check the control switch a bit more often
faster response to mode changes
2013-07-22 12:50:00 +10:00
Andrew Tridgell 6ed78c89ac Plane: don't read control switch when ch3 is in failsafe
use ch3_counter not just the final flag
2013-07-22 12:50:00 +10:00
Andrew Tridgell 51b9cf3e76 Plane: move failsafe variables into a structure
this makes the logic a bit easier to follow
2013-07-22 12:50:00 +10:00
Andrew Tridgell 608345415b Plane: pass aircraft parameters to attitude controllers
also cope with rename of airspeed min/max variables

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-07-18 14:53:37 +10:00
Andrew Tridgell a4f49a28fb Plane: prepare for 2.74b release 2013-07-16 09:45:32 +10:00
Andrew Tridgell e27dd14bcc Plane: fixed FBWB aileron control 2013-07-16 09:44:23 +10:00
Andrew Tridgell e8355905dd Plane: prepare for 2.74 release 2013-07-15 11:19:38 +10:00
Andrew Tridgell dbd47b2a30 Plane: make TECS the default speed/height controller 2013-07-15 11:12:24 +10:00
Andrew Tridgell ec21922233 Plane: make wp_distance static
removed hack in AP_Camera library
2013-07-15 09:56:28 +10:00
Andrew Tridgell 3ba713352f Plane: use update_aux() for setting up extra channels 2013-07-15 09:56:12 +10:00
Andrew Tridgell ed20c4cbc8 Plane: fixed initial reporting of battery remaining
we were not showing battery remaining 100% until we used some battery
2013-07-14 21:59:15 +10:00
Andrew Tridgell e80d73df93 Plane: expand docs for TRIM_AUTO 2013-07-14 21:23:15 +10:00
Andrew Tridgell 4087fde140 Plane: enable CTUN log message by default 2013-07-14 21:10:12 +10:00
Andrew Tridgell e79023ceee Plane: fixed problem with slow ground station connects
don't trigger the "scheduler out of time" code when in the delay
callback

Thanks to Marijm Slootweg for noticing this!
2013-07-14 17:28:34 +10:00
Andrew Tridgell d4db2231d4 Plane: change to 2.73beta4 2013-07-13 21:47:22 +10:00
Andrew Tridgell dc024d425a Plane: re-do roll hanging in ACRO mode
this avoids the euler angle zeros of the previous method by using a
gyro integrator on the roll axis

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-07-13 21:45:58 +10:00
Andrew Tridgell b37f79d307 Plane: update for new APM_Control API 2013-07-13 21:45:58 +10:00
Andrew Tridgell 113bc20f8a Plane: added a new CRUISE flight mode
See
http://diydrones.com/group/apmusergroup/forum/topics/feature-request-hold-heading-mode

this fixes issue #438
2013-07-13 21:45:58 +10:00
Andrew Tridgell 399970e76f Plane: fixed default deadzone for the throttle channel
this is the 2nd half of the fix for issue #303
2013-07-13 13:19:25 +10:00
Andrew Tridgell 826ad6c086 Plane: unlock roll and pitch when we enter ACRO mode 2013-07-13 12:34:34 +10:00
Randy Mackay 1772a62415 Plane: fix to gps present check in mavlink extended status 1 msg 2013-07-13 10:27:39 +09:00
Andrew Tridgell ea9ae31a7a Plane: fixed a bug with altitude drift in FBWB mode
not taking account of deadzone correctly
2013-07-12 21:17:09 +10:00
Andrew Tridgell cc57bfcf12 Plane: fixed handling of deadzone in ACRO mode
RC_Channel norm_input() does not take account of the dead zone
2013-07-12 17:54:51 +10:00
Randy Mackay 9df93881fb Plane: set_dead_zone renamed to set_default_dead_zone
Change in use of parameter means value passed in should be 1/2 what it
was previously
2013-07-12 11:44:18 +09:00
Andrew Tridgell f300df5fd1 Plane: added FS_LONG_TIMEOUT and FS_SHORT_TIMEOUT parameters
this is to address the issue raised here:

http://diydrones.com/forum/topics/ardupilot-circle-mode
2013-07-12 11:56:04 +10:00
Andrew Tridgell 73928b82a6 Plane: fixed FBWB airspeed control
thanks to Gabor for reporting this!
2013-07-11 11:58:54 +10:00
Andrew Tridgell 1d04290eab Plane: change to 2.74beta3 2013-07-11 11:58:54 +10:00
Andrew Tridgell 11a4628409 Plane: added ACRO mode to mode choices 2013-07-11 09:10:41 +10:00
Andrew Tridgell fc67f51901 Plane: added ACRO_ROLL_RATE and ACRO_PITCH_RATE parameters
default to 180 degrees/second, which seems reasonable
2013-07-11 09:10:41 +10:00
Andrew Tridgell 608007361b Plane: added initial implementation of ACRO mode
rate based control with attitude locking
2013-07-11 09:10:41 +10:00
Andrew Tridgell 2005d5642a Plane: fixed a documentation string
GND_ALT_OFFSET is now for barometric corrections
2013-07-10 14:46:22 +10:00
Andrew Tridgell 3c97fad2ec Plane: changes for GPS field changes 2013-07-10 14:04:22 +10:00
Andrew Tridgell 7aa360b176 Plane: added relative_altitude helper functions
prevents some code duplication
2013-07-10 14:04:22 +10:00
Paul Riseborough 971d36f06b Plane: added height to 10Hz TECS call 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 f7c8d1e1ee Plane: use current_loc.alt for altitude to TECS 2013-07-10 11:55:35 +10:00
Craig@3DR 7f4336430a Plane: trigger picture + logging on camera update_location() 2013-07-10 08:40:01 +10:00
Paul Riseborough a4f3180e2a Plane: added support for throttle nudging with TECS 2013-07-09 20:51:03 +10:00
Paul Riseborough c34803db13 Plane: pass in adjusted height above field to TECS 2013-07-09 09:25:55 +10:00
Andrew Tridgell 9f612f6f78 Plane: only call TECS when throttle is not suppressed
this helps prevent integrator buildup on the ground
2013-07-08 12:07:50 +10:00
Andrew Tridgell 1355b6d89d Plane: break-up scheduling into smaller pieces
ensure mavlink sends don't push us over a scheduling boundary
2013-07-05 18:05:27 +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 d30dd7c3f1 Plane: only run TECS when in an auto-throttle mode
this prevents integrator buildup in user controlled modes
2013-07-05 14:55:22 +10:00
Andrew Tridgell dd330885b8 Plane: added compass and baro accumulate functions 2013-07-05 12:59:15 +10:00
Andrew Tridgell 84299c3747 Plane: document ALT_CTRL_ALG=2 2013-07-04 17:00:04 +10:00
Andrew Tridgell 6c7d160ee6 Plane: fixed TECS takeoff detection 2013-07-04 16:56:57 +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 f3237b9e5d Plane: update FS_LONG_ACTN and FS_SHORT_ACTN docs
thanks to Craig for noticing this
2013-07-02 14:50:04 +10:00
Andrew Tridgell 75ef7c26e1 Plane: update takeoff course when conditions met
This allows for change of heading before the final takeoff conditions
are met

thanks to Greg Fletcher for suggesting this
2013-07-01 17:05:13 +10:00
Andrew Tridgell 570ecea6c6 Plane: added secondary rudder support 2013-06-29 17:31:03 +10:00
Andrew Tridgell 0d3faeda90 Plane: update_mount assumes 50Hz, for camera trigger 2013-06-25 12:44:26 +10:00
Andrew Tridgell bb47029564 Plane: enable CAM_TRIGG_DIST parameter 2013-06-25 12:44:26 +10:00
Andrew Tridgell 45f5d05bd2 Plane: enabled RELAY_* parameters 2013-06-25 12:44:26 +10:00
Andrew Tridgell 056e0ca40d Plane: APM2 doesn't have channel 9 PWM output 2013-06-24 13:06:54 +10:00
Paul Riseborough 2204b30e66 Plane: Added APM_Control integrator limits to table used to covert old PID values 2013-06-22 21:59:47 +10:00
Randy Mackay 6ea568d72a Plane: param description change for RC5 ~ RC11
Reversing the order may avoid duplication of param descriptions in the
auto generated parameter web page
2013-06-21 09:58:02 +09:00
Randy Mackay 75bcd7cdab Plane: update THR_FS_VALUE parameter description 2013-06-18 15:57:29 +09:00
Andrew Tridgell 4a0c90246e Plane: make GPS UART blocking again 2013-06-11 18:50:23 +10:00
Andrew Tridgell 641ad6bc63 Plane: increase time allowed for update_alt()
the altitude tracking code can be quite expensive with TECS
2013-06-07 08:41:09 +10:00
Andrew Tridgell b0c87b8a61 Plane: fix VOLT_DIVIDER docs 2013-06-07 08:40:28 +10:00
Andrew Tridgell b27ffdd087 Plane: new plane beta 2.74beta2 2013-06-04 15:10:11 +10:00
Andrew Tridgell c008fa764c Plane: update_commands() can take 7ms if it needs to write a waypoint 2013-06-04 13:42:25 +10:00
Andrew Tridgell 93cd0f9a31 Plane: switch to new AP_Scheduler
this gives us more accurate task scheduling in ArduPlane, plus better
monitoring of task timing (via SCHED_DEBUG)
2013-06-04 13:34:58 +10:00
Andrew Tridgell 6bac13f9e2 Plane: fixed RCMAP_* to fix channel ranges for no-reboot changes 2013-06-03 21:20:39 +10:00
Andrew Tridgell 02d72ffcba Plane: make it possible to change board orientation at runtime 2013-06-03 16:52:44 +10:00
Andrew Tridgell 4c9bc30f58 Plane: make it possible to change control channel ordering without reboot
this makes configuration a bit easier
2013-06-03 16:42:38 +10:00
Andrew Tridgell 27bc0cdc2c Plane: rename old channel_* globals
prevent the old "g." names from being used
2013-06-03 16:37:51 +10:00
Andrew Tridgell a1f64d606a Plane: fixed remaining places where primary channel ordering was assumed
should now use rcmap for all inputs
2013-06-03 16:23:48 +10:00
Andrew Tridgell fb9bf21522 Plane: allow channel mapping of first 4 channels
this makes it easier to support DSM and SBUS radios
2013-06-03 16:23:48 +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 f7697574db Plane: use the new airspeed driver interface
the choice of analog source is now in the airspeed driver
2013-06-03 11:51:09 +10:00
Andrew Tridgell d9bcfd913a Plane: reset attitude integrators on mode change 2013-06-01 22:29:38 +10:00
Andrew Tridgell bb3171ab5f Plane: zero attitude integrators on the ground 2013-06-01 22:29:38 +10:00
Andrew Tridgell cd55ed45e2 Plane: removed the old roll/pitch/yaw PID controllers
use the new controllers, with auto parameter conversion
2013-05-31 14:06:56 +10:00
Andrew Tridgell 91a04ab654 Plane: fixed headers for mode logging 2013-05-31 14:04:03 +10:00
Andrew Tridgell cae1079747 Plane: auto-convert the old RLL2SRV* parameters to the new CTL_RLL_* parameters 2013-05-31 07:58:29 +10:00
Andrew Tridgell e48b8c7b4a Plane: improve RTL altitude docs 2013-05-31 07:58:29 +10:00
Andrew Tridgell 6e0f1f56de Plane: update docs on volt/current pin 2013-05-31 07:57:15 +10:00
Andrew Tridgell fa9eb84542 Plane: added more parameter docs (flaps and GCS control) 2013-05-30 09:44:09 +10:00
Andrew Tridgell de904468b2 Plane: added BATT_MONITOR and VOLT_DIVIDER docs 2013-05-30 09:06:36 +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 f9a1b4f0e3 Plane: improve ALT_MIX docs 2013-05-28 10:10:22 +10:00
Andrew Tridgell 767d9d0eb5 Plane: fixed stick mixing in AUTO modes
the mixing was asymmetric. Many thanks to Soren Kuula for noticing this!
2013-05-27 08:24:35 +10:00
Andrew Tridgell c481ac8745 Plane: use a default mixing gain of 0.5
this ensures compatibility with existing configs
2013-05-25 19:15:47 +10:00
Andrew Tridgell c81421e275 Plane: added MIXING_GAIN parameter
this allows for the full range of output on both channels, but can
saturate
2013-05-25 18:28:13 +10:00
Andrew Tridgell a22f5e3bc4 Plane: enable wind estimation 2013-05-24 11:21:42 +10:00