Commit Graph

3959 Commits

Author SHA1 Message Date
Peter Barker
cdf4128900 Plane: move sending of POSITION_TARGET_GLOBAL_INT up 2018-05-18 20:26:37 +10:00
Peter Barker
57cc0cac97 Plane: GCS_MAVLink base class now uses same ekf call to get alt 2018-05-17 15:48:06 +01:00
Peter Barker
5aefb90e61 Plane: move sending of GLOBAL_POSITION_INT up to GCS_MAVLINK 2018-05-17 15:48:06 +01:00
Peter Barker
1545b9b161 Plane: remove arguments to send_home and send_ekf_origin 2018-05-17 20:42:36 +10:00
Peter Barker
6f8339028e Plane: move send_attitude into GCS_MAVLINK_Plane 2018-05-17 18:28:43 +10:00
Peter Barker
1f9d1ee5a2 Plane: move try_send_message sending of scaled_pressure up 2018-05-17 15:37:14 +10:00
Peter Barker
0e3ad3f023 Plane: move try_send_message sending of sensor offsets up 2018-05-17 15:37:14 +10:00
Peter Barker
e6411c6804 Plane: move try_send_message of RAW_IMU up to GCS_MAVLINK 2018-05-17 15:37:14 +10:00
Peter Barker
7afd056e98 Plane: handle setting of ekf origin in GCS_MAVLink 2018-05-17 10:13:42 +10:00
Peter Barker
052b76d017 Plane: move Log_Write_Home_And_Origin into AP_AHRS 2018-05-17 10:13:42 +10:00
Michael du Breuil
fcf6c69a5b Plane: AP_Proximity is now a common library 2018-05-16 23:21:41 +01:00
Michael du Breuil
499df8e0b3 Plane: Move MAVLink rangefinder up to parent 2018-05-16 23:21:41 +01:00
Michael du Breuil
8afc96097b Plane: Send all distance sensors 2018-05-16 23:21:41 +01:00
Michael du Breuil
b479f3760a Plane: Remove some unneeded logging indirection
Saves 32 bytes on make px4-v2
2018-05-16 20:34:00 +10:00
Peter Barker
eb026e0a5f Plane: correct compilation when logging is disabled 2018-05-10 17:55:13 +09:00
Peter Barker
8da8c616f6 Plane: move sending of battery data up 2018-05-09 11:40:31 -07:00
Peter Barker
0fec702ba6 Plane: move data stream send up 2018-05-09 16:15:38 +10:00
Peter Barker
e10c23bd43 Plane: make scheduler track whether it has called the delay callback 2018-05-09 16:15:38 +10:00
Andrew Tridgell
8d996112ec Plane: don't do throttle ESC scaling for quadplanes 2018-05-09 14:17:15 +10:00
Peter Barker
1dcd731005 Plane: AP_RSSI is included in build for all vehicles 2018-05-08 12:33:32 +01:00
Peter Barker
68497f27fa Plane: move try_send_message handling of RC_CHANNELS up 2018-05-08 12:33:32 +01:00
Peter Barker
8df625e81a Plane: move try_send_message of heartbeats up to GCS_MAVLINK 2018-05-07 11:30:13 -06:00
Peter Barker
c1680d90a6 Plane: move try_send_message handling of VIBRATION up 2018-05-07 11:23:28 -06:00
Peter Barker
2e3a7fc5b6 Plane: remove rcmap member from AP_AdvancedFailsafe 2018-05-05 18:06:31 +09:00
Andrew Tridgell
c20351202d Plane: document TKOFF_THR_SLEW = -1 for takeoff 2018-04-26 15:59:06 +10:00
Andrew Tridgell
badea86fbd Plane: remove old pde file
this was here for upgrading very old MissionPlanner versions. We can
remove it now
2018-04-26 14:25:01 +10:00
Michael du Breuil
2deac7238c Plane: Support new RC_Channels::read_input() 2018-04-26 08:00:09 +10:00
Andrew Tridgell
7208fe96d5 Plane: update release notes for 3.8.5 2018-04-25 20:05:50 +10:00
Andrew Tridgell
d07f8aa42b Plane: fixed a bug in transition to QSTABILIZE for tailsitters
this bug was found bug Marco on his tailsitter. It resulted in zero
throttle for 2s in transition from FBWA to QSTABILIZE
2018-04-25 18:01:12 +10:00
night-ghost
aa53832a70 ArduPlane: devo telemetry support (RX705/707) 2018-04-24 10:44:28 +10:00
Peter Barker
5cc98a9733 Plane: use AP_ServoRelayEvents singleton 2018-04-18 20:31:55 +09:00
Peter Barker
5ef417a669 Plane: GPS now logs its own data 2018-04-18 13:50:55 +09:00
Michael du Breuil
7b7f5e242b Plane: Simplify channel reading 2018-04-14 14:05:20 +10:00
Peter Barker
2b54113334 Plane: Baro does its own dataflash logging 2018-04-12 19:12:12 +01:00
Michael du Breuil
3e4288d604 Plane: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
1af2155641 Plane: Check MANUAL_CONTROL target 2018-04-10 16:54:34 +01:00
Randy Mackay
840a6e4147 Plane: quadplane uses AC_Loiter
includes param conversion
2018-04-04 10:45:10 +09:00
Francisco Ferreira
bbe3e41162
Plane: fix method shadowing 2018-04-03 16:29:33 +01:00
Peter Barker
f6a185a3c3 Plane: factor vehicle's mavlink send_heartbeat 2018-04-03 13:05:19 +01:00
Peter Barker
58d41e40d3 Plane: let GCS_MAVLink calibrate airspeed sensor
Also remove useless zero_airspeed function
2018-04-02 23:25:05 +01:00
Peter Barker
65893cfca5 Plane: tidy handling of barometer calibrations 2018-04-02 23:25:05 +01:00
Peter Barker
71bc3f5def Plane: move common calibration functions up 2018-04-02 23:25:05 +01:00
Peter Barker
91c2ece7a2 Plane: factor out preflight calibration function 2018-04-02 23:25:05 +01:00
Michael du Breuil
7405bb7b85 Plane: Support new battery failsafes 2018-03-27 22:12:21 +01:00
Peter Barker
8a75a804e7 Plane: allow DataFlash to handle log sending 2018-03-26 09:22:47 +09:00
Przemek Lekston
e5a9ac84e7 [Plane] Fix verify_loiter_heading acceptance criteria. 2018-03-20 10:25:35 -07:00
Peter Barker
5572d83ce9 Plane: move handling of get_home_position up 2018-03-19 10:32:37 +09:00
Peter Barker
7fd859da65 Plane: move home state into AP_AHRS 2018-03-19 10:32:37 +09:00
Peter Barker
7c86c4fe61 Plane: use ins singleton 2018-03-16 00:37:35 -07:00
Randy Mackay
548a7f8fcf Plane: add minor comment to quadplane 2018-03-16 13:50:57 +09:00
Leonard Hall
ee745d2cd2 Plane: quad plane uses rate-control control during transitions 2018-03-16 13:50:57 +09:00
Leonard Hall
a16d4ddad7 Plane: quadplane uses poscontrol instead of loiter 2018-03-16 13:50:57 +09:00
Randy Mackay
c5d838125b Plane: quadplane logs PSC message 2018-03-16 13:50:57 +09:00
Randy Mackay
09cad7c59d Plane: quadplane integrates attitude control inertial_frame_reset 2018-03-16 13:50:57 +09:00
Randy Mackay
03c162432e Plane: quadplane provides dt to AC_WPNav::set_pilot_desired_acceleration 2018-03-16 13:50:57 +09:00
Randy Mackay
a0a9a68fbc Plane: quadplane smoothing gain replaced by Q_A_INPUT_TC
Q_A_INPUT_TC parameter allows this to be tuned and a single value (which defaults to a value between the two previously used values) is used for all modes
2018-03-16 13:50:57 +09:00
Leonard Hall
aa47b19dea Plane: remove quadplane calls to multicopter poscontrol's freeze_ff_xy 2018-03-16 13:50:57 +09:00
Peter Barker
f558bbca2e Plane: use baro singleton 2018-03-08 21:20:05 -08:00
Peter Barker
4104d40130 Plane: delete correct assignment operator 2018-03-08 21:20:05 -08:00
Peter Barker
5671b3173e Plane: use AHRS singleton in GCS_MAVLink 2018-03-07 12:34:39 +00:00
Peter Barker
0862d1454e Plane: use AP::ahrs() for ADSB 2018-03-07 12:34:39 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
33288fa676 Plane: NFC adapt to new AP_Battery method name 2018-03-03 17:19:13 +00:00
Tom Pittenger
6820531e2a Plane: fixed error string spelling 2018-03-02 21:37:11 -08:00
Michael du Breuil
faea5d285c Plane: Consolidate some of the PID logging details 2018-03-03 17:34:18 +12:00
Andrew Tridgell
27e4953ad8 Plane: disable HIL on px4-v2
this saves enough flash for px4-v2 to fit again
2018-03-03 13:35:39 +11:00
night-ghost
98b8a61ca8 Plane: allow AP_Stats to be optional 2018-03-02 07:23:35 +11:00
David Ingraham
a6aeebad4b Plane: Add support for AP_Gripper 2018-03-01 14:14:43 +11:00
David Ingraham
9419cc3b32 Plane: Fix param docs for quadplane attitude control
Docs aren't currently being generated for plane for AC_AttitudeControl.cpp. I believe this will fix that.
2018-02-20 16:38:27 +11:00
Andrew Tridgell
e6cebdecd1 Plane: use scheduler.get_last_loop_time_s() 2018-02-13 17:15:05 +11:00
Peter Barker
3859e5dfb1 Plane: eliminate update_perf_logging scheduler table shim 2018-02-13 17:15:05 +11:00
Andrew Tridgell
36660b2124 Plane: use filtered loop time 2018-02-13 17:15:05 +11:00
Peter Barker
4586b892f2 Plane: pass log-performance-bit at init time rather than update time 2018-02-13 17:15:05 +11:00
Peter Barker
8cae776448 Plane: move logging of PM and PERF messages to AP_Scheduler 2018-02-13 17:15:05 +11:00
Peter Barker
02540fdbf9 Plane: use AP_Scheduler's loop() function 2018-02-13 17:15:05 +11:00
Peter Barker
73092c3c30 Plane: use scheduler ticks in place of mainloop_count 2018-02-13 17:15:05 +11:00
Peter Barker
519e6c31d2 Plane: use AP::PerfInfo library 2018-02-13 17:15:05 +11:00
Randy Mackay
dd6755f486 Plane: fix global-pos-int velocity direction to NED 2018-02-13 08:52:48 +09:00
Andrew Tridgell
2fb6113098 Plane: use AP:PerfInfo class 2018-02-10 10:50:22 +11:00
Andrew Tridgell
ac196b8e0a Plane: fixed build error 2018-02-10 08:00:24 +11:00
Tom Pittenger
50a2d824c4
Plane: crash detection hard landing detection should skip debounce
closes https://github.com/ArduPilot/ardupilot/issues/7683
2018-02-09 11:40:12 -08:00
Andrew Tridgell
d1e11a5bde Plane: fixed build (remove learn_offsets call) 2018-02-08 17:36:33 +11:00
Michael du Breuil
43972f8e56 Plane: Move battery logging code to AP_BattMonitor 2018-02-06 00:11:32 +00:00
Randy Mackay
ddcd08d6b6 Plane: PSC_ACCZ param name shortened 2018-01-31 08:48:21 +09:00
Michael du Breuil
aec7521da4 Plane: Fix truncation of a time interval
Truncating the a millisecond time delta to uint16_t causes it to wrap
every 65 seconds, which could momentarily reset the desired climb rate
2018-01-25 14:30:49 +11:00
Randy Mackay
d579e086cf Plane: quadplane param index comment for moved PIDs 2018-01-24 21:14:53 +09:00
Andrew Tridgell
20b05e4228 Plane: added conversion code for PID layout change
this copes with the move of multicopter PIDs inside the position
controller
2018-01-24 18:23:59 +11:00
Tom Pittenger
518abfe1d0 Plane: Allow GUIDED mode to take advantage of crosstrack flag. 2018-01-22 19:17:09 -08:00
Randy Mackay
7b1157e2d8 Plane: remove setting accel_z PID controller's dt
This is handled within pos-controller's set_dt function
2018-01-23 12:00:43 +09:00
Randy Mackay
f41f4dc6e5 Plane: move pos-control pids to pos-control library 2018-01-23 12:00:43 +09:00
Randy Mackay
017e71a748 Plane: quadplane velocity pi moves to position control library 2018-01-23 12:00:43 +09:00
Michael du Breuil
ff85f5e9bd Plane: Support AP_BattMonitor_Params 2018-01-17 22:21:55 +00:00
Andrew Tridgell
5614fd1ccc Plane: use calloc in preferance to malloc 2018-01-17 11:22:05 +11:00
Andrew Tridgell
2c6a004a67 Plane: mark version as 3.9.0-dev 2018-01-16 11:04:55 +11:00
Andrew Tridgell
be0d2229c1 Plane: update release notes 2018-01-16 11:03:26 +11:00
Andrew Tridgell
31d7d9f909 Plane: change airspeed parameter prefix
this makes for clearer parameter names with dual sensors
2018-01-16 07:14:20 +11:00
Andrew Tridgell
c1cbbf9203 Plane: check all airspeed sensors are healthy 2018-01-16 07:14:20 +11:00
Tom Pittenger
746ca91649 Plane: reset groundspeed_undershoot value when GPS is lost
If we lose GPS lock the gndspd undershoot value gets stuck at the last calculated value forever (until GPS locks again)
2018-01-09 17:05:04 -08:00
Tom Pittenger
1ef0f27786 Plane: allow control_mode enum to be in arbitrary order
never use control_mode >= BLAH. This requires the order to be important which greatly increases chance for unexpected behavior
Closes https://github.com/ArduPilot/ardupilot/issues/4656
2018-01-09 17:05:04 -08:00
Tom Pittenger
39a200b83f Plane: allow control_mode enum to be in arbitrary order
never use control_mode >= BLAH. This requires the order to be important which greatly increases chance for unexpected behavior
Closes https://github.com/ArduPilot/ardupilot/issues/4656
2018-01-09 17:05:04 -08:00
Peter Barker
c4c6b3cc70 Plane: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
c5ae01fc6d Plane: use GPS singleton 2017-12-27 00:58:02 +00:00
luweikxy
25224cd261 Plane: remove dead code from do_vtol_land 2017-12-14 20:52:18 +09:00
Andrew Tridgell
30e224e705 Plane: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Michael Oborne
9ed3ca3d35 ArduPlane: update version number 2017-12-13 18:00:03 +11:00
Ubuntu 16.04 VM
624aef401d Plane: Enforce THR_MIN/THR_MAX in VTOL modes 2017-12-11 22:18:39 -08:00
Tom Pittenger
512b327cd4 Plane: failsafe events to use enums instead of magical numbers : Non-functional change 2017-12-07 00:19:32 -08:00
Peter Barker
af007c5f0f Plane: tighten handleMessage result type 2017-12-01 17:01:10 +00:00
Tom Pittenger
3d6cc59a6b Plane: cleanup geofence warnings 2017-11-27 18:35:49 -08:00
Andrew Tridgell
2a81792b41 Plane: don't disable compass on one bad reading
the compass can go back for a short time and recover

found by Michael
2017-11-28 09:02:24 +11:00
Andrew Tridgell
49cb245ea6 Plane: use a min airspeed for is_flying test
in VTOLs setting min airspeed to zero can be useful
2017-11-28 09:02:24 +11:00
Michael du Breuil
1a3ca43e86 Plane: Don't check FS_SHORT_TIMEOUT if it's disabled
Also renames the check_minimum_altitude() to reflect that it's only used
for FBWB.
2017-11-24 09:58:01 -08:00
Tom Pittenger
7271586a47 Plane: invert auto_state.no_crosstrack flag to be auto_state.crosstrack. Non-functional change 2017-11-23 09:25:18 -08:00
Peter Barker
6ed0d645a3 Plane: support for units on fields 2017-11-23 10:40:30 +11:00
Guy Tzoler
a6c7890c74 Plane: use cork/push wrapper 2017-11-21 14:10:54 +11:00
Michael du Breuil
9720fcb8cc Plane: Only update home when not armed, rather then not soft armed
Plane supports being armed, in takeoff logic and not spinning the motor
until the moment the safety button has been pressed. Unfortunately
because the safety button is required to be pressed for soft arming this
results in the plane updating home position while the user moves the
vehicle or is holding it to throw the vehicle which will can result in
several meters of altitude error from where the user expected home to
be.

Because the normal approach to plane is to have activated the safety
button before arming the aircraft this is not expected to be a behaviour
change for most users, but an improvement for people who use the button
to initiate a takeoff.
2017-11-21 11:45:15 +11:00
Andrew Tridgell
f7a735b990 Plane: fixed transitions for tailsitters after auto-takeoff
need to use angle wait
2017-11-19 16:06:02 +11:00
Andrew Tridgell
85573b3ff3 Plane: fixed a division by zero
if min airspeed is zero
2017-11-19 16:04:40 +11:00
Andrew Tridgell
e06f160dc9 Plane: disable rudder scaling in tailsitters
this is most often implemented as dual-motor differential thrust, and
we don't want to do surface speed scaling for that.

In the future we'll move this scaling so it can be done on rudders for
3D planes
2017-11-18 10:38:46 +11:00
Peter Barker
ee5f550475 Plane: AP_Camera uses GPS singleton 2017-11-16 15:28:37 +00:00
Peter Barker
b4294c00f6 Plane: use gps singleton for GCS functions 2017-11-15 13:43:03 +00:00
André Kjellstrup
1d27e21d83 Plane: Option to trig by distance only when in AUTO mode 2017-11-14 00:10:22 +00:00
Andrew Tridgell
bf1aa64345 Plane: updated release notes for 3.8.3 2017-11-13 15:06:42 +11:00
Andrew Tridgell
271373e1e8 Plane: added a not on min slew rate for throttle 2017-11-13 10:29:46 +11:00
Michael du Breuil
767018b1d4 Plane: Support unlocking cruise heading with rudder 2017-11-09 09:39:44 +11:00
Michael du Breuil
bd32b5deb7 Plane: update isFlying() landing check
When we are landing a sink_rate < -0.2f means the vehicle is climbing,
which should never happen during an approach for any supported landing
type (slope or deepstall), and on hard impacts with the ground its
common for the vehicle altitude to be projected to low and climb back to
the correct altitude slowly (but at a higher rate). This changes the
check to only consider sinks while on approach as acceptable.
2017-11-07 08:57:15 +01:00
Tom Pittenger
8029a7f10e
Plane: add Tom Pittenger to developers list
Plane: add Tom Pittenger to developers list. He was added to main Plane.h as "Lead Developer" here *https://github.com/ArduPilot/ardupilot/blob/master/ArduPlane/Plane.h#L2) but never to the main ArduPilot.c file.
2017-11-06 13:46:32 +01:00
Andrew Tridgell
5843086760 Plane: update release notes for 3.8.3beta4 2017-11-05 21:47:15 +11:00
Andrew Tridgell
957c1f6d23 Plane: extend QLOITER transition pitch limit
use twice transition time for pitch envelope to reduce QLOITER
transition harshness
2017-11-05 21:35:32 +11:00
Andrew Tridgell
bbf98fae46 Plane: fixed a warning 2017-11-05 21:25:37 +11:00
Andrew Tridgell
9c8cd6c1cc Plane: added Q_TRANS_DECEL
this gives a deceleration rate for QRTL transition from RTL, and also
for transitions to QLOITER
2017-11-05 20:44:42 +11:00
Andrew Tridgell
e27c54a312 Plane: smooth out fwd tailsitter transition
use Q_TRANSITION_MS and the transition angle to pitch forward more
slowly
2017-11-05 17:25:00 +11:00
Andrew Tridgell
21164ef409 Plane: added tailsitter surface speed scaling
added scaling of control surfaces by throttle when in hover. This helps
the controller remain stable over a wide range of throttle levels, such
as when descending or rapidly climbing
2017-11-05 17:05:08 +11:00
Michael du Breuil
83decd1370 ArduPlane: Only run is_flying landing checks when in landing stage 2017-11-04 10:07:16 +11:00
Andrew Tridgell
126d5ce5d4 Plane: re-implement MIXING_OFFSET
this was lost in the conversion of SRV_Channels
2017-11-04 09:34:22 +11:00
Michael du Breuil
e63e39c411 Plane: Don't broadcast PWM value that tripped throttle failsafe 2017-11-02 16:46:08 -07:00
Michael du Breuil
d52f5155f0 Plane: Rename rc failsafe state members 2017-11-02 16:46:08 -07:00
nick2204
7d91755bd1 Plane: update Q_OPTIONS docs
Made q_options description a little clearer
2017-11-01 09:38:42 +11:00
Andrew Tridgell
1bee1dd210 Plane: log currently used airspeed
this logs whatever airspeed is being used for flight
2017-11-01 09:22:15 +11:00
Andrew Tridgell
43ee462813 Plane: prepare for 3.8.3beta2 2017-10-31 18:05:50 +11:00
Andrew Tridgell
f14f40d3ef Plane: fixed GUIDED loiter with Q_RTL_MODE=1
this was broken by the recent RTL_RADIUS changes

thanks to Nick for noticing this!
2017-10-31 18:02:31 +11:00
Andrew Tridgell
84e5cd7e14 Plane: update release notes for 3.8.3beta1 2017-10-30 18:46:51 +11:00
Andrew Tridgell
1085069851 Plane: use WP_LOITER_RAD if RTL_RADIUS is 0 for QRTL 2017-10-30 16:52:19 +11:00
Andrew Tridgell
aa430a6e2c Plane: use RTL_RADIUS for QRTL threshold
when Q_RTL_MODE=1 in a quadplane use RTL_RADIUS as the distance to
switch to QRTL mode. We navigate to the destination using direct
waypoint navigation instead of using a loiter circle.
2017-10-30 16:30:38 +11:00
Andrew Tridgell
552faa8f67 Plane: smoother tailsitter transitions
this smooths out tailsitter transitions in both directions, adding a
new FW to VTOL transition state
2017-10-30 16:30:38 +11:00
Andrew Tridgell
c24ee9192b Plane: prevent a float exception at pitch 90
this can happen with a tailsitter
2017-10-30 16:30:38 +11:00
Andrew Tridgell
214434a2d7 Plane: fixed tailsitter ANGLE_WAIT transition
we need vtol control during transition from hover to fwd flight
2017-10-30 16:30:38 +11:00
Andrew Tridgell
af893ddde7 Plane: implement Q_OPTIONS
this allows for NAV_TAKEOFF to be treated as NAV_VTOL_TAKEOFF in
quadplanes, and for level flight to be maintained during quadplane
transitions
2017-10-30 16:30:10 +11:00
Andrew Tridgell
02f8d888c3 Plane: relax controllers when disarmed
this prevents any remaining integrator from a previous flight stage from
affecting flight across a disarm
2017-10-30 16:30:10 +11:00
Peter Barker
d49be616da Plane: call ins's periodic function 2017-10-27 16:33:45 +11:00
Tom Pittenger
8adacfeea3 Plane: always log MODE and include reason when logging is enabled 2017-10-25 21:18:29 +11:00
Andrew Tridgell
92ee05b925 Plane: fixed motor channel handling 2017-10-25 11:39:11 +11:00
Peter Barker
4ce051af82 Plane: ensure we're in short failsafe before using failsafe.ch3_timer_ms 2017-10-24 09:28:13 +11:00
Peter Barker
ff88b0dfda Plane: remove redundant failsafe string 2017-10-24 09:28:13 +11:00
Peter Barker
7feef72b34 Plane: improve failsafe notifications 2017-10-24 09:28:13 +11:00
Peter Barker
01d8c506d2 Plane: add option to entirely disable short failsafe 2017-10-24 09:28:13 +11:00
Andrew Tridgell
6526ff504d Plane: fix for changes to AP_Motors API 2017-10-22 15:52:50 +11:00
Andrew Tridgell
e008559b6e Plane: support LOITER_TO_ALT in quadplanes 2017-10-21 18:50:01 +11:00
Andrew Tridgell
8178ab4037 Plane: make mav_type in HEARTBEAT configurable
needed for qgc to setup for quadplanes
2017-10-20 15:41:06 +11:00
Andrew Tridgell
0aed5a9a57 Plane: prevent controller windup on ground
when on the ground in an auto-throttle mode lik FBWB or CRUISE, we may
have the throttle suppressed. In that case we should not run the
multicopter controller on quadplanes, or it may build up control which
will then apply on takeoff. This is particularly severe for aircraft
that are not level on the ground, such as taildragger quadplanes

Fixes https://discuss.ardupilot.org/t/quadplane-flips-on-takeoff/22095

many thanks to Sriram for reporting
2017-10-20 15:41:04 +11:00
Andrew Tridgell
1a95dcbdd7 Plane: update docs for Q_YAW_RATE_MAX 2017-10-20 15:40:58 +11:00
Michael du Breuil
615f6dfadb Plane: Don't log PIDL messages 2017-10-17 14:37:11 -07:00
Michael du Breuil
cc55e5a8fa Plane: Don't log SONR if there are no rangefinders 2017-10-16 10:10:26 -07:00
Andrew Tridgell
f81ec9b1b3 Plane: support simple accelcal 2017-10-10 10:57:38 +11:00
Andrew Tridgell
f5b4d8d99c Plane: added frame type 11 for FlreFlyY6 2017-10-06 11:36:34 +11:00
Michael du Breuil
52fc2c82af Plane: Report GPS health 2017-09-27 19:29:32 +01:00
Lucas De Marchi
a2b67ed615 ArduPlane: use static method to construct AP_Landing 2017-09-26 03:01:21 +01:00
Lucas De Marchi
e10c60e492 ArduPlane: use static method to construct controllers 2017-09-26 03:01:21 +01:00
Lucas De Marchi
05c870a4d4 ArduPlane: use static method to construct AP_TECS 2017-09-26 03:01:21 +01:00
Lucas De Marchi
bfd13dfe87 global: use static method to construct AP_AHRS_DCM 2017-09-26 03:01:21 +01:00
Lucas De Marchi
beabae6a98 global: use static method to construct AP_AHRS_NavEKF 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c9fbf7b722 global: use static method to construct AP_NavEKF3 2017-09-26 03:01:21 +01:00
Lucas De Marchi
e2fe36357a global: use static method to construct AP_NavEKF2 2017-09-26 03:01:21 +01:00
Lucas De Marchi
6781a44046 global: use static method to construct AP_Avoidance_* 2017-09-26 03:01:21 +01:00
Lucas De Marchi
119e82f32e ArduPlane: add static create method for AP_Avoidance_* 2017-09-26 03:01:21 +01:00
Lucas De Marchi
6d009cdf6e global: use static method to construct AP_ADSB 2017-09-26 03:01:21 +01:00
Lucas De Marchi
cf6ea9642e global: use static method to construct AP_Terrain 2017-09-26 03:01:21 +01:00
Lucas De Marchi
31db77e47b global: use static method to construct AP_Parachute 2017-09-26 03:01:21 +01:00
Lucas De Marchi
eadd650d78 global: use static method to construct AP_RSSI 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b05610870c global: use static method to construct AP_Rally 2017-09-26 03:01:21 +01:00
Lucas De Marchi
18aa88b329 global: use static method to construct AP_Mount 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c3647f0185 global: use static method to construct AP_Camera 2017-09-26 03:01:21 +01:00
Lucas De Marchi
cc53e7bc4b global: use static method to construct AP_ServoRelayEvents 2017-09-26 03:01:21 +01:00
Lucas De Marchi
13d7f58036 global: use static method to construct AP_Relay 2017-09-26 03:01:21 +01:00
Lucas De Marchi
9ce6019138 global: use static method to construct AP_Frsky_Telem 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b022c02029 global: use static method to construct AP_BattMonitor 2017-09-26 03:01:21 +01:00
Lucas De Marchi
69b6d95cb2 global: use static method to construct AP_Board_Config{,_CAN} 2017-09-26 03:01:21 +01:00
Lucas De Marchi
a74e700006 global: use static method to construct RCMapper 2017-09-26 03:01:21 +01:00
Lucas De Marchi
72fd2d6f05 global: use static method to construct AP_SerialManager 2017-09-26 03:01:21 +01:00
Lucas De Marchi
fbe0d9761c global: use static method to construct AP_OpticalFlow 2017-09-26 03:01:21 +01:00
Lucas De Marchi
2d2876a226 ArduPlane: use static method to construct AP_Arming_Plane 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b36a5919f5 global: use static method to construct AP_Mission
This also move the initialization to be in the header for those that
weren't already to maintain consistency.
2017-09-26 03:01:21 +01:00
Lucas De Marchi
de5e044b02 global: use static method to construct AP_RPM 2017-09-26 03:01:21 +01:00
Lucas De Marchi
40fd1b346c global: remove rangefinder from AP_AHRS_NavEKF
AP_AHRS_NavEKF doesn't use the rangefinder, it just delegates the
calls to the right estimator.

For libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp the initialization
order has also been modified to match the order on vehicles. It's more
correct since it passes a reference when EKF2/EKF3 are already
constructed, while thos constructors use a pointer.  Ideally these
should be moved to an init() method though, or use a get_instance().
2017-09-26 03:01:21 +01:00
Lucas De Marchi
9027a55696 global: use static method to construct RangeFinder 2017-09-26 03:01:21 +01:00
Lucas De Marchi
f5c2ffffb9 global: remove DataFlash from AP_Mount::init() 2017-09-26 03:01:21 +01:00
Lucas De Marchi
53c82b4aaf global: use static method to construct DataFlash_Class 2017-09-26 03:01:21 +01:00
Lucas De Marchi
62ac0ab8aa global: use static method to construct AP_Notify 2017-09-26 03:01:21 +01:00
Lucas De Marchi
de680dac5b global: use static method to construct AP_Scheduler 2017-09-26 03:01:21 +01:00
Lucas De Marchi
8094482f21 global: use static method to construct AP_GPS 2017-09-26 03:01:21 +01:00
Lucas De Marchi
87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c1a957fbf3 global: use static method to construct Compass 2017-09-26 03:01:21 +01:00
Lucas De Marchi
91feec0e14 global: use static method to construct AP_Baro 2017-09-26 03:01:21 +01:00
Lucas De Marchi
96e7ea4d69 ArduPlane: protect version.h from inclusion and use ap_version.h 2017-09-23 21:37:45 -07:00
Lucas De Marchi
36c80daa86 ArduPlane: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi
18ff17e22c ArduPlane: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Ferruccio Vicari
85ab3edc5f Plane: Smoother transition to QLOITER and QLAND
Use estimated stopping position
2017-09-21 07:57:38 +10:00
Peter Barker
1a724ded2a Plane: AP_Arming: sanity-check fs timeout parameters 2017-09-20 09:46:24 -07:00
mirkix
7c6be7c421 Plane: change format of reset alt target message 2017-09-20 20:28:53 +10:00
Randy Mackay
667cdcdfcf Plane: resolve compiler warning while using send_text
non-functional change
2017-09-20 12:14:38 +09:00
Randy Mackay
2073d65975 Plane: command-long DO_SET_HOME check first param is zero 2017-09-20 12:14:38 +09:00
Randy Mackay
640fb91329 Plane: accept DO_SET_HOME within COMMAND_INT 2017-09-20 12:14:38 +09:00
Andrew Tridgell
3d16ca7144 Plane: fixed MANUAL_RCMASK
ensure it only applies in MANUAL, and fixed input scaling in px4io
2017-09-19 17:05:56 +10:00
Peter Barker
7e631ba16c Plane: move handling of SET_GPS_GLOBAL_ORIGIN up 2017-09-19 15:44:23 +09:00
mirkix
b682f3f6d9 Plane: fix parameter units 2017-09-19 11:34:26 +10:00
Randy Mackay
3d7b6ddc40 Plane: support SET_GPS_GLOBAL_ORIGIN message 2017-09-19 10:30:15 +09:00
Peter Barker
1304b86d09 Plane: remove old DO_SET_MODE support
We no longer support setting anything except custom-modes
2017-09-19 01:24:11 +01:00
Andrew Tridgell
35c1a732a6 Plane: allow takeoff in guided then fw loiter
this allows for quadplane takeoff in GUIDED with Q_GUIDED_MODE=0. The
takeoff will be VTOL, but subsequent guided points will be fixed wing
2017-09-18 10:21:53 +10:00
Tom Pittenger
85b7f1bbb4 Plane: guided takeoff success should return true 2017-09-13 14:46:22 -07:00
Michael du Breuil
4fd13d5205 Plane: Support landing terminations on landing backends that support it 2017-09-13 13:15:08 -07:00
Peter Barker
aee939f891 Plane: move gcs_out_of_time into GCS object 2017-09-12 18:28:07 +01:00
Andrew Tridgell
73d6a05241 Plane: support change alt for GUIDED from qgc 2017-09-11 13:26:48 +10:00
Andrew Tridgell
1c75cd7039 Plane: update release notes for 3.8.2 2017-09-11 09:57:28 +10:00
Andrew Tridgell
11b9805dce Plane: added MANUAL_CONTROL support
allows for joystick with QGC
2017-09-11 07:55:48 +10:00
Andrew Tridgell
37220e1568 Plane: removed unused prototypes 2017-09-10 17:15:18 +10:00
David Ingraham
750212eb8f Plane: Remove deprecated control surface mixing functions
This commit removes the deprecated functions used for calculating elevon and vtail mixes. This code is currently unrechable.
The functions that called these were removed in PR #6546.
2017-09-10 17:14:14 +10:00
Andrew Tridgell
d61705ee51 Plane: added release notes for plane 3.8.2beta1 2017-09-09 08:32:14 +10:00
Andrew Tridgell
600a5c44d2 Plane: allow changing of target altitude in GUIDED 2017-09-09 08:14:09 +10:00
Andrew Tridgell
bc17c26dbf Plane: limit pitch in transition to QLOITER and QLAND
when switching to QLOITER or QLAND when in forward flight, limit the
maximum pitch to prevent a sudden decelleration
2017-09-09 08:14:09 +10:00
Andrew Tridgell
b6809655d4 Plane: smooth the transition to LAND_FINAL in quadplanes
this makes for a much smoother change to LAND_FINAL, without a jerk as
it changes vertical speed
2017-09-09 08:14:09 +10:00
Andrew Tridgell
8411ac5c57 Plane: fixed a problem with descent rate in landings for quadplanes
use xy controller instead of xyz controller, which prevents calling z
controller twice, which led to poor height control
2017-09-09 08:14:09 +10:00
Andrew Tridgell
baee71a5b4 Plane: added GUIDED takeoff for quadplanes
this allows takeoff in GUIDED mode in the same way as copters
2017-09-09 08:14:09 +10:00
Michael du Breuil
1f5743e900 Plane: Report the primary magnetometer health rather then the first 2017-09-08 10:27:17 +10:00
Andrew Tridgell
a88e663191 Plane: adjust target altitude slowly in QRTL mode
this fixes a sudden throttle drop when starting the descent in QRTL mode
thanks to Marco for finding this issue
2017-09-07 07:22:13 +10:00
Andrew Tridgell
87e52a9f0f Plane: prepare for 3.8.1 release 2017-09-03 19:31:30 +10:00
Peter Barker
0c7c2a41c4 Plane: handle param_request_list in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker
dd4bffb4a2 Plane: handle param_set in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker
0db1711b1f Plane: move send_autopilot_request calls up to GCS base class 2017-08-30 15:54:46 +01:00
Peter Barker
c15c1b84a4 Plane: add constant structure holding firmware version 2017-08-30 15:54:46 +01:00
Peter Barker
0708130b5e Plane: correct bad case fallthrough 2017-08-30 15:54:46 +01:00
Andrew Tridgell
6bfed07eae Plane: updated USE_REV_THRUST docs 2017-08-30 08:46:53 +10:00
Michael du Breuil
8630037fd7 Plane: Parameterize the home altitude reset conditions 2017-08-29 13:09:46 -07:00
Andrew Tridgell
d541ac509f Plane: removed TRIM_RC_AT_START parameter
this option caused a lot more problems than it solved, and is buggy
2017-08-29 07:35:49 +10:00
Andrew Tridgell
1a207c919b Plane: fixed bug in TRIM_AUTO
fixed trim for differential spoilers
2017-08-29 07:35:49 +10:00
Andrew Tridgell
4124d371c9 Plane: fixed minacc and delay for launch
See
https://discuss.ardupilot.org/t/tkoff-thr-minacc-and-tkoff-thr-delay-doesnt-work-together/19928
2017-08-29 07:35:04 +10:00
Peter Barker
2861c1d06a Plane: add ArduSub to list of SYSID_SW_TYPE 2017-08-24 19:50:38 +09:00
Peter Barker
212174bc0e Plane: remove unused defines 2017-08-24 19:48:17 +09:00
Lucas De Marchi
44ffb67837 ArduPlane: use FALLTHROUGH define
When falling through on a case switch, allow to add an empty statement
with the correct attribute to tell the compiler this behavior is
intended.
2017-08-22 23:59:13 -07:00
Randy Mackay
c80a83322a Plane: integrate simpler Log_Write_EKF 2017-08-23 11:19:14 +09:00
Peter Barker
8272fb8fa2 Plane: remove unused repeating events defines 2017-08-22 09:58:12 -07:00
Peter Barker
9732b19f04 Plane: move serial_control case to base class 2017-08-17 12:42:31 +01:00
Peter Barker
4321abd477 Plane: move play_tune and led_control handling to base class 2017-08-17 12:27:10 +01:00
Peter Barker
8eeae45300 Plane: use GCS_MAVLINK subclasses to handle set_mode 2017-08-16 11:58:10 +10:00
Michael du Breuil
833ec1336e Plane: Expose the AFS instance to MAVLink 2017-08-15 15:14:56 +01:00
Peter Barker
1a665280e9 Plane: remove CLI 2017-08-14 10:23:50 +09:00
Peter Barker
c6b9c84d1f Copter: remove CLI 2017-08-14 10:23:50 +09:00
Peter Barker
d33cd801a1 Plane: send gps messages as separate queued messages 2017-08-09 16:18:22 +01:00
Peter Barker
c3e86840b2 Plane: move sending of gps_raw up 2017-08-09 16:18:22 +01:00
Peter Barker
933cd7a44c Plane: move sending of system_time up 2017-08-09 16:18:22 +01:00
Peter Barker
4aee416c1d Plane: move sending of camera_feedback up 2017-08-09 16:18:22 +01:00
Peter Barker
9eb96886e5 Plane: move sending of meminfo up 2017-08-09 16:18:22 +01:00
Peter Barker
a9c866f574 Plane: use new retry_deferred method 2017-08-05 23:14:36 +01:00
Andrew Tridgell
3802e7bc3b Plane: mark version as 3.8.1-dev 2017-08-05 17:19:32 +10:00
Andrew Tridgell
6e84210d1b Plane: prepare for plane 3.8.0 release 2017-08-05 17:19:32 +10:00
Peter Barker
4cb94b80ee Plane: move try_send_message queued_param_send up 2017-08-03 14:34:33 +01:00
Peter Barker
089f6f4650 Plane: move try_send_message send_hwstatus up 2017-08-03 14:33:37 +01:00
Peter Barker
fee9e83881 Plane: move try_send_message mission handling up 2017-08-03 14:24:47 +01:00
Peter Barker
a740c10dfe Plane: move try_send_message compass message handling up 2017-08-03 14:24:46 +01:00
Peter Barker
50cbbc324b Plane: base SYS_STATUS load average on variable loop rate 2017-08-01 19:39:27 +01:00
Andrew Tridgell
9b16836da5 Plane: cope better with more RC trim/min/max values
when min > trim we need to do RC scaling via rc_config. This loses the
ability to go beyond RC limits, but that can be coped with using
MANUAL_RCMASK
2017-08-01 08:25:32 +10:00
Andrew Tridgell
99df31f6ec Plane: fixes from review
thanks Francisco
2017-08-01 08:25:32 +10:00
Andrew Tridgell
ea1a4bc176 Plane: improve px4_mixer handling of servo trim/min/max 2017-08-01 08:25:32 +10:00
Andrew Tridgell
cff692ca48 Plane: implement MANUAL_RCMASK
this replaces the functionality of the old "with input"
aileron/elevator functions, but in a much more flexible way. It means
that people who want to fly in MANAUL mode will have the ability to
have full control of trims and mixing using transmitter mixers if they
need that functionality
2017-08-01 08:25:32 +10:00
Andrew Tridgell
fedd2c558c Plane: added AETR log message
this makes debugging mixers much easier
2017-08-01 08:25:32 +10:00
Andrew Tridgell
5d91e29cea Plane: fixed px4_mixer for new function based mixing
this fixes the OVERRIDE_CHAN functionality to work correctly with the
new function based mixing code

It isn't a perfect match for ArduPilot mixing, but it is very close
for the key control surfaces, including mixed surfaces
2017-08-01 08:25:32 +10:00
Andrew Tridgell
0266168e69 Plane: removed old elevon and vtail mixers
now only use the function based mixing, and auto-convert on startup
2017-08-01 08:25:32 +10:00
Andrew Tridgell
178e7eca54 Plane: always setup target airspeed
this sets up a target airspeed even when flying without an airspeed
sensor. This is needed for quadplanes without airspeed sensors where
we use synthetic airspeed during the transition in TECS
2017-07-31 09:55:44 -07:00
Andrew Tridgell
909f109b3f Plane: don't start a transition while disarmed
this can caused flooding of the GCS console while disarmed in FBWA
mode
2017-07-30 12:39:36 -07:00
Peter Barker
1cb6962f84 Plane: move common mavlink camera handling up 2017-07-28 14:32:58 +01:00
Peter Barker
2fb46a67dd Plane: camera is responsible for taking distance-based-images and logging 2017-07-28 14:27:53 +01:00
Peter Barker
fbcd072d98 Plane: move gps inject handling up to GCS_MAVLINK 2017-07-27 12:03:25 +01:00
Patrick José Pereira
60834e9af0 Plane: Allow a second activation of parachute
The hardware can fail in the first activation,
this patch allow a second chance to active the parachute successfully.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-07-26 17:51:34 +01:00
Peter Barker
87af817893 Plane: handle common GPS messages in base GCS_MAVLINK class 2017-07-25 14:00:45 +01:00
Peter Barker
fa39f315c6 Plane: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
Peter Barker
ea892d278f Plane: remove MSG_STATUSTEXT entirely 2017-07-18 16:12:59 +01:00
Michael du Breuil
f87a69dcf2 Plane: Throttle based landing aborts should ask the landing library
Throttle based aborts should be requesting a go around from AP_Landing.
This was missed in the initial port.
2017-07-17 08:43:50 -07:00
Peter Barker
7f0cb82797 Plane: move handling of PREFLIGHT_SET_SENSOR_OFFSETS up 2017-07-17 14:17:19 +01:00
Peter Barker
6047026b11 Plane: move handling of MAG_CAL command longs up 2017-07-17 14:17:19 +01:00
Peter Barker
2b6752e0b4 Plane: move MAV_CMD_START_RX_PAIR handling to base class 2017-07-17 14:17:19 +01:00
Peter Barker
7042d3e9c9 Global: all vehicles get AP_Relay and AP_ServoRelayEvent libraries 2017-07-17 00:06:31 +01:00
Peter Barker
36eab56178 Plane: move mavlink support for servo/relay up 2017-07-16 23:56:00 +01:00
Peter Barker
3af52d9db3 Plane: add common handling of mavlink command messages 2017-07-16 23:56:00 +01:00
Michael du Breuil
b8e6ad7476 Plane: Document loop max time as being in microseconds 2017-07-15 17:27:04 +09:00
Peter Barker
983686745e Plane: move rally-point handling up 2017-07-14 01:28:05 +01:00
Peter Barker
a250f47f13 Plane: remove unneeded telemetry_delayed parameter 2017-07-12 17:01:36 +01:00
Peter Barker
c9c4b31e99 Plane: move handling of incoming statutext messages up 2017-07-12 16:52:24 +01:00
Peter Barker
c058fba5ac Plane: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Peter Barker
592729733e Copter: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Peter Barker
1be52495f1 Plane: eliminate global static GCS_MAVLINK::send_home_all 2017-07-11 23:48:39 +01:00
Peter Barker
d850feb75f Plane: move common mission handling up to GCS_MAVLINK 2017-07-11 23:45:17 +01:00
Peter Barker
250f315678 Plane: eliminate gcs_send_mission_item_reached wrapper 2017-07-11 23:45:16 +01:00
Peter Barker
3b0a7703c4 Plane: eliminate gcs_send_message wrapper 2017-07-11 23:45:16 +01:00
Peter Barker
5a8f01c19c Plane: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00
Peter Barker
685706952c ArduPlane: use Notify singleton for sending statustext 2017-07-09 17:17:29 -04:00
Peter Barker
5b3b61a2e4 Plane: move GCS functions up to superclass GCS 2017-07-07 16:18:37 +01:00
Andrew Tridgell
1d626db3b1 Plane: use scaled outputs for AFS failsafe
we need to use scaled outputs so that derived outputs (such as elevons
and vtail) have a valid input to use
2017-07-04 07:59:28 +10:00
Peter Barker
923b201025 Plane: send servos outputs after flaperon update 2017-07-04 07:59:28 +10:00
Peter Barker
38921c4f1a Plane: correct AFS terminate for rcin/servos split 2017-07-04 07:59:28 +10:00
Eugene Shamaev
b95ebadf8b ArduPlane: move of CAN parameters into separate group 2017-07-03 11:44:32 +01:00
Andrew Tridgell
b2cd5f5c06 Plane: release 3.8.0beta5 2017-07-03 11:39:48 +10:00
Andrew Tridgell
d3f9afd4e7 Plane: fixed auto-adjustment of flaperon trim 2017-07-03 11:17:42 +10:00
Andrew Tridgell
2cb511c049 Plane: deprecate old aileron_with_input and elevator_with_input
these have very rarely been used and don't work well with new trimming
mechanisms. Now treat them as ordinary ailerons/elevators
2017-07-03 11:17:42 +10:00
Andrew Tridgell
51b39ea3a1 Plane: removed ancient "mix_mode" type elevon mixing
this has been deprecated for a long time
2017-07-03 11:17:42 +10:00
Andrew Tridgell
725244ff8a Plane: implement new TRIM_AUTO functionality
this fixes TRIM_AUTO for new scaled output approach to servo functions
2017-07-03 11:17:42 +10:00
Andrew Tridgell
984e887d1d Plane: changed differential spoilers to scaled outputs
this matches new elevon, vtail and flaperon code
2017-07-03 11:17:42 +10:00
Andrew Tridgell
c9e4423997 Plane: re-implement flaperons
implement as scaled output instead of PWM output

this will break some peoples setups, but gives much easier setup and
more consistent behaviour
2017-07-03 11:17:42 +10:00
Peter Barker
1ca5f243a5 Plane: check dataflash to see if we should log backend gps messages 2017-06-29 15:43:38 +01:00
Peter Barker
949e07c7e3 Plane: use DataFlash should_log to determine raw IMU logging 2017-06-29 15:26:27 +01:00
Peter Barker
88a7167cb9 Plane: move should_log check of log bitmask into DataFlash 2017-06-29 15:26:27 +01:00
Peter Barker
5b70b688cb Plane: handle knowledge of in_log_download in DataFlash 2017-06-27 03:10:43 +01:00
Peter Barker
60ebd099bd Plane: move send-logs-via-mavlink code into DataFlash 2017-06-27 03:10:43 +01:00
Michael du Breuil
8691eae679 Plane: Handle NAV_CONTROLLER_OUTPUT.wp_dist overflowing 2017-06-20 15:41:50 +01:00
Andrew Tridgell
0b40e853c9 Plane: call set_likely_flying() 2017-06-20 09:44:44 +10:00
Peter Barker
ceec44350f Plane: move MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS handling up 2017-06-17 15:07:48 +01:00
Michael du Breuil
92cdb54176 Plane: Fix a fly away when aborting a landing
DO_LAND_START -> LAND waypoints in sequence would cause a perpetual abort state
due to the sticky nature of the abort states. If we restart a landing on
purpose while doing an abort, then we can move onto trying to land again.
2017-06-17 09:10:27 +10:00
Peter Barker
30dfd32b87 Plane: stop using in_mavlink_delay as a proxy for disabling logging 2017-06-16 17:07:48 +01:00
Peter Barker
b57a4e9685 Plane: call dataflash should_log method 2017-06-16 17:07:48 +01:00
Michael du Breuil
1d03732ac5 Plane: Remove redundant status text on MAV_CMD_DO_GO_AROUND 2017-06-16 11:49:52 +09:00
Pierre Kancir
5d0972f589 Arduplane: fix implicit cast to double warning in quadplane 2017-06-14 12:40:47 +01:00
Peter Barker
c6beb3a867 Plane: simplify dataflash initialisation 2017-06-14 12:20:29 +01:00
Peter Barker
4dc241fd22 Plane: StartUnstartedLogging replaces logging_started/start_logging 2017-06-11 20:34:12 +01:00
Peter Barker
927cc75843 Plane: simplify should_log (NFC) 2017-06-11 20:34:12 +01:00
Andrew Tridgell
1455c23230 Plane: fixed docs for tailsitter 2017-06-10 18:41:34 +10:00
Pierre Kancir
d5cc1e64ed GCS_Common: rename send_rangefinder to send_rangefinder_downward 2017-06-08 01:32:04 +01:00
Pierre Kancir
0bc9d294fb ArduPlane: change rangefinder msg for common one 2017-06-08 01:31:52 +01:00
Pierre Kancir
9a121dc7c4 ArduPlane: add DISTANCE_SENSOR support 2017-06-08 01:31:52 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
ccee841578 Plane: NFC SYS_NUM_RESETS is a read-only variable 2017-06-07 19:53:03 +09:00
Mark Whitehorn
6607dafc66 ArduPlane: change is_tailsitter() to tailsitter_active() 2017-06-07 20:21:49 +10:00
Mark Whitehorn
53b82d1d4d ArduPlane: add comments on tailsitter pitch limits 2017-06-07 20:21:49 +10:00
Mark Whitehorn
65755454e0 ArduPlane: set tailsitter VTOL pitch limits using only Q_ANGLE_MAX 2017-06-07 20:21:49 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas
14b214eb9b Plane: remove FS parameters default values macros.
They just add an un-necessary level of indirection in the code. The parameters are run-time configurable now.
2017-06-07 17:46:39 +10:00
Michael du Breuil
87c076da4d ArduPlane: Fix missing break in GCS_MAVLink
Was causing AOA_SSA to send a landing message as wel
2017-06-05 13:12:01 +09:00
Randy Mackay
f7e830cfad Plane: pixhawk mixer supports motors 9 to 12 2017-05-27 14:21:13 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
405e0bb9d9 Plane: Add missing @RebootRequired: True 2017-05-27 01:55:55 +01:00
Paulo Neves
a45dd30c1d Plane: Add MAV_CMD_DO_SET_CAM_TRIGG_DIST support. 2017-05-25 09:35:22 +09:00
Michael du Breuil
19a5475195 Plane: Send landing messages 2017-05-24 15:22:27 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
2f5f8eb323 Plane: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Michael du Breuil
92d505598b ArduPlane: Poll AP_Landing for fly forward information 2017-05-15 14:50:29 -07:00
Andrew Tridgell
92f88e9b33 Plane: fixed climb rate for quadplanes in CRUISE
the high loop rate of quadplanes led to less than 1cm/loop change in
height, which got truncated to zero. Adjusting height at 10Hz fixes
that.

Thanks to Marco for reporting this!
2017-05-10 08:03:23 +10:00
Andrew Tridgell
6eaad59115 Plane: improve vectored tailsitter takeoff
this gives extra pitch input when taking off a vectored tailsitter,
allowing the motors to point straight up for easy takeoff

thanks to Leonard for the idea!
2017-05-07 09:10:44 +10:00
Andrew Tridgell
a46799d34e Plane: removed AP_Airspeed from vehicle code 2017-05-04 22:59:02 -07:00
André Kjellstrup
21b8d3cb3d Plane: Removed scary autotakeoff message.
This message does not provide anything useful, but is rather scary to
get moments before launch.
If it's somehow meant to provide useful information, or an action "Timer
interrupted AUTO" should be replaced by something else.
2017-05-04 22:37:32 -07:00
Peter Barker
378015691b Plane: stop appending lf to PERF message 2017-05-01 16:21:55 +01:00
Peter Barker
084242cf03 Plane: move init of DataFlash references into vehicle init
It is possible to start a log before the existing codepath is crossed.
2017-05-01 15:04:34 +01:00
Andrew Tridgell
708b483d77 Plane: prepare for 3.8.0beta5 2017-05-01 20:30:32 +10:00
Andrew Tridgell
2706c9d57a Plane: use common send_queued_parameters() 2017-05-01 14:36:10 +10:00
Andrew Tridgell
351304ebcb Plane: don't set fly-forward when transitioning
when quad motors are providing assistance don't see the fly-forward
flag in the AHRS. This will lower the chance of EKF yaw confusion
2017-05-01 14:27:45 +10:00
Andrew Tridgell
3eeff938b0 Plane: call BoardConfig.init_safety() at end of startup
this fixes a bug where motors can start on soft reboot
2017-04-30 21:47:04 +10:00
Mark Whitehorn
dc10675965 ArduPlane: suppress differential thrust when throttle is zero
this prevents motors from spinning when disarming in FBWA
2017-04-28 16:08:50 -07:00
Andrew Tridgell
5a57aafb98 Plane: reduce pitch demand on takeoff on roll error 2017-04-28 16:34:33 +10:00
Andrew Tridgell
954905e0eb Plane: allow battery failsafe with usb connected
some people connect USB to allow connections from a companion
computer. The arming check is sufficient to prevent unwanted battery
failsafes when bench testing
2017-04-28 16:33:49 +10:00
Andrew Tridgell
888edcd709 Plane: fixed duplicate include of AP_ADC library 2017-04-27 18:32:26 +10:00
Andrew Tridgell
7ea0f65590 Plane: removed incorrect comment 2017-04-24 16:56:23 +10:00
Andrew Tridgell
06b0742481 Plane: fixed jump in qhover on takeoff
Z controller PID is from -1 to 1

thanks to Leonard for spotting this
2017-04-24 16:55:41 +10:00
Andrew Tridgell
b9debba509 Plane: make ground test easier for tilt 2017-04-24 16:55:41 +10:00
Andrew Tridgell
76870f8e01 Plane: improve fast/slow tilt in ground tests
when disarmed use the slow tilts so users can judge the rates it will
use in flight
2017-04-24 16:55:41 +10:00
Andrew Tridgell
aab20317a0 Plane: fixed position control in QLAND_FINAL 2017-04-24 16:55:41 +10:00
Andrew Tridgell
b1f1ace736 Plane: support vectored yaw tiltrotors
this adds support for tiltrotors which control yaw by vectoring the
forward motors. This avoids the need for the rear motor on a
tilt-tricopter to have a tilt servo
2017-04-24 16:54:41 +10:00
Andrew Tridgell
fedabd1ace Plane: added logging of quadplane desired yaw
makes analysis of takeoffs easier
2017-04-24 16:52:16 +10:00
Andrew Tridgell
2d9c3e3d93 Plane: added EKF yaw reset handling to quadplane
this follows the implementation from copter. Thanks to Leonard for the
suggestion
2017-04-24 16:52:16 +10:00
Andrew Tridgell
516bf26719 Plane: fixed QRTL change when coming from loiter
the nav controller can think we have already reached the loiter target
if we were last in a LOITER when we switch to RTL. In that case it
would switch to QRTL immediately

found by Leonard (thanks!)
2017-04-24 16:28:59 +10:00
Andrew Tridgell
be1b50d6e2 Plane: support auto trim for separate elevon and vtail channels
this supports SERVO_AUTO_TRIM=1 for elevons and vtails setup using the
new separate functions
2017-04-24 16:26:08 +10:00
Andrew Tridgell
b4ffcfa6bd Plane: added support for elevon and vtail servo functions
these make trimming and limiting servo movement easier
2017-04-24 16:26:08 +10:00
Peter Barker
b5b8620d04 Plane: log GPS detection state to DF on log startup 2017-04-23 21:04:17 +01:00
Eugene Shamaev
ca84ab36be Plane: AOA and SSA estimations are added to parameters and data logs 2017-04-19 20:48:42 +10:00
Andrew Tridgell
88e02c7b35 Plane: log the throttle mix for quadplane copter control 2017-04-19 09:08:43 +10:00
Andrew Tridgell
8e3f8f47c8 Plane: tilt motors fast in final stages of quadplane transition
when transition of tilt quadplane has reached the stage where the tilted
motors are used solely for fwd thrust and rear motors are off we should
move the tilt to full forward rapidly
2017-04-19 09:08:14 +10:00
Tom Pittenger
5b47927937 Plane: pre-launch flaps incorrectly always disabled
Pre-launch flaps are always disabled by checking current state against zero (which it always will be) instead of the param which is what it was supposed to be checking.
2017-04-18 14:40:17 -07:00
Andrew Tridgell
d5ec7b0aad Plane: fixed a sign error in the angle assist code
thanks to Leonard for finding this!
2017-04-18 22:09:22 +10:00
Andrew Tridgell
b15b11e32d Plane: always stabilize with tailsitters 2017-04-14 12:48:08 +10:00
Michael du Breuil
b850c1041f Plane: Send BATTERY_STATUS 2017-04-12 10:21:49 +09:00
Andrew Tridgell
46d910539c Plane: fixed a warning 2017-04-11 17:34:40 +10:00
Andrew Tridgell
642a6acfcb Plane: support thrust vectoring in tailsitters
adds Q_TAILSIT_VHGAIN and Q_TAILSIT_VFGAIN, allowing for thust
vectoring in both fixed wing and hover
2017-04-11 17:34:40 +10:00
Andrew Tridgell
664e41cec6 Plane: bring in demanded climb rate over 1 second
when we engage the Z controller in quadplane we bring in the climb
rate slowly to prevent a sudden change in motor demand
2017-04-09 16:45:19 +10:00
Andrew Tridgell
17ba8b3304 Plane: raise logging rate for PID and servos 2017-04-09 16:45:19 +10:00
Andrew Tridgell
0cf571d338 Plane: moved Z altitude target reset
reset alt target whenever we have not run Z controller for 2s
2017-04-09 16:45:19 +10:00
Mark Whitehorn
7679b758b0 Plane: add parameter RUDD_DT_GAIN for dual motor tailsitter
controls rudder to differential thrust mixing in FW mode
2017-04-06 08:29:44 +10:00
Michael du Breuil
876ffa351b Plane: Update L1 constructor for new arguments 2017-04-06 08:26:04 +10:00
Andrew Tridgell
acaef22416 Plane: improve transition from QSTABILIZE to FBWA or QHOVER 2017-04-05 20:00:29 +10:00
Andrew Tridgell
a9b8e4b5d3 Plane: prepare for 3.8.0beta4 2017-04-04 20:49:10 +10:00
Andrew Tridgell
36d8f730e1 Plane: setup better defaults for tailsitters 2017-04-04 10:15:08 +10:00
Andrew Tridgell
48ae2f2de0 Plane: changed default THR_MAX to 100
we have left it at 75 for far too long
2017-04-04 08:19:41 +10:00
Andrew Tridgell
6a90257d2a Plane: fixed attitude logging for tailsitters 2017-03-31 11:30:44 +11:00
Andrew Tridgell
c76eadf4f6 Plane: add available memory to PM message 2017-03-27 14:35:21 +09:00
Andrew Tridgell
5d06e4238f Plane: make the quadplane motors var_info dynamic
this will allow for more quadplane motors class types
2017-03-25 16:22:10 +11:00
Michael du Breuil
649ef0fc16 Plane: Only consider a takeoff as begun if the safety switch has been pressed 2017-03-23 16:55:47 -07:00
Andrew Tridgell
af97a3974b Plane: initialise target height correctly on quadplane transition
this fixes a bug where a plane in QSTABILIZE would drop suddenly if
switched to FBWA when the target altitude had not been initialised
2017-03-22 21:34:40 +11:00
Andrew Tridgell
bb158a437e Plane: handle bad Q_FRAME_CLASS
default to quad with a warning. This prevents users getting stuck
without being able to set Q_ENABLE=1

thanks to Leonard for noticing
2017-03-18 22:10:20 +11:00
Andrew Tridgell
e3a8d477f5 Plane: improve tiltrotor transition strategy
avoid running forward motors at high throttle when transitioning to a
VTOL mode
2017-03-14 14:42:20 +11:00
Andrew Tridgell
3f7e7d456f Plane: in fixed wing mode slave quadplane attitude rate controller
For quadplanes this uses the attitude controller from fixed wing
when using the multicopter controller to assist fixed wing
flight. This prevents a rate mismatch between the two controller
leading to oscillation
2017-03-14 14:42:20 +11:00
Andrew Tridgell
2db8589f49 Plane: smarter Z controller initialisation for quadplanes
this is more generic than the previous one used only for the full
position controller
2017-03-14 14:42:20 +11:00
Andrew Tridgell
dd4f56dd98 Plane: added PIQ messages for quadplane PIDs
keep them separate from fixed wing PIDs, so we can watch the
interaction between the PIDs in transitions
2017-03-14 14:42:20 +11:00
Andrew Tridgell
0e175179a6 Plane: log home and origin on logging start 2017-03-14 10:51:15 +11:00
Andrey Kolobov
35d406aeab Plane: added a soaring controller to Arduplane 2017-03-14 08:53:10 +11:00
Michael du Breuil
9e893eacd1 Plane: Change some user facing statustexts 2017-03-08 00:59:56 -08:00
Michael du Breuil
041fe38ba6 Plane: Update build tools for deepstall PID dependency 2017-03-02 12:38:59 +11:00
Michael du Breuil
cf10b7b841 Plane: Add support for landing PID's and servo control 2017-03-02 12:38:59 +11:00
Michael du Breuil
1bb806edb2 Plane: Use new landing interfaces 2017-03-02 12:38:59 +11:00
Andrew Tridgell
abcc75009d Plane: move relay init earlier
allows relay pins to be used as pullups for other sensors (such as
LidarLiteV3)
2017-03-01 22:44:37 +11:00
Randy Mackay
eb746eaeef Plane: fix SYSID_ENFORCE parameter description 2017-02-28 15:08:17 +09:00
Michael du Breuil
fbf6050876 Plane: Reset home to AHRS position rather then snapshotting GPS 2017-02-28 11:33:53 +11:00
Randy Mackay
c0f155fd27 Plane: use only downward facing rangefinder 2017-02-27 15:18:25 +09:00
Andrew Tridgell
4ff5bf5af5 Plane: zero integrators and set throttle mix
this zeros fixed wing integrators during TRANSITION_AIRSPEED_WAIT and
uses a zero throttle mix during TRANSITION_TIMER. This should allow
the fixed wing controller more time to adapt to forward flight
2017-02-26 09:20:51 +11:00
Andrew Tridgell
c061d5615b Plane: added manual input mask for tailsitter prop-hang
This adds new parameters Q_TAILSIT_MASK and Q_TAILSIT_MASKCH. These
parameters allow a user to use the tailsitter capabilities of a 3D
plane to teach themselves to prop-hang.

It works by allowing the user to setup a switch on their transmitter
to enable manual pass-thru of a set of the input channels to outputs
when in tailsitter hover. The user can then use that switch to allow
learning of hover control in a 3D plane one channel (or two channels)
at a time.
2017-02-26 09:20:13 +11:00
Andrew Tridgell
3bb25eb194 Plane: added Q_TAILSIT_INPUT
this allows the user to control tailsitters either in body frame (like
a plane) or in earth frame (like a multicopter). This is useful for
people wanting to learn to fly prop-hang on 3D planes
2017-02-26 09:20:13 +11:00
Andrew Tridgell
ea5186340b Plane: added Q_TILT_RATE_UP and Q_TILT_RATE_DN as separate parameters
allow control of tilt rate separately for UP and DOWN

always allow at least 90 degrees/second for switching to MANUAL
2017-02-25 17:53:26 +11:00
Tom Pittenger
4ccd59f394 Plane: allow exiting loiter_to_alt in cases where you get stuck
- check for scenarios where updrafts can keep you from loitering down indefinitely.
2017-02-23 05:15:49 -08:00
Andrew Tridgell
a4c5247fba Plane: prepare 3.8.0-beta3
key fix is the servo slew rate bug
2017-02-22 07:25:47 +11:00
Tom Pittenger
69a10042eb Plane: always stream RPM data over mavlink when enabled 2017-02-21 11:16:27 -08:00
Tom Pittenger
67486dc3f0 Plane: always log RPM when enabled 2017-02-21 04:20:01 -08:00
Peter Barker
97145f20fc Plane: fix startup of CLI menu system 2017-02-20 00:06:23 -08:00
Andrew Tridgell
07ab04897d Plane: reset roll/pitch integrators while tailsitter active
this prevents integrator buildup while flying in hover
2017-02-18 22:23:58 +11:00
Andrew Tridgell
b3380ecfa7 Plane: support twin-engine planes
with differential thrust for yaw
2017-02-18 17:26:43 +11:00
Andrew Tridgell
e8b11924f8 Plane: split out the tailsitter transition complete code
use both roll and pitch to trigger completion of transition. This
copes with situations where the plane has managed to get itself rolled
over far enough that it can't recover into hover
2017-02-18 17:26:43 +11:00
Andrew Tridgell
d5a3f844f1 Plane: changes for AC_WPNav 2017-02-18 17:26:43 +11:00
Andrew Tridgell
c787f4c56f Plane: initial support for tailsitter transitions 2017-02-18 17:26:43 +11:00
Andrew Tridgell
83f3cee99e Plane: initial hooks for tailsitter support 2017-02-18 17:26:43 +11:00
Andrew Tridgell
4e4f5a7ac9 Plane: allow tailsitters to takeoff with any attitude 2017-02-18 17:26:43 +11:00
Andrew Tridgell
0fc04b0158 Plane: setup plane frame type parameter flags 2017-02-14 19:50:01 +11:00
Andrew Tridgell
c294519925 Plane: lower default Q_M_SPOOL_TIME to 0.25 2017-02-14 09:23:17 +09:00
Peter Barker
1d7994e9ba Plane: create GCS_Plane subclass 2017-02-13 17:03:06 +11:00
Peter Barker
98c4b48161 Plane: not in log download upon log erase
erase is a synchronous operation
2017-02-13 11:36:16 +11:00
Peter Barker
49bf336539 Plane: Support for a GCS singleton 2017-02-13 09:32:01 +11:00
Peter Barker
d060670ba3 Plane: rename gcs[] to gcs_chan[]
Wish to use gcs() to return the gcs singleton
2017-02-13 09:32:01 +11:00
Michael du Breuil
29b16dbafd Plane: Refactor to request relative altitudes from AHRS
Removes the need for plane to do the math for finding the relative height.

Also caches the value at the same time we update current_loc, which is a
non behaviour change as that was the only time you could see a change in
the relative height propegate through the system anyways
2017-02-13 09:23:14 +11:00
Michael du Breuil
f183a2618f Plane: Don't lock home altitude to AHRS origin 2017-02-13 09:23:14 +11:00
Michael du Breuil
7a1cbf76d3 Plane: Remove ALT_MIX
Closes #4998, and fix a tab/spaces error on the previous parameter
2017-02-13 09:18:52 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
c4419739c4 Plane: rename MSG_RADIO_OUT to MSG_SERVO_OUTPUT_RAW to better describe what it is 2017-02-07 11:41:12 +11:00
Andrew Tridgell
90d9e74054 Plane: fixed parameter path 2017-02-06 15:12:32 +11:00
Andrew Tridgell
287614b415 Plane: fixed auto-takeoff throttle trigger for inverted launch
quite an unusual setup, but has been done :-)
2017-02-01 16:31:49 -08:00
Tom Pittenger
9abb0bba7f Plane: use abs() instead of labs() for int16 2017-01-30 10:43:54 -08:00
Michael du Breuil
2326eee9a0 Plane: Move loiter_radius to vehicle 2017-01-30 10:43:54 -08:00
Andrew Tridgell
5baf37f7a3 Plane: release 3.8.0beta2 2017-01-30 10:29:01 +11:00
priseborough
013eb254a2 Plane: use standard unit descriptor for milliseconds 2017-01-27 16:57:42 +09:00
murata
2492b9db7e Plane: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Tom Pittenger
1a34221db9 Plane: remove old commented code
- leftover from the AP_Landing stage refactor
2017-01-26 13:45:28 -08:00
Tom Pittenger
bdafc2c025 AP_Landing: re/move complete flag into backend
the complete flag was only ever true during FLIGHT_LAND_FINAL so we just check for that now instead
2017-01-26 13:11:45 -08:00
Michael du Breuil
4cf1c74c62 AP_Landing + Plane: Check for land complete before requesting disarm 2017-01-26 13:11:44 -08:00
Tom Pittenger
2ccd91d88f AP_Landing: rename stage enum 2017-01-26 13:11:44 -08:00
Tom Pittenger
650e694eb1 Plane: move landing.reset to landing.do_land() 2017-01-26 13:11:44 -08:00
Tom Pittenger
61bc0a6206 Plane: check stage==LAND instead of landing.in_progress 2017-01-26 13:11:44 -08:00
Michael du Breuil
3e66dd10d7 Plane: Move landing stages inside AP_Landing and refactor 2017-01-26 13:11:44 -08:00
Tom Pittenger
b570c11e26 AP_Landing: allow separate handling for verify_land() vs verify_abort() 2017-01-26 13:11:43 -08:00
Tom Pittenger
e709705ab8 Plane: describe flight stages without using specific stage name 2017-01-26 13:11:43 -08:00
Tom Pittenger
6c0296ba13 AP_Landing: shadow copy of plane flight_stage into landing
.. and describe stages without using specific stage name
2017-01-26 13:11:43 -08:00
Andrew Tridgell
07cedd8a66 Plane: prevent stability shutdown in transition
this prevents the vertical motors from shutting down while
transitioning if the desired throttle was too low at the start of the
transition
2017-01-25 19:01:15 +11:00
Andrew Tridgell
0d4405106f Plane: removed forcing of trim for motors in quadplane
this caused problems with tricopter tail servos
2017-01-25 19:01:15 +11:00
Andrew Tridgell
5c820adad4 Plane: fixed tilt transition with binary tilt servo
once the tilt is fully fwd then force transition as done at any
airspeed
2017-01-25 19:01:15 +11:00
Andrew Tridgell
586f8a9ca8 Plane: fixes for tilt quadplane after rebase 2017-01-25 19:01:15 +11:00
Andrew Tridgell
2feaa9926c Plane: prevent fwd motor when throttle in dead zone for tiltrotor
otherwise we end up with the SPIN_ARMED value
2017-01-25 19:01:15 +11:00
Andrew Tridgell
54bca768b8 Plane: added Q_TILT_TYPE for retract servo tiltrotors 2017-01-25 19:01:15 +11:00
Michael du Breuil
f017073077 Plane: Report battery failsafes via sys_status 2017-01-25 09:26:19 +09:00
Randy Mackay
fc4741395d Plane: notify initialised after parameters loaded 2017-01-23 15:07:21 -08:00
Randy Mackay
fad2ba608f Plane: send flight mode string to Notify 2017-01-23 15:07:21 -08:00
Randy Mackay
af514eb101 Copter: remove some comments 2017-01-23 15:07:20 -08:00
Dmitry Prokhorov
497a4bd4a5 ArduPlane: Support for OLED display by Alexey Kozin
https://github.com/ArduPilot/ardupilot/pull/5135
2017-01-23 15:07:20 -08:00
Randy Mackay
e906310b71 Plane: rudder_arming moved to AP_Arming_Plane 2017-01-17 11:45:08 +09:00
Randy Mackay
7cc8b7232c Plane: rename arming_checks to AP_Arming 2017-01-17 11:45:08 +09:00
Peter Barker
fc28beacea Plane: AP_Arming: use callback in place of variable reference for home state 2017-01-17 11:45:08 +09:00
Tom Pittenger
b8784e2c4a Plane: do not crosstrack after a land abort 2017-01-12 15:21:34 -08:00
Andrew Tridgell
3338b4295e Plane: use reload_defaults_file() 2017-01-12 17:39:37 +11:00
Andrew Tridgell
2f100b0804 Plane: removed separate tricopter quadplane build
can all be done with one build now
2017-01-12 17:39:37 +11:00
Andrew Tridgell
68504dbcbb Plane: auto-upgrade old parameters for SRV_Channel split 2017-01-12 17:39:37 +11:00
Andrew Tridgell
cb4ebdd7b4 Plane: fixed throttle_percentage()
thanks to Buzz for noticing!
2017-01-12 17:39:37 +11:00
Andrew Tridgell
6b4e5304cf Plane: fixed mixer outputs 2017-01-12 17:39:37 +11:00
Andrew Tridgell
1879eddfa0 Plane: adjust for limit_slew_rate API change 2017-01-12 17:39:37 +11:00
Andrew Tridgell
081909bf6a Plane: removed use of pwm_to_angle() 2017-01-12 17:39:37 +11:00
Andrew Tridgell
b83f50be0f Plane: use new SRV_Channels API 2017-01-12 17:39:37 +11:00
Tom Pittenger
9a250c3bf4 Plane: clarify some variable names and protect against divide-by-zero 2017-01-06 17:35:44 -08:00
Eugene Shamaev
ac2880db7c Plane: waypoint logic change for overflow/underflow 2017-01-06 17:35:44 -08:00
Peter Barker
af9729c126 Plane: correct compilation when parachute disabled 2017-01-02 20:39:03 -08:00
Peter Barker
d40187fac7 Plane: correct compilation when geofence disabled 2017-01-03 00:37:28 +00:00
Peter Barker
4865bec871 Plane: correct compilation when logging disabled 2017-01-02 16:01:29 +09:00
Tom Pittenger
063f517424 Plane, TECS, AP_Landing: rename stage LAND_ABORT to ABORT_LAND
this will reduce confusion when searching for FLIGHT_LAND_* and you get a bunch of takeoff related hits. It will also make more sense when the landing library fully manages the FLIGHT_LAND stage entirely because it will not mange FLIGHT_LAND_ABORT
2016-12-30 23:50:03 -08:00
Tom Pittenger
04f32b6ec6 Plane: simplify flight stage landing check to use landing.in_progress 2016-12-30 23:50:03 -08:00
Tom Pittenger
84e11fd899 Plane, AP_TECS: do not pass auto_land flag to TECS, it already knows it 2016-12-30 23:50:03 -08:00
Tom Pittenger
c286ceba43 Plane: move enum FlightStages to AP_Vehicle::FixedWing 2016-12-30 23:50:03 -08:00
Tom Pittenger
90b2458a27 Plane: remove redundant flightstage update 2016-12-30 23:44:20 -08:00
Andrew Tridgell
1c4bf77cf6 Plane: added custom conversion of Q_FRAME_CLASS parameter 2016-12-31 10:56:01 +09:00
Randy Mackay
934ef55338 Plane: quadplane instantiates motor matrix outside of case
Thanks to khancyr for noticing this
2016-12-31 10:55:23 +09:00
Randy Mackay
c6dec5c3f6 Plane: quad plane uses consolidated multicopter classes 2016-12-31 10:55:23 +09:00
Andrew Tridgell
4cf509a693 Plane: fixed EKF3 logging 2016-12-19 08:07:14 +11:00
priseborough
38ad778ff1 make.inc: Add EKF3 and remove EKF1 library from make.inc files 2016-12-19 08:07:10 +11:00
priseborough
38a0e8a6ae ArduPlane: Add EKF3 and remove EKF1 2016-12-19 08:07:09 +11:00
Tom Pittenger
b7b56b94a3 Plane: convert landing.complete to landing.is_complete() 2016-12-14 04:32:30 -08:00
Tom Pittenger
4b683edac9 Plane: simplified logic where landing complete overrides the calc value 2016-12-14 04:32:30 -08:00
Tom Pittenger
83f0a8114b Plane: use a common reset for uniform landing wipe 2016-12-14 04:32:30 -08:00
Tom Pittenger
8c1509ad47 Plane: abstract land abort request method 2016-12-14 04:32:30 -08:00
Andrew Tridgell
3dcf4cfb55 Plane: removed resetting integrators on mode change
this removes the zero of roll, pitch and yaw integrator on mode
change, now only doing the steering integrator.

The zeroing was from the early days when our controllers were not as
good. It should not be needed any more.
2016-12-14 20:22:56 +11:00
Randy Mackay
c3b6fd4315 Plane: fix suppressing comment for case fall through
No functional change
eclipse stops complaining if no-break is used in place of fall-through
2016-12-14 13:22:15 +09:00
Randy Mackay
4efbc29490 Plane: pass HIL_GPS to gps driver 2016-12-08 15:52:26 +09:00
Tom Pittenger
a3ccca17ff Plane: use fabsf instead of fabs 2016-12-06 17:38:47 -08:00
Tom Pittenger
b299b9c0bb Plane: abstract out init_start_nav_cnd work to landing lib
This reverts commit 1380a35f70.
2016-12-06 03:45:14 -08:00
Peter Barker
669dc01b67 Plane: correct on_flight_line landing stage check 2016-12-06 03:24:41 -08:00
Andrew Tridgell
1380a35f70 Revert "Plane: abstract out init_start_nav_cnd work to landing lib"
This reverts commit e2288d5262.

doesn't build
2016-12-06 17:32:02 +11:00
Tom Pittenger
e2288d5262 Plane: abstract out init_start_nav_cnd work to landing lib 2016-12-05 18:44:02 -08:00
Andrew Tridgell
1e691cdefc Plane: fixed build 2016-12-05 16:51:49 -08:00
Pierre Kancir
da1f784e78 Plane : quadplane change to float to avoid the loss of a fractional part 2016-12-05 12:39:31 -08:00
Michael du Breuil
da400dc643 Plane: Add compass cal capability bit 2016-12-04 19:17:01 -08:00
Tom Pittenger
9dd46aa03a Plane: post msg if aborting via throttle
fixes https://github.com/ArduPilot/ardupilot/issues/4906
2016-12-02 17:40:01 -08:00
Tom Pittenger
696828c144 Plane: increase landing airspeed scaled to headwind 2016-12-02 15:35:28 -08:00
Randy Mackay
d95baf51c9 Plane: include AP_Beacon 2016-11-30 17:57:01 +09:00
Randy Mackay
d9462d5dbc Plane: remove call to EKF1 logging 2016-11-30 17:57:00 +09:00
Randy Mackay
3587961be6 Plane: add AP_Beacon to build 2016-11-30 17:56:59 +09:00
Peter Barker
f712dd5d7e Plane: add arming check for logging actually started 2016-11-29 15:14:09 -08:00
Peter Barker
784da9d1eb Plane: check CardInserted in AP_Arming 2016-11-29 15:14:09 -08:00
Peter Barker
98b5ab4656 Plane: remove incorrect comment about logging/in_mavlink-delay 2016-11-29 15:14:09 -08:00
Peter Barker
d11578f203 Plane: do not reset LOG_BITMASK when no CardInserted
This really just confuses everyone
2016-11-29 15:14:09 -08:00
Peter Barker
17f5ef4610 Plane: inform dataflash of vehicle arm state 2016-11-28 09:42:09 -08:00
Tom Pittenger
dc85ffa834 Plane: move jump_to_landing_sequence() to AP_Mission 2016-11-25 19:07:30 -08:00
Tom Pittenger
ac1dced3bf Plane: set landing params as private and use accessors 2016-11-25 19:07:30 -08:00
Tom Pittenger
6544afbcba Plane: Migrate the rest of "LAND_" params from Plane to AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger
8a5a62cfdc Plane: migrate aparm "LAND_" params from plane to AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger
9f184a1490 Plane: migrate aparm "LAND_" params from plane to AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger
bfbfc3ea3d Plane: migrate aparm "LAND_" params from plane to AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger
fa991297db Plane: create new "LAND_" param block for AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger
e919afad1e Plane: update comment and remove redundant work
- update_flight_stage is already called within restart_landing_sequence()
2016-11-25 19:07:30 -08:00
Tom Pittenger
1b0a263761 Plane: remove landing.cpp entirely 2016-11-25 19:07:30 -08:00
Tom Pittenger
fc2f518f31 Plane: revert auto_state.checked_for_autoland back to Plane 2016-11-25 19:07:30 -08:00
Tom Pittenger
db42252168 Plane: port the rest of plane/landing.cpp to AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger
9a79b79f1e AP_Landing: port more from plane 2016-11-25 19:07:30 -08:00
Tom Pittenger
10027b21d6 Plane/AP_Landing: port setup_landing_glide_slope() 2016-11-25 19:07:30 -08:00
Tom Pittenger
f556f705e6 Plane: move various g params to aparms 2016-11-25 19:07:30 -08:00
Tom Pittenger
5dbb2d4c2a Plane: move two functions out of landing.cpp
- these two functions will be hard to port to AP_Landing due to complex dependancies so we'll defer them by moving them ArduPlane.cpp
2016-11-25 19:07:30 -08:00
Tom Pittenger
d2376b7c8b Plane: migrate two helper functions to AP_Landing
- move functions restart_landing_sequence() and jump_to_landing_sequence() to AP_Landing
- NOTE: jump_to function can not set mode, so it is now done externally in vehicle
2016-11-25 19:07:30 -08:00
Tom Pittenger
896b931a7c Plane: Move auto_state variables to AP_landing members 2016-11-25 19:07:30 -08:00
Tom Pittenger
61b02cb41d AP_Landing: add new library for fixed wing landing abstraction 2016-11-25 19:07:30 -08:00
Tom Pittenger
ce8db1fdba Plane: move struct Rangefinder_State to AP_Vehicle 2016-11-25 19:07:30 -08:00
Tom Pittenger
0ffeed644c Plane: remove define RANGEFINDER_ENABLED - always enabled 2016-11-25 19:07:30 -08:00
murata
0ee8edc29d Plane: Change from printf statement to print, println statement. 2016-11-25 15:57:15 -08:00
Francisco Ferreira
4c8d151190 Plane: support MAV_CMD_ACCELCAL_VEHICLE_POS 2016-11-15 11:42:54 -08:00
Michael du Breuil
4dae7a6f3d Plane: Simplify parameters
Remove a lot of cases where @Values and @Bitmask were encoding the same
information. @Value should only be used with @Bitmask when it is being
used to present a series of reasonable defaults that is some hybrid of
the @Bitmask fields. Enumerating each bit as 1, 2, 4, 8 is of no value.
2016-11-13 11:53:19 -08:00
Andrew Tridgell
5ed8418305 Plane: move radio init after boardconfig init
to ensure px4io is setup first
2016-11-13 14:55:35 +11:00
Tom Pittenger
d12a55f33c Plane: fixed spelling
fixed spellling in gcs msg
2016-11-11 01:17:59 -08:00
Andrew Tridgell
cb57945e9e Plane: use handle_common_message() 2016-11-09 17:08:09 +11:00
floaledm
6dc71beb1e Plane: move AP_Frsky_Telem for waf to ardupilotwaf 2016-11-08 07:42:39 +11:00
floaledm
b2a6b93d30 Plane: send ahrs groundspeed estimate instead of GPS groundspeed in VFR_HUD message 2016-11-07 09:14:28 +11:00
floaledm
bae9ce20c1 Plane: update sensor status error flags independently of sending a sys_status message 2016-11-02 08:36:58 +11:00
murata
ab99ea54eb Plane: To nullptr from NULL. 2016-10-29 10:32:05 -03:00
Peter Barker
98ae6c776a Plane: support for AP_Stats (flight time, bootcount, runtime) 2016-10-29 14:53:25 +09:00
Peter Barker
33b7750c7d Plane: remove duplicate parameter metadata 2016-10-27 09:15:03 -07:00
Andrew Tridgell
b65c559558 Plane: updates for EKF API changes 2016-10-27 17:09:06 +11:00
priseborough
72db2ebd81 Plane: Add compensation for optical flow sensor body position offset 2016-10-27 14:54:42 +11:00
expntly
0d1e50b50b Plane: fix typo, check wp_nav is initialized 2016-10-27 14:39:50 +11:00
Michael du Breuil
fd24e944b8 Plane: Allow compass calibrator to manage size of buffer 2016-10-27 14:04:33 +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
Andrew Tridgell
5ac62c27e2 Plane: reduce change of false rangefinder readings triggering a flare
This doesn't count repeated readings towards the rangefinder count,
and resets the counter if the change is more than 20% of full
range. This greatly reduces the impact of poor sonar sensors for
landing
2016-10-23 15:53:12 +11:00
Andrew Tridgell
32a74e37d2 Plane: update version to 3.8.0beta1 2016-10-21 13:16:36 +11:00
Andrew Tridgell
8dd122e6df Plane: updated release notes for 3.7.1 2016-10-21 13:15:51 +11:00
Ricardo de Almeida Gonzaga
3d1db89655 ArduPlane: Fix typos 2016-10-20 08:14:37 -07:00
Andrew Tridgell
15d6c77087 Plane: fixed vtail rudder only planes 2016-10-20 17:49:05 +11:00
Tom Pittenger
350ed20460 Plane: ensure rangefinder last_time resets
ensure rangefinder_state.last_correction_time_ms resets to zero via memset(&rangefinder_state, 0..)
2016-10-17 14:34:00 -07:00
William Liu
8a64106faa Plane: return false when throttle is not suppressed 2016-10-17 09:50:25 +11:00
Ferrin Benjamin Katz
38581669ec Plane: slow down home update
Moved the code theat updates the home position while the aircraft is
unarmed from 10hz loop to one second loop and ensured that is does not
update more then once every 5 seconds. Closes issue 4311.
2016-10-17 09:50:25 +11:00
Andrew Tridgell
c3aaff122b Plane: fixed startup order of setting mavlink system ID 2016-10-17 09:20:55 +11:00
Andrew Tridgell
5724aef8b3 Plane: support automatic servo trimming
now that we have separated RC input from servo output with
SERVO_RNG_ENABLE=1 we can do full automatic servo trimming as an
option
2016-10-16 15:20:47 +11:00
Andrew Tridgell
70375720f3 Plane: fixed throttle slew handling with SERVO_RNG_ENABLE=1 2016-10-15 21:42:39 +11:00
Andrew Tridgell
29f4fe2398 Plane: fixed accel based launch with timer enabled
when both timer and accel set should meet both conditions
2016-10-15 21:42:38 +11:00
Andrew Tridgell
6878a9a270 Plane: use handle_rc_bind 2016-10-15 21:42:38 +11:00
Andrew Tridgell
3a8e38ee12 Plane: added SYSID_ENFORCE parameter
this allows safer sharing of telemetry links between aircraft
2016-10-15 17:12:13 +11:00
Andrew Tridgell
be1109174e Plane: apply elevon and vtail mixers after SRV_Channel remap
this is needed to ensure that changes in RCn_MIN/MAX don't cause
changes in the output handling for elevon nd vtail planes
2016-10-15 16:59:36 +11:00
Andrew Tridgell
a369b4833a Plane: fixed throttle channel during startup failsafe 2016-10-15 16:59:36 +11:00
Andrew Tridgell
d49f50db4b Plane: don't output aux channels on termination 2016-10-15 16:59:36 +11:00
Andrew Tridgell
856b4f4d14 Plane: disable AUX passthrough during termination 2016-10-15 16:59:36 +11:00
Andrew Tridgell
57ddc8f58f Plane: use SRV_Channels set_esc_scaling()
this fixes throttle range on Disco with SERVO_RNG_ENABLE=1
2016-10-15 16:59:36 +11:00
Andrew Tridgell
fcd98e2c44 Plane: implement AUTO_TRIM for SERVO_RNG_ENABLE=1
automatically adjust servo trims
2016-10-15 16:59:35 +11:00
Andrew Tridgell
a23c373f16 Plane: fixed servo mixing for AFS and failsafe case 2016-10-15 16:59:35 +11:00
Andrew Tridgell
8170df7ba8 Plane: added servo remapping object 2016-10-15 16:59:35 +11:00
Andrew Tridgell
c7f738c284 Plane: separate out the output channel mixing
this provides a framework for other output mixing types
2016-10-15 16:59:35 +11:00
Andrew Tridgell
eb67c97bb2 Plane: split out flap output functions 2016-10-15 16:59:34 +11:00
Andrew Tridgell
a2cdd75870 Plane: removed THROTTLE_OUT define
this can be achieved with THR_MAX parameter instead
2016-10-15 16:59:34 +11:00
Andrew Tridgell
40c6ebf61a Plane: refactor more of servos output code to be easier to read 2016-10-15 16:59:34 +11:00
Andrew Tridgell
6aa3ded666 Plane: split main servo output functions into a separate file 2016-10-15 16:59:34 +11:00
Andrew Tridgell
b5a2bf2c6f Plane: only revert a tuning parameter if it has been set
fixes a 2nd transmitter tuning bug found by expntly
2016-10-14 08:34:54 +11:00
Randy Mackay
f0f4322500 Plane: add AP_Proximity to build
Required because quadplane uses copter's navigation libraries which interact with AC_Avoidance which now supports AP_Proximity
2016-10-13 20:21:07 +09:00
Randy Mackay
574976a3b7 Plane: include AP_Proximity in quadplane 2016-10-13 20:21:07 +09:00
Andrew Tridgell
70265f9100 Plane: fixed bug in transmitter tuning
This bug affects transmitter tuning of parameters that have never been
saved to eeprom and don't have a default value in the AP_Param
tables. When reverting these parameters became zero which could lead
to a crash

many thanks to expntly for finding this bug!
2016-10-13 22:08:13 +11:00
Andrew Tridgell
a2aa89dc1e Plane: deprecate RC_CHANNELS_RAW 2016-10-13 21:23:56 +11:00
Andrew Tridgell
0445b51143 Plane: fixed throttle slew rate in manual for quadplanes 2016-10-12 09:55:37 +11:00
Michael du Breuil
05d0696b0d Plane: Support GPS_RTCM_DATA 2016-10-11 11:00:36 +11:00
Andrew Tridgell
2b144d5c3d Plane: allow rudder arming in CRUISE and FBWB modes 2016-10-08 08:01:55 +11:00
murata
b3eecb87ac Plane: To define the same wording. 2016-10-06 10:03:23 -07:00
Andrew Tridgell
cb61840ad2 Plane: tell TECS to use synthetic airspeed during transition 2016-10-05 11:52:52 +11:00
murata
2f18d1de73 Plane: To add a judgment of 0 degrees longitude. 2016-10-04 08:15:23 -07:00
Andrew Tridgell
4e017bf5b3 Plane: fixed loiter mode when Q_GUIDED_MODE=1
This fixes the fixed wing behaviour of LOITER mode whne
Q_GUIDED_MODE=1.

Many thanks to the PertUAV team for finding and reporting this bug
2016-10-01 08:37:17 +10:00
Lucas De Marchi
0f000efc6f ArduPlane: Fix use of logical op instead of bitwise op
../../ArduCopter/GCS_Mavlink.cpp: In member function 'void Copter::send_extended_status1(mavlink_channel_t)':
../../ArduCopter/GCS_Mavlink.cpp:281:37: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
     uint32_t sensors_error_flags = !control_sensors_health & control_sensors_enabled & control_sensors_present;
                                     ^
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors

Thanks to Ralph Campbell <ralphcampbell1@gmail.com> for the bug report.
2016-09-29 11:36:23 -03:00
Andrew Tridgell
841828541d Plane: fixed auto ICE engine cut in QLAND final 2016-09-29 05:18:55 +10:00
Pierre Kancir
64a2fca812 Arduplane: simply invalid cmd msg 2016-09-27 07:45:48 -07:00
Pierre Kancir
04ee4141e0 ArduPlane: uniformize verify_command
Add all handle message,
Change MAV_CMD_NAV_ROI to MAV_CMD_DO_SET_ROI
Reformate comments,
2016-09-27 07:45:48 -07:00
Andrew Tridgell
6d09897b19 Plane: fixed VTOL motor termination in AFS 2016-09-27 11:53:45 +10:00
Peter Barker
31321b3b60 Plane: log to dataflash statustext messages from my_gcs 2016-09-26 00:06:07 -07:00
Tom Pittenger
94f83c3e78 Plane: frsky telem init to utilize default arguments 2016-09-25 10:42:02 -07:00
floaledm
4f6a8a017c Plane: consolidate into a single frsky.init() 2016-09-25 10:42:02 -07:00
floaledm
68df5b7606 Plane: change sensor health check to prevent false positive 2016-09-22 13:56:59 -05:00
Tom Pittenger
b8d53e1c58 Plane: change how is_flying bool is assignment in fysky lib
Florent had this correct on his PR but I incorrectly advised him to change it. This commit changes it back to his original method which was correct.
2016-09-21 15:38:58 -07:00
floaledm
0b666d4933 Plane: Plane support for Frsky passthrough protocol 2016-09-21 12:12:37 -07:00
Andrew Tridgell
dac7f45326 Plane: fixed use of multicopter mix_max
we need a settable mix_max for some vehicles
2016-09-21 12:23:19 +10:00
Andrew Tridgell
08dc5fab12 Plane: fixed pilot throttle based motor test 2016-09-15 18:09:35 +10:00
Andrew Tridgell
d6890495aa Plane: added swapped channel version of elevon/vtail/flaperon output
this makes it possible to setup an elevon plane without changing the
transmitter reversals
2016-09-14 11:48:05 +10:00
Andrew Tridgell
9b83781b4f Plane: fixed mixer arming error with FMUv4
thanks to Tim Gold for reporting this
2016-09-11 08:25:40 +10:00
Andrew Tridgell
2e240699e6 Plane: final release notes for 3.7.0 2016-09-09 10:13:38 +10:00
Tom Pittenger
e13d5fa0bf ArduPlane: updated Mixer error message 2016-09-06 00:25:15 -07:00
Michael du Breuil
f0247a7be1 Plane: always check that the mixer has been configured as arming check 2016-09-06 00:03:13 -07:00
Michael du Breuil
d0da7411b2 Plane: Fetch mixer status for assessing mixer success 2016-09-06 08:42:16 +10:00
Andrew Tridgell
d50bf93ac9 Plane: update 3.7.0 release notes 2016-09-06 07:11:13 +10:00
Michael du Breuil
2843e266b5 Plane: Return RESULT_FAILED for GET_CMD_HOME if home is unset 2016-09-03 16:54:14 +09:00
Andrew Tridgell
d149a2e613 Plane: updated release notes for 3.7.0 2016-09-02 16:52:24 +10:00
Andrew Tridgell
6849f2223d Plane: set initial alt target on takeoff completion
this prevents a sudden motor spike at the start of the transition
2016-09-02 11:12:19 +10:00
Randy Mackay
3052e8f80b Plane: quadplane calls attitude control parameter check 2016-09-02 09:27:19 +09:00
Andrew Tridgell
47c030c4a8 Plane: prepare for 3.7.0beta1 release 2016-08-30 08:39:56 +10:00
Andrew Tridgell
3d0516fd57 Plane: added Q_ASSIST_ANGLE
this automatically provides quadplane assistance if the angular error
is over the given value for 1 second while flying faster than
Q_ASSIST_SPEED
2016-08-30 08:35:18 +10:00
Andrew Tridgell
33f17588b2 Plane: added auto fence enable on VTOL takeoff
fixes issue#724
2016-08-29 18:04:42 +10:00
Andrew Tridgell
c81d8364ac Plane: check for safety switch state in quadplane motor output
get_soft_armed() will be false if safety on
2016-08-29 17:55:35 +10:00
Randy Mackay
d3f8b1b846 Plane: TELEM_DELAY parameter range to 30sec
No functional change
2016-08-29 15:29:18 +09:00
Andrew Tridgell
a0fb426a34 Plane: fixes for Fraky_Telem API changes 2016-08-25 10:16:20 +10:00
Andrew Tridgell
a5f20d8c44 Plane: fix for AP_FrSky_Telem API change 2016-08-25 10:16:19 +10:00
floaledm
43006a31a3 Plane: compatibility with revised AP_Frsky_Telem class 2016-08-25 10:16:18 +10:00
floaledm
71921f3aa4 Plane: removed frsky_telemetry_send scheduled task 2016-08-25 10:16:17 +10:00
murata
e6bef2526c Plane: By multiple bit synthetic, can this method once access. 2016-08-24 11:27:27 -03:00
murata
0e17cff099 Plane: if statements is simple. 2016-08-24 11:26:28 -03:00
Gustavo Jose de Sousa
b8e518a533 waf: use ap_library tool
That way we avoid recompiling source files that don't depend on vehicles.
Change notes:
- UTILITY_SOURCE_EXTS: moved to ap_library
- Task generators indexes: ap_library handles that now and in a better way
- Use of AP_STLIB_FEATURES: it doesn't make sense anymore, since the stlib
  taskgen has empty source list
- Flags and defines: passed down to ap_library through AP_LIBRARIES_OBJECTS_KW
- Set use='mavlink' in AP_LIBRARIES_OBJECTS_KW instead of calls to
  bld.ap_stlib().
2016-08-24 10:46:23 -03:00
Andrew Tridgell
d26af6c25b Plane: change is_flying() groundspeed threshold to 1.5m/s 2016-08-23 12:50:41 +10:00
Andrew Tridgell
cbbc4d6774 Plane: don't flare due to crash detection unless crash detection enabled
this fixes the issue in this bug report:

http://discuss.ardupilot.org/t/auto-landing-bug-crash-with-3d-video-and-logs-ardupilot-3-6-0
2016-08-23 12:19:03 +10:00
Tom Pittenger
2da33e41e9 Plane: add Avoid_ADSB support to plane 2016-08-17 22:38:54 -07:00
Tom Pittenger
b187e1f9a6 Plane: add reason to set_mode() 2016-08-17 22:38:54 -07:00
Tom Pittenger
285e41bac6 Plane: add avoidance_adsb framework for object avoidance 2016-08-17 22:38:54 -07:00
Tom Pittenger
399fa195bb Plane: add comment to FLTMODE param to include AVOID_ADSB 2016-08-17 22:38:54 -07:00
Tom Pittenger
ca32bcc58d Plane: add new flight mode AVOID_ADSB to mimic GUIDED 2016-08-17 22:38:54 -07:00
Tom Pittenger
c4460a285c Plane: remove adsb sensor library based avoidance
adsb based avoidance has been moved to AP_Avoidance library
2016-08-17 22:38:54 -07:00
Tom Pittenger
8b021c2498 Plane: pre-arm check includes adsb failsafe 2016-08-17 22:38:54 -07:00
Tom Pittenger
fa326de7fa Plane: add adsb to failsafe structure and report in heartbeat to GCS 2016-08-17 22:38:54 -07:00
Tom Pittenger
b564616db0 Plane: GCS_MAVLink passes packets to AP_Avoidance
This allows treating GLOBAL_POSITION_INT packets from other vehicles in the same way as ADSB packets
2016-08-17 22:38:54 -07:00
Tom Pittenger
46ec812d6c Plane: add AP_Avoidance to build 2016-08-17 22:38:54 -07:00
Tom Pittenger
7445fac577 Plane: move mavlink msg handling into library 2016-08-16 16:33:36 -07:00
Andrew Tridgell
d482c7f4b7 Plane: decode correct ADSB packet 2016-08-16 16:33:36 -07:00
Andrew Tridgell
c4c7a3051a Plane: added support for secondary throttles 2016-08-16 16:14:48 +10:00
Andrew Tridgell
7ce7eb5a60 Plane: added Q modes to parameter docs 2016-08-16 13:15:41 +10:00
Andrew Tridgell
b29b609bcc Plane: added AFS support for quadplanes 2016-08-16 12:56:12 +10:00
Andrew Tridgell
adb5a3ee1f Plane: re-work AFS for new AP_AdvancedFailsafe API 2016-08-16 12:55:51 +10:00
Andrew Tridgell
5d6dfd927b Plane: changes for AP_AdvancedFailsafe naming 2016-08-16 12:55:50 +10:00
Andrew Tridgell
b357a254f6 Plane: use force_safety_no_wait() when re-enabling safety off in mixer 2016-08-16 12:53:34 +10:00
Andrew Tridgell
31fb4cc427 Plane: force trims for VTOL motors 2016-08-16 12:53:34 +10:00
Andrew Tridgell
76b6cbbda1 Plane: prevent motor startup on reboot in quadplanes
we need to prevent RC overrides within px4io from running
2016-08-16 12:53:34 +10:00
Peter Barker
cb7686001f Plane: add dataflash as a bit for the mavlink SYS_STATUS message 2016-08-11 17:48:44 -03:00
Andrew Tridgell
82382a7e9c Plane: changed startup order
this allows BoardConfig to report errors in a way that allows for
BRD_TYPE to be changed by the user
2016-08-10 19:54:01 +10:00
Tom Pittenger
e0136dc545 Plane: remove AP_Vehicle::FixedWing dependency in ap_airspeed 2016-08-08 00:02:42 -07:00
Tom Pittenger
f85fc7c1dc Plane: pass in max airspeed via function call instead of using aparm 2016-08-08 00:02:42 -07:00
Tom Pittenger
fc50f145ce Revert "ArduPlane: Convert references to AP_Airspeed. Added automatic migration of ARSPD_FBW_MIN and ARSPD_FBW_MAX (plane parameter) to ARSPD_FBW_MIN and ARSPD_FBW_MAX (library parameter)."
This reverts commit da1b18d918.
2016-08-07 17:54:24 -07:00
Tom Pittenger
8dad05d12e Revert "Airspeed: store reference in libraries and populate it"
This reverts commit c090ba2257.
2016-08-07 17:54:24 -07:00
Tom Pittenger
5fd3c79202 Plane: Fix typos 2016-08-04 11:42:41 -07:00
Ricardo de Almeida Gonzaga
7a9fe95ccb ArduPlane: Fix typos 2016-08-04 11:41:18 -07:00
Tom Pittenger
c090ba2257 Airspeed: store reference in libraries and populate it
- also had to move the initial definition in plane.h so it happened before the others.
2016-08-04 11:06:44 -07:00
AndersonRayner
da1b18d918 ArduPlane: Convert references to AP_Airspeed. Added automatic migration of ARSPD_FBW_MIN and ARSPD_FBW_MAX (plane parameter) to ARSPD_FBW_MIN and ARSPD_FBW_MAX (library parameter). 2016-08-04 10:09:04 -07:00
Andrew Tridgell
63317e9430 Plane: added throttle suppression for quadplanes
this tries to prevent motor start when on ground. Motors instead go
into spin_when_armed state
2016-08-04 09:43:40 -07:00
Gustavo Jose de Sousa
f2dec971e7 waf: add "ap_" prefix to keywords "libraries" and "vehicle"
As an effort to keep things specific to ardupilot API in the build system
consistent and easy way to identify.
2016-08-01 22:04:16 -03:00
Tom Pittenger
f90957e7ed Plane: remove all threat logic in adsb lib in favor of avoidance lib 2016-08-01 15:27:41 -07:00
mirkix
5f5c200625 ArduPlane: Fix filename in header 2016-07-28 18:24:24 -03:00
Lucas De Marchi
c27ebd10c2 ArduPlane: Remove i2c lockup count
This was returned only for a single bus and on all supported platforms
this is hardcoded to 0.
2016-07-28 18:03:09 -03:00
Andrew Tridgell
388b7ad6bd Plane: fixed is_flying_vtol() for non-quadplane 2016-07-27 07:43:16 +10:00
Andrew Tridgell
f65b46385c Plane: added engine cut on land final in quadplane 2016-07-25 15:46:17 +10:00
Andrew Tridgell
37f71bc6d6 AP_Mission: support DO_ENGINE_CONTROL 2016-07-25 10:06:03 +10:00
Andrew Tridgell
327a057ee0 Plane: added internal combustion engine support
this allows for automatic engine start and restart
2016-07-25 10:06:03 +10:00
Andrew Tridgell
02babb71b3 ArduPlane: adjust for 16 channels in SERVO_OUTPUT_RAW 2016-07-25 10:06:02 +10:00
Andrew Tridgell
9602d208a2 Plane: fixed disarm by rudder in quadplane 2016-07-25 06:08:36 +10:00
Tom Pittenger
3f195df9f0 Plane: handle ADSB-Out packets 2016-07-22 13:38:58 -07:00
Tom Pittenger
5c3cca7911 Plane: handle incoming ADSB transceiver packet 2016-07-22 12:20:39 -07:00
Andrew Tridgell
3f0a8d1761 Plane: added AP_Button support for plane
this also adds the g2 parameter table
2016-07-22 15:01:20 +10:00
Andrew Tridgell
7b147e3941 Plane: handle PLAY_TUNE message 2016-07-22 15:00:17 +10:00
Grant Morphett
b8011fd46c Rover|Plane: Just fixing a spelling mistake. 2016-07-22 08:23:07 +10:00
Tom Pittenger
3177dc2f31 Plane: ADSB service needs to run at 10Hz for dynamic ADSB data 2016-07-20 22:46:51 -07:00
Tom Pittenger
ab38b12f2c Plane: adsb specific status updates 2016-07-20 22:40:14 -07:00
Tom Pittenger
26efd90603 Plane: allow landing height adjustment on wp before land (aka approach wp) 2016-07-20 22:29:31 -07:00
Andrew Tridgell
4da3236c07 Plane: separate out landing height adjustment from barometer changes
this stores a landing height adjustment for an aborted landing
without adjusting barometer readings, applying them only on landing
2016-07-20 22:04:21 -07:00
Andrew Tridgell
9e812d3bda Plane: don't auto-update home and baro on large height change
if we land at a remote location with a different height we should not
update baro and home. This also prevents us updating baro and home if
we disarm in flight
2016-07-20 13:22:00 +10:00
Andrew Tridgell
569cc1c108 Plane: support the LED_CONTROL MAVLink message 2016-07-19 13:37:14 +10:00
Tom Pittenger
601ab9dad0 Plane: remove GCS send_statustext spam
Plane: remove GCS send_statustext spam when recalculating glide slope
2016-07-18 18:56:59 -07:00
Allan Matthew
c479fcab39 Plane: support GPS_INPUT mavlink message 2016-07-12 15:35:09 +09:00
Tom Pittenger
7751bee3be Revert "Plane: coverity scan - variables not initialized in constructor"
This reverts commit 9b807fa8a5.
2016-07-11 22:02:30 -07:00
Andrew Tridgell
e8976d3a89 Plane: check for optflow enable in more places 2016-07-12 09:05:52 +10:00
mirkix
d018a32545 Plane: Only init optflow when enabled by parameter 2016-07-12 09:00:46 +10:00
Andrew Tridgell
c926d7d41f Plane: fixed typo in quadplane landing detector
thanks to Paul for spotting this!
2016-07-08 18:38:43 +10:00
Andrew Tridgell
b6f58bdd98 Plane: don't give tuning errors when VTOL inactive 2016-07-06 14:41:49 +10:00
Tom Pittenger
9b807fa8a5 Plane: coverity scan - variables not initialized in constructor 2016-07-05 13:31:51 -07:00
Andrew Tridgell
96d785f1c6 Plane: added auto_navigation_mode flag
this fixes a problem where modes like loiter and auto would allow for
rudder stick mixing even with STICK_MIXING=0
2016-07-05 12:52:13 +10:00
Randy Mackay
2484486999 Plane: log rally points on startup 2016-07-04 11:17:15 +09:00
Tom Pittenger
0597dbd033 Plane: allow SET_ATTITUDE_TARGET to set rpy and throttle 2016-07-01 08:28:53 -07:00
Tom Pittenger
85afd9e245 Plane: remove guided roll flag, handle it with timer=0 2016-06-30 07:48:37 -07:00
Michael Day
8ac433f991 Plane: Can now command roll from a companion computer. 2016-06-30 10:27:44 -04:00
Andrew Tridgell
ec367d4a09 Plane: re-order channel initialisation
this fixes a problem with spurious throttle output during board
startup. Many thanks to Marco for finding this!
2016-06-30 16:48:30 +10:00
Andrew Tridgell
8fd31111ad Plane: fixed waf build with tricopter quadplane 2016-06-30 14:16:52 +10:00
Andrew Tridgell
bf2e30f858 Plane: removed demo_servos()
this really didn't help much and slows down startup
2016-06-27 10:19:26 +10:00
Andrew Tridgell
66e43bf6a2 Plane: start with low integrator on back quadplane transition
When changing to alt_hold controller in quadplane with significant
airspeed set the initial integrator to minus the hover throttle to
allow the accel controller to climb slowly
2016-06-27 10:18:20 +10:00
Leonard Hall
f1bca63094 Plane: consolidate input_euler_angle calls to use smoothing gain 2016-06-24 17:17:19 +09:00
Andrew Tridgell
1256c2f351 Plane: changed for AP_Vehicle API change 2016-06-24 11:39:23 +10:00
Tom Pittenger
d2365c25c6 Plane: increase update_waypoint() distance threshold during update_loiter()
- outside this radius of a loiter waypoint is where crosstracking is available
2016-06-23 12:43:03 -07:00
Andrew Tridgell
f514e76f52 Plane: reset ground_start_count if we lose 3D fix
thanks to Michael for this suggestion
2016-06-22 21:25:11 +10:00
Randy Mackay
82bd847e11 Plane: add AC_Avoidance, AC_Fence to build 2016-06-22 11:38:15 +09:00
Randy Mackay
9201a57c83 QuadPlane: include AC_Avoidance, AC_Fence
This is required because of AC_WPNav's use of the new avoidance library to stop at the fence
2016-06-22 11:38:15 +09:00
Tom Pittenger
9b973fb899 Plane: add ADSB_streamrate 2016-06-19 11:24:31 -07:00
Randy Mackay
ef1385c9ed QuadPlane: add comment that eeprom 28 and 41 were used for THR_MIN, MID 2016-06-18 11:55:49 +09:00
Randy Mackay
413f82bac1 Plane: remove unused definitions 2016-06-18 11:55:49 +09:00
Randy Mackay
b456a38432 QuadPlane: remove throttle_mid
motor's hover throttle is automatically updated
2016-06-18 11:55:49 +09:00
Randy Mackay
2523ba892b QuadPlane: set attitude vs throttle priority in attitude controller 2016-06-18 11:55:49 +09:00
Randy Mackay
f2b0f09d6f QuadPlane: remove THR_MIN 2016-06-18 11:55:49 +09:00
Tom Pittenger
f05c698176 Plane: fix compile error for RANGEFINDER_ENABLED
Plane: #define check for rangefinder enabled in relative_ground_altitude()
2016-06-16 14:19:10 -07:00
Andrew Tridgell
40db90cebe Plane: limit roll and pitch to Q_ANGLE_MAX in Q modes
planes often have large LIM_ROLL_CD
2016-06-16 22:00:04 +10:00
Andrew Tridgell
b1b73e2d99 Plane: improved quadplane landing detector
look for no vertical position change for 5s as well as low motors
2016-06-16 18:17:56 +10:00
Tom Pittenger
773962940c Plane: quadplane for fwd_throttle integrator inhibit reverse thrust and allow min>0 for petrol 2016-06-13 14:31:50 -07:00
Tom Pittenger
b6196dfa92 Plane: compiler warning in print: float to double promotion 2016-06-13 14:03:40 -07:00
Andrew Tridgell
107691b7a7 Plane: fixed initial descent rate in quadplane auto land 2016-06-11 14:37:44 +10:00
Andrew Tridgell
f8e0e91cbd Plane: prepare for 3.6.0 2016-06-11 09:20:05 +10:00
Andrew Tridgell
eb8cd13a50 Plane: update release notes for 3.6.0 2016-06-11 09:19:13 +10:00
Andrew Tridgell
e05c7b3367 Plane: check if terrain following is enabled in AGL calculation 2016-06-10 17:48:32 +10:00
Andrew Tridgell
19834c12e2 Plane: log start of quadplane transition 2016-06-10 17:48:32 +10:00
Andrew Tridgell
8156b3f7de Plane: fixed quadplane landing transition altitude 2016-06-10 17:48:32 +10:00
Andrew Tridgell
07564aa03f Plane: fixed an attitude control bug in quadplane transition
The motors would briefly spike at the end of the transition which
could cause a major pitch deviation
2016-06-10 17:48:32 +10:00
Tom Pittenger
69f29b51d1 Plane: new param Q_VFWD_ALT to disable VFWD motor below this altitude. Also uses rangefinder 2016-06-10 17:48:31 +10:00
Andrew Tridgell
021aebeac0 Plane: check for high ratio of rmsD to rmsP in tuning 2016-06-10 17:48:31 +10:00
Tom Pittenger
65e0e31a7a Plane: parachute low-alt check should not require auto mode to ever be set 2016-06-08 08:15:11 -07:00
Tom Pittenger
204abfd45e Plane: set heartbeat.system_status to Critical for low-battery failsafe events 2016-06-07 17:14:51 -07:00
Tom Pittenger
263931b4b1 Plane: allow manual parachute releases on the ground 2016-06-07 09:02:09 -07:00
Tom Pittenger
ef3d17cc4c Plane: parachute code can not rely on is_flying() because it is unreliable in a stalled aircraft 2016-06-07 09:01:29 -07:00
Tom Pittenger
3140ce6ab6 Plane: change MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT gcs msg to remove abbreviations. Hope it fits! 2016-06-07 08:28:35 -07:00
Tom Pittenger
bd270720da Plane: whitespace formatting 2016-06-07 08:27:40 -07:00
Michael Day
429e348824 Plane: Can now change current WP alt via mavlink.
Uses the mavlink msg SET_POSITION_TARGET_GLOBAL_INT
2016-06-07 08:16:39 -07:00
Tom Pittenger
01e636065d Plane: non-functional: mostly whitespace and removed extra set result statement 2016-06-07 08:11:05 -07:00
Michael Day
2c0f0a04d8 Plane: Only allow speed changes in GUIDED and AUTO modes. 2016-06-07 08:22:44 -04:00
Michael Day
cdeef9d692 Plane: Fence breaches can go to RTL mode with new FENCE_ACTION setting. 2016-06-07 15:46:52 +10:00
E Thomas
7d824247af Differential spoilers support, elevon offset
Fixed differential spoilers support, added elevon offset
See PR #2935
2016-06-06 21:55:50 -07:00
Michael du Breuil
037a7980d6 Plane: fix calculation of override PWM 2016-06-06 16:23:43 -07:00
Tom Pittenger
ee29f38cdf Plane: moved takeoff flap check to NORMAL checks.
TODP: add new flight stage FLIGHT_PRE_TAKEOFF to put this sort of thing into
2016-06-06 14:51:24 -07:00
Samuel Rosenstein
296b279f0d Plane: fixed issue with preflight flaps. Flaps now go down in preflight mode 2016-06-06 14:18:44 -07:00
Michael du Breuil
41bb237799 Plane: remove throttle surpressed message 2016-06-06 15:24:18 +10:00
Andrew Tridgell
5a544002cb Plane: fixed memory leak in mixer setup 2016-06-06 15:21:17 +10:00
Michael du Breuil
bb9086b87f Plane: setup mixer in the one second loop when disarmed 2016-06-06 15:17:37 +10:00
Michael du Breuil
fc3ab7b691 Plane: rename var to avoid a var with the name of a c++ keyword 2016-06-06 15:17:15 +10:00
Andrew Tridgell
c54d553df1 Plane: prevent continually loading the mixer 2016-06-06 15:14:28 +10:00
Michael du Breuil
7f73da535a Plane: if setting a mixer fails then clear the last crc so that it will be attempted again 2016-06-06 07:50:43 +10:00
Andrew Tridgell
eae2bf54ca Plane: fixed gcc 6.1 build error 2016-06-06 07:43:45 +10:00
Andrew Tridgell
8d3a58f0a2 Plane: allow tuning of more parameter sets 2016-06-04 19:20:31 +10:00
Andrew Tridgell
835235127c Plane: prevent divide by zero in SITL
harmless on PX4
2016-06-04 19:20:18 +10:00
Tom Pittenger
b9cee76bbe Plane: fix quadplane integrator to always clip to at least 0 to throttle_max 2016-06-03 23:46:18 -07:00
Tom Pittenger
82763ec8a9 Plane quadplane to use relative_ground_altitude() to take advantage of rangefinder easier 2016-06-03 23:44:21 -07:00
Tom Pittenger
f3ceee5389 Plane: use relative_ground_altitude 2016-06-03 23:43:54 -07:00
Tom Pittenger
b3f182157c Plane: take advantage of rangefinder support in relative_ground_altitude() 2016-06-03 23:43:43 -07:00
Andrew Tridgell
77b7852ff0 Plane: adjust recommend ranges for quadplane Q_VFWD_GAIN and Q_WVANE_GAIN 2016-06-04 11:04:15 +10:00
Tom Pittenger
a596aa5907 Plane: do not log CURR.Throttle because it's already logged elsewhere 2016-06-02 16:59:13 -07:00
Tom Pittenger
f83a6ca1ff Plane: fixed variable misspelling 2016-06-02 15:10:51 -07:00
Andrew Tridgell
978a89efa6 Plane: added new ESC calibration method 2016-06-02 18:10:37 +10:00
Andrew Tridgell
860587ece7 Plane: disable parachute checks when min alt is zero 2016-06-02 18:07:16 +10:00
Peter Barker
ee5290c178 Plane: avoid switch statement for enabling fence if no fence present 2016-06-02 14:37:21 +10:00
Tom Pittenger
954c987075 Plane: do not parse GEOFENCE packets when geofence is disabled via compile option 2016-06-01 17:38:52 -07:00
Tom Pittenger
af1407a155 Plane: disable parachute code when not enabled via compile option 2016-06-01 17:38:51 -07:00
Tom Pittenger
ea9e39212f Plane: use new check_latlng helper 2016-06-01 17:38:51 -07:00
Andrew Tridgell
da5ce37bbc Plane: fixed gain on -ve stick mixing past 50%
fixed a sign error in calculating gain on -ve stick mixing beyond 50%
input

thanks to Doug Weibel for a log that showed this effect
2016-06-02 08:07:55 +10:00
Andrew Tridgell
b17c800f44 Plane: use axis specific tuning controller error
this gives user feedback on the axis they are tuning
2016-06-01 17:19:33 +10:00
Tom Pittenger
a80a87eb09 Plane: simplify TECS prep logic by utilizing auto_state.land_in_progress 2016-05-31 09:46:52 -07:00
Tom Pittenger
4db5b80b37 Plane: add flag for auto_state.land_in_progress 2016-05-31 09:46:51 -07:00
Tom Pittenger
4ebaab86ec Plane: override is_flying for quadplane 2016-05-31 09:46:50 -07:00
Peter Barker
28361afc2a Plane: move telemetry_delayed up into base class 2016-05-31 08:46:09 +10:00
Peter Barker
9ee62aac30 Plane: move adjust_rate_for_stream up 2016-05-29 19:38:50 +10:00
Peter Barker
af5a52e2aa Plane: subclass GCS_MAVLink in place of defining its functions for it 2016-05-29 16:21:21 +10:00
Andrew Tridgell
f96836ab9a Plane: prevent a discrepancy between EKF origin and home for altitude 2016-05-29 15:47:26 +10:00
Andrew Tridgell
ba3576f027 Plane: added tuning error reporting for quadplanes 2016-05-28 17:33:30 +10:00
Andrew Tridgell
b56d784ae4 Plane: limit to zero pitch in quadplane on initial transition 2016-05-28 15:08:46 +10:00
Andrew Tridgell
20cf326093 Plane: lower throttle threshold for quadplane is_flying 2016-05-28 07:10:13 +10:00
Tom Pittenger
e3930b45df Plane: force the safety_state immediately because we want it to be in effect while we make mixer changes 2016-05-27 21:34:40 +10:00
Tom Pittenger
4785650c95 Plane: remove redundant calls to safety_state 2016-05-27 21:34:40 +10:00
Andrew Tridgell
9933069679 Plane: fixed motor test by percentage in quadplane 2016-05-27 11:53:20 +10:00
Andrew Tridgell
191d6df0ea Plane: moved EKF2 to a new parameter index
the meanings of many of the parameters have changed. Best to use a new
index to prevent old parameters from causing crashes
2016-05-25 19:35:17 +10:00
Andrew Tridgell
6e4c0dd3d7 Plane: allow non-blocking calibrations while armed 2016-05-24 17:10:41 +10:00
Andrew Tridgell
0f50f483b8 Plane: update for new airspeed calibration 2016-05-24 17:00:56 +10:00
Andrew Tridgell
d3494d1369 Plane: don't stall EKF during baro cal 2016-05-24 17:00:56 +10:00
Andrew Tridgell
5b4bbf08fd Plane: use send_heartbeat wrapper 2016-05-21 15:25:18 +10:00
Andrew Tridgell
4a7dea0c5b Plane: simplify UART setup 2016-05-21 15:25:16 +10:00
Andrew Tridgell
9f47e6417b Plane: always build with MAVLink2 headers 2016-05-21 15:25:16 +10:00
Andrew Tridgell
309dbef2ec Plane: fixed mavlink1 dependency on px4 2016-05-21 15:25:15 +10:00
Andrew Tridgell
eee06da1b5 Plane: use HAVE_PAYLOAD_SPACE() 2016-05-21 15:25:14 +10:00
Andrew Tridgell
be14714fa4 ArduPlane: update signing timestamp on GPS lock 2016-05-21 15:25:13 +10:00
Andrew Tridgell
a103e70460 ArduPlane: handle SETUP_SIGNING message 2016-05-21 15:25:13 +10:00
Andrew Tridgell
b7fe96188d Plane: raise range of THR_FS_VALUE
need to cope with reversed throttle
2016-05-21 07:39:02 +10:00
Andrew Tridgell
e0a9a8196c Plane: fixed throttle failsafe with THR_PASS_STAB=1
this prevents using pass-thru throttle when in throttle failsafe
2016-05-21 07:39:02 +10:00
Don Gagne
151686ce9d ArduPlane: SET_SENSORS_OFFSETS support for third compass 2016-05-19 18:51:17 -03:00
Tom Pittenger
36a1054f77 Plane: remove Tom Pittenger as an author since he's now listed as a lead 2016-05-17 19:16:02 -07:00
Tom Pittenger
c9167f89eb Plane: add Tom Pittenger as co-lead developer 2016-05-17 19:03:38 -07:00
Tom Pittenger
30c5c9eb5d Plane: log SONR.DistCM in cm as SONR.Dist as meters 2016-05-17 18:59:37 -07:00
Tom Pittenger
00863623d7 Plane: SONR logging, remove BaroAlt,GSpd,Thr 2016-05-17 18:59:22 -07:00
Tom Pittenger
b2fb2f3949 Plane: optimize millis() calls by reusing result 2016-05-17 18:59:03 -07:00
Tom Pittenger
1a066cadd2 Plane: fixed float->double print warning 2016-05-17 15:57:26 -07:00
Tom Pittenger
6746b4227a Plane: handle large negative baro offsets (corner case) to self-trigger a land-abort go-around
new param: LAND_ABORT_DEG
@Description: This parameter is used when using a rangefinder during landing for altitude correction from baro drift (RNGFND_LANDING=1) and the altitude correction indicates your altitude is higher than the intended slope path. Steeper slopes can result in crashes so this allows the option to remember the baro offset and self-abort the landing and come around for a another landing with the correct baro offset applied for a perfect slope. An auto-abort go-around will only happen once, next attempt will not auto-abort again. This operation happens entirely automatically in AUTO mode. This value is the delta degrees threshold to trigger the go-around. Example: if set to 5 deg and the mission planned slope is 15 deg then if the new slope is 21 then it will go-around. Set to 0 to disable. Requires LAND_SLOPE_RCALC > 0.
2016-05-17 15:41:09 -07:00
Tom Pittenger
a1c4103cef Plane: print to GCS the newly calculated glide slope angle 2016-05-17 15:39:05 -07:00
Tom Pittenger
f048aafb76 Plane: store auto land slope
- also changed order of landing slope calc but is functionally the same
2016-05-17 15:39:05 -07:00
Tom Pittenger
034cd2413e Plane: re-calc landing glide slope to gracefully handle baro offset during long flights
New param: LAND_SLOPE_RCALC
@Description: This parameter is used when using a rangefinder during landing for altitude correction from baro drift (RNGFND_LANDING=1) and the altitude correction indicates your altitude is lower than the intended slope path. This value is the threshold of the correction to re-calculate the landing approach slope. Set to zero to keep the original slope all the way down and any detected baro drift will be corrected by pitching/throttling up to snap back to resume the original slope path. Otherwise, when a rangefinder altitude correction exceeds this threshold it will trigger a slope re-calculate to give a shallower slope. This also smoothes out the approach when flying over objects such as trees. Recommend a value of 2m.

default value is 2 (so, enabled by default)
2016-05-17 15:39:04 -07:00
Tom Pittenger
4a6dd5a781 Plane: reset baro drift when setting home while disarmed 2016-05-17 15:32:42 -07:00
Andrew Tridgell
e3b2e90a27 Plane: cleanup unnecessarily complex gcs[] usage 2016-05-17 08:27:39 +10:00
dgrat
48c243bed0 ArduPlane: Do not use is_zero() for non-float types 2016-05-16 19:08:35 -03:00
Tom Pittenger
7af888633d Plane: 3of3 add loiter_xtrack option flag for post-loiter navigation
0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
2016-05-16 11:50:54 -07:00
Tom Pittenger
78d6291e2c Plane: corrected land abort gcs msg 2016-05-13 17:22:13 -07:00
Tom Pittenger
6c0579a895 Plane: for better helical landings allow for instant approach stage if previous nav cmd was LOITER_TO_ALT 2016-05-13 17:22:07 -07:00
Tom Pittenger
ba5b4e694c Plane: log NTUN:ArspdErr airspeed error (in meters) 2016-05-13 17:22:01 -07:00
Tom Pittenger
1551b9d881 Plane: remove redundant logging in NTUN 2016-05-13 17:22:00 -07:00
Tom Pittenger
8a58f5a5eb Plane: convert airspeed_error_cmd to airspeed_error (in meters) 2016-05-13 17:21:59 -07:00
Tom Pittenger
25dfb583d5 Plane: adjust target_airspeed with and without airspeed sensor (pitot) 2016-05-13 17:14:47 -07:00
Andrew Tridgell
2a0476483b Plane: make takeoff less noisy with zero timeout 2016-05-14 08:26:10 +10:00
Andrew Tridgell
574ba71ef3 Plane: update for AP_TECS API change 2016-05-14 08:26:10 +10:00
Ricardo de Almeida Gonzaga
1fad971851 ArduPlane: Fix typos 2016-05-13 19:20:07 -03:00
Michael du Breuil
7142bacfaa Plane: improve user friendliness of throttle fs msg 2016-05-11 09:00:55 -07:00
Andrew Tridgell
12e0012b16 Plane: allow for NAV_LOITER_UNLIM and NAV_LOITER_TIME in quadplane 2016-05-11 15:57:41 +10:00
Andrew Tridgell
3fc43b94f9 Plane: separate out auto and guided VTOL states
this prevents a switch to AUTO from using VTOL mode incorrectly
2016-05-11 15:14:43 +10:00
Andrew Tridgell
bcc64e0b4a Plane: fixed tiltrotor build failure
mixup with merge of RC_Channel changes
2016-05-11 09:25:43 +10:00
Andrew Tridgell
691d4b6ca7 Plane: added local reached_loiter_target()
this distinguishes between VTOL and fixed wing loiter targets
2016-05-11 05:55:26 +10:00
Andrew Tridgell
52ea443d65 Plane: added Q_THR_MIN 2016-05-11 05:55:26 +10:00
Andrew Tridgell
a61d608915 Plane: fixed numerical error if starting VTOL landing at destination 2016-05-11 05:55:25 +10:00
Andrew Tridgell
357ed1f4b9 Plane: enable weathervaning in GUIDED and TAKEOFF quadplane modes 2016-05-11 05:55:25 +10:00
Andrew Tridgell
6b358a5618 Plane: added Q_GUIDED_MODE parameter
this allows you to do hybrid VTOL and fixed wing guided mode
2016-05-11 05:55:25 +10:00
Andrew Tridgell
3bd5b42c69 Plane: refactor quadplane land controller as general VTOL position controller 2016-05-11 05:55:25 +10:00
Andrew Tridgell
6fdaaa7d98 Plane: new tilt compensation method 2016-05-11 05:55:25 +10:00
Andrew Tridgell
46bf2b83f5 Plane: use equal thrust in tiltrotors when over Q_TILT_MAX 2016-05-11 05:55:24 +10:00
Andrew Tridgell
eab42c5740 Plane: fixed attitude logging with fast logging off 2016-05-11 05:55:24 +10:00
Andrew Tridgell
bbb5f68bb7 Plane: added initial support for tiltrotors and tiltwings 2016-05-11 05:55:23 +10:00
Andrew Tridgell
89a2a92885 Plane: support better build time selection of multicopter frame type
makes it possible to do "make sitl-tri"
2016-05-11 05:55:22 +10:00
dgrat
76362caee0 AP_Math: Replace wrap_* functions with template versions 2016-05-10 11:41:26 -03:00
skyscraper
4d769497c9 ArduPlane: RC_Channel refactor
Fix white space after function name
2016-05-10 16:21:17 +10:00
skyscraper
e9e2f9020d ArduPlane: RC_Channel refactor, reimplement stick_mix_channels
reimplement the new overload of Plane::stick_mix_channel so
that it calls the existing overload
2016-05-10 16:21:17 +10:00
skyscraper
7f29903287 ArduPlane: Fix up after refactoring RC_Channel class
Further to refactor of RC_Channel class which included
adding get_xx set_xx methods, change reads and writes to the public members
to calls to  get and set functionsss

old public member(int16_t)   get function -> int16_t     set function (int16_t)
(expression where c is an object of type RC_Channel)
c.radio_in                     c.get_radio_in()           c.set_radio_in(v)
c.control_in                   c.get_control_in()         c.set_control_in(v)
c.servo_out                    c.get_servo_out()          c.set_servo_out(v)
c.pwm_out                      c.get_pwm_out()            // use existing
c.radio_out                    c.get_radio_out()          c.set_radio_out(v)
c.radio_max                    c.get_radio_max()          c.set_radio_max(v)
c.radio_min                    c.get_radio_min()          c.set_radio_min(v)
c.radio_trim                   c.get_radio_trim()         c.set_radio_trim(v);

c.min_max_configured() // return true if min and max are configured

Because data members of RC_Channels are now private and so cannot be written directly
 some overloads are provided in the Plane classes to provide the old functionality

new overload Plane::stick_mix_channel(RC_Channel *channel)
which forwards to the previously existing
void stick_mix_channel(RC_Channel *channel, int16_t &servo_out);

new overload Plane::channel_output_mixer(Rc_Channel* , RC_Channel*)const
which forwards to
(uint8_t mixing_type, int16_t & chan1, int16_t & chan2)const;

Rename functions

 RC_Channel_aux::set_radio_trim(Aux_servo_function_t function)
    to RC_Channel_aux::set_trim_to_radio_in_for(Aux_servo_function_t function)

 RC_Channel_aux::set_servo_out(Aux_servo_function_t function, int16_t value)
    to RC_Channel_aux::set_servo_out_for(Aux_servo_function_t function, int16_t value)

 Rationale:

        RC_Channel is a complicated class, which combines
        several functionalities dealing with stick inputs
        in pwm and logical units, logical and actual actuator
        outputs, unit conversion etc, etc
        The intent of this PR is to clarify existing use of
        the class. At the basic level it should now be possible
        to grep all places where private variable is set by
        searching for the set_xx function.

        (The wider purpose is to provide a more generic and
        logically simpler method of output mixing. This is a small step)
2016-05-10 16:21:16 +10:00
Andrew Tridgell
9f84a22d22 Plane: removed unnecessary libs
now in common
2016-05-10 14:13:39 +10:00
Andrew Tridgell
dcb24f2bc1 Plane: use DataFlash::log_while_disarmed() 2016-05-09 12:05:25 +10:00
Andrew Tridgell
51877a20d6 Plane: added some more tuning sets 2016-05-08 18:45:42 +10:00
Andrew Tridgell
35ef20b23a Plane: use separate definition for TUNE_PARM
this allows the parameter docs to be separated
2016-05-08 18:35:26 +10:00
Andrew Tridgell
7a8bf033e1 Plane: allow for tuning of single parameters 2016-05-08 14:47:51 +10:00
Leandro Pereira
f23bd7e09d GCS_MAVLink: Use a single stream_trigger() implementation
This has no side effects, but since all implementations were basically
the same, move the implementation to GCS_Common and the only part that
adjusts the rate based on which which stream to each individual
GCS_MAVLINK implementation.
2016-05-07 23:49:35 -03:00
Lucas De Marchi
0eab8847f2 ArduPlane: remove mention to .pde files
We don't support them anymore.
2016-05-07 22:55:48 -03:00
Andrew Tridgell
db5f50e08e Plane: convert tuning to use AP_Tuning library 2016-05-07 18:34:15 +10:00
Andrew Tridgell
3853aa0fe3 Plane: fix for changed API 2016-05-07 18:27:22 +10:00
Andrew Tridgell
cbbf26a1f6 Plane: removed Log_Write_IMUDT 2016-05-07 18:27:20 +10:00
Andrew Tridgell
3bbc6353d8 Plane: use have_ekf_logging() 2016-05-07 18:27:20 +10:00
Andrew Tridgell
2a7edfd3d1 Plane: fixed setting of failsafe for motors in quadplane 2016-05-07 07:25:33 +10:00
Michael Day
b096e1404d Plane: Add MAVLink message handler for CMD_DO_CHANGE_SPEED 2016-05-06 11:59:45 -07:00
Lucas De Marchi
fea084a596 Global: use ap_version.h
This header is used by waf to contain the generated version macros,
particularly using the git hash. For waf it's better to be in a separate
header since it then can keep track of changes on it a trigger
recompilation.

For the make build system, a dummy ap_version.h file has been added in
the missing/ folder so both implementations can co-exist.
2016-05-06 13:11:28 -03:00
Lucas De Marchi
baa287e5e5 ArduPlane: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03:00
Rimvydas Naktinis
3c00324fd2 Plane: Parachute uses altitude above ground (not home) to check suitability for deployment. 2016-05-05 09:02:25 -07:00
Rimvydas Naktinis
9fdf39baf0 Plane: Added a method that returns current altitude relative to terrain, if available, or home otherwise. 2016-05-05 09:02:20 -07:00
Allan Matthew
25c8027606 Plane: handle new MAVLink rangefinder input 2016-05-04 08:40:34 -07:00
Michael du Breuil
0fcfcdc169 Plane: Broadcast POSITION_TARGET_GLOBAL_INT as part of the EXTENDED_STATUS stream 2016-05-01 07:38:23 +10:00
Michael Oborne
cd56061b24 ArduPlane: support MAVLINK_MSG_ID_MISSION_ITEM_INT 2016-05-01 07:13:46 +10:00
Andrew Tridgell
226e6f1d6c Plane: only save compass offsets when disarmed and learning enabled 2016-04-30 16:43:14 +10:00
Andrew Tridgell
dfa86cff63 Plane: update release notes for 3.6.0beta1 2016-04-30 14:34:47 +10:00
Andrew Tridgell
a99616bd10 Plane: prepare for 3.6.0beta1 release 2016-04-30 14:34:47 +10:00
Andrew Tridgell
3a35f8f528 Plane: update release notes for 3.5.3 2016-04-30 14:34:47 +10:00
Andrew Tridgell
abfcf89f5e Plane: reduced the rate of EKF and attitude logging to 25Hz
this will reduce the log file size while not appreciably reducing the
ability to analyse logs
2016-04-30 14:34:47 +10:00
Andrew Tridgell
0fd044c1f7 Plane: added Q_RTL_MODE parameter
used to switch to VTOL landing on RTL
2016-04-30 14:34:47 +10:00
Andrew Tridgell
66d3668ac4 Plane: rapid climb in QRTL if below target altitude 2016-04-30 14:34:47 +10:00
Andrew Tridgell
4666b25258 Plane: initial implementation of QRTL for quadplane RTL 2016-04-30 14:34:47 +10:00
Andrew Tridgell
460885c478 Plane: refactored quadplane landing controller
allow use in other than AUTO mode
2016-04-30 14:34:46 +10:00
Michael du Breuil
de1e299754 Plane: Remove support for CONDITION_CHANGE_ALT 2016-04-30 10:56:05 +09:00
Niti Rohilla
a03941ba02 ArduPlane : Updated handle_guided_request() to report error. 2016-04-29 12:39:28 -03:00
Michael du Breuil
731c68f273 Plane: Change mode to RTL on end of mission rather then staying in auto
Deleted commands_process as it had 2 lines of useful code left, and was cleaner to move the remaining two lines into the caller case
2016-04-29 13:12:18 +10:00
Andrew Tridgell
ab5ca53e2f Plane: lower default VTOL ANGLE_MAX to 30 degrees
we don't really want a quadplane at 45 degrees or the wing drag gets
far too high
2016-04-29 10:23:26 +10:00
Andrew Tridgell
19a1edcd2b Plane: lower default velocity controller gains for quadplanes
we're getting too many XY velocity controller oscillations. Better to
start with smaller gains
2016-04-29 10:02:45 +10:00
Andrew Tridgell
6f4d66f346 Plane: support building quadplane with forced motors class 2016-04-28 22:40:45 +10:00
Andrew Tridgell
9c0d984a4e Plane: support forced motor class in quadplane 2016-04-28 22:37:24 +10:00
Andrew Tridgell
00c2b4b30f Plane: reload airspeed after VTOL landing 2016-04-28 08:42:19 +10:00
Andrew Tridgell
1ebe0a2583 Plane: prevent a division by zero in takeoff code 2016-04-26 12:06:57 +10:00
Luis Vale Gonçalves
343b4cb81a Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:41 -07:00
Luis Vale Gonçalves
73ac146b7e Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:37 -07:00
Andrew Tridgell
38a7bfd81f Plane: added Q_ENABLE=2 for starting AUTO in VTOL 2016-04-23 21:03:46 +10:00
Andrew Tridgell
0aa1ae048d Plane: fixed is_flying() for VTOL flight
otherwise we may disarm mid-flight!
2016-04-23 21:03:46 +10:00
Andrew Tridgell
76400a9959 Plane: support DO_VTOL_TRANSITION as a mission item 2016-04-23 21:03:46 +10:00
Andrew Tridgell
07168c3db4 Plane: fixed places that assumed mission command IDs are 8 bit 2016-04-23 21:03:46 +10:00
James Stoyell
4e7e84fc99 Plane: Modified last_valid_rc_ms AFS failsafe input to work when standard failsafe is on
Ran into a bug on our physical plane where failsafe.last_valid_rc_ms was not recognizing that the transmitter had failed. This is likely due to how the standard failsafe works in receiving lower-than-possible throttle values. So in order to account for this, I added a new variable to the failsafe, AFS_last_valid_rc_ms, and I update it only if the ch3_failsafe (the throttle failsafe) is not on. If the throttle failsafe is on, that means that the plane has indeed lost transmitter input, so the AFS needs to recognize that.
2016-04-22 11:48:36 -07:00
Randy Mackay
4291139b6c Plane: ack DO_MOUNT_CONTROL messages 2016-04-22 21:30:51 +09:00
Tom Pittenger
9aa25cb7a0 Plane: update flight stage on successful restart_landing_sequence() 2016-04-21 22:54:23 -07:00
Tom Pittenger
2ba9a04bf5 Plane: smooth-out the end of takeoff pitch by reducing takeoff pitch min via TKOFF_PLIM_SEC
@Description: This parameter reduces the pitch minimum limit of an auto-takeoff just a few seconds before it reaches the target altitude. This reduces overshoot by allowing the flight controller to start leveling off a few seconds before reaching the target height. When set to zero, the mission pitch min is enforced all the way to and through the target altitude, otherwise the pitch min slowly reduces to zero in the final segment. This is the pitch_min, not the demand. The flight controller should still be commanding to gain altitude to finish the takeoff but with this param it is not forcing it higher than it wants to be. (+1 squashed commits)
2016-04-21 22:54:17 -07:00
Tom Pittenger
f12658dd20 Plane: more comments on landing flare 2016-04-21 21:31:01 -07:00
Tom Pittenger
fefcf39335 Plane: must be on land approach before flare alt/sec are used 2016-04-21 21:31:00 -07:00
Tom Pittenger
12663eaa48 Plane: simplify flare logic 2016-04-21 21:30:59 -07:00
Tom Pittenger
183369b92a Plane: take advantage of L1 stale flag and correctly inhibit flight stage if not lined up on approach 2016-04-21 21:30:58 -07:00
Tom Pittenger
c5a3b1b134 Plane: non-functional change - change labels for approach flight stage criteria 2016-04-21 21:30:56 -07:00
Tom Pittenger
c238645e53 Plane: limit roll before calculating load factor 2016-04-21 21:30:56 -07:00
Tom Pittenger
aadd9a18ce Plane: log L1 xtrack error integrator and remove extra yaw logging 2016-04-21 21:30:55 -07:00
Tom Pittenger
85913bd237 Plane: rely on flight stage to know if we're doing auto_land in TECS 2016-04-21 21:30:53 -07:00
Tom Pittenger
6a83ad419a Plane: moved update_flight_stage() inside setup_glide_slope()
the glide_slope gets calculated every time there's a major event such as mission item change or wp_proportion change so its good to update the flight stage then too because.
also logging stage when stage changes, might as well get an extra data point in there when it's timely
2016-04-21 21:30:51 -07:00
Tom Pittenger
ec3e9014e4 Plane: move target land_airspeed logic to top layer
- this is to allow min groundspeed to be enforced which is otherwise lost when TECS assigns a target airspeed at the lower level
2016-04-21 21:30:50 -07:00
Andrew Tridgell
a549225e60 Plane: support Y6 frame class in quadplane 2016-04-22 10:28:16 +10:00
Rimvydas Naktinis
df922dacfa Plane: Suppress throttle when parachute release initiated, not after release. 2016-04-21 09:53:22 -07:00
Andrew Tridgell
2a1985d0f9 Plane: fixed loiter radius at end of mission 2016-04-21 22:29:29 +10:00
Andrew Tridgell
de33779382 Plane: added Q_WVANE_MINROLL
this allows for some roll trim without weathervaning
2016-04-21 21:52:25 +10:00
Michael du Breuil
ef348473eb Plane: Remove tecs_hgt_afe from the 50hz tecs update 2016-04-21 17:03:00 +10:00
Michael du Breuil
f5749b44cd Plane: Move position update to 50hz loop rather then the 10hz 2016-04-21 16:53:20 +10:00
Andrew Tridgell
cf7b6123a9 Plane: log the number of lost log messages 2016-04-21 16:45:02 +10:00
Andrew Tridgell
8683616d8c Plane: redo scheduler table and improve perf logging
The scheduler table was still setup for a worst case CPU of
AVR2560. Adjust times for the stm32 and improve perf logging
2016-04-21 16:45:02 +10:00
Andrew Tridgell
a7006a7784 Plane: refactor perf variables into a structure 2016-04-21 16:45:02 +10:00
Andrew Tridgell
d013878c17 Plane: improved speed limiting on landing approach in VTOL mode 2016-04-20 18:07:04 +10:00
Andrew Tridgell
d8b0d17fe4 Plane: added weathervaning to landing reposition 2016-04-20 17:12:59 +10:00
Andrew Tridgell
f34af03891 Plane: added Q_WVANE_GAIN
this controls weathervaning in VTOL modes. Defaults to off
2016-04-20 17:12:59 +10:00
Andrew Tridgell
e9e43dc016 Plane: added Q_VFWD_GAIN for forward motor in VTOL modes
this allows for velocity control using the forward motor in VTOL modes
2016-04-20 16:25:19 +10:00
Lucas De Marchi
0095f6168e ArduPlane: fix handling of SET_HOME_POSITION
Location.altitude is stored in cm.
2016-04-18 13:07:45 +10:00
Michael du Breuil
c17ea21a97 Plane: Add support for DO_REPOSITION via COMMAND_INT
also allows guided to change loiter directions
2016-04-17 19:00:03 -07:00
Andrew Tridgell
62574b35b5 Plane: fixed negative loiter radius values 2016-04-18 09:33:20 +10:00
Andrew Tridgell
edd15f15c0 Plane: added some fixed wing in-flight transmitter tuning 2016-04-16 20:47:18 +10:00
Andrew Tridgell
27fb35253c Plane: added in-flight transmitter tuning 2016-04-16 20:26:43 +10:00
Tom Pittenger
436062ef37 Plane: improved crash detection
- fixes bug where a bungee launch is configured but the aircraft gets bumped and triggers the prop to spin up. This will now detect that and "crash' and disable the motor
2016-04-14 22:34:46 -07:00
Grant Morphett
2887e48178 Plane: Fixed bug with landing flare for high values of LAND_FLARE_SEC
I had an issue in SITL where my plane would round the last WP staring
its landing approach and immediately limit the roll to 5degress even
before the plane had finished turning the corner so it would go WAY
off course.  For a high value of LAND_FLARE_SEC (mine was 5) the math
works out the plane has landed if
    height <= sink_rate * land_flare_sec
During the banking of the last corner the plane started to decend and
quickly set itself up for a 6.1m/s sink rate which is normal.  It was
at 30 meters altitude.  As you can see at this point the math thinks
the plane has landed so limits the roll.  The solution was to ensure
the plane had covered at least 50% of the distance toward the final
waypoint before allowing a flare to happen.  Note that LAND_FLARE_SEC
above 2 is considered very high and this normally wouldn't occur.
2016-04-15 13:02:11 +10:00
Andrew Tridgell
154fe15c67 Plane: fixed build warning 2016-04-15 09:22:41 +10:00
Tom Pittenger
ff57884eca Plane: renamed variable, non-functional change 2016-04-14 13:18:35 -07:00
Andrew Tridgell
3a242ee4a9 Plane: support up to 16 output channels
the extra channels can be used via SBUS output
2016-04-14 08:05:06 +10:00
Michael du Breuil
78442b7e81 Plane: make the initialization of the gcs instances follow the define 2016-04-11 17:54:46 -07:00
Andrew Tridgell
06bcf0df4b Plane: change default loop rate for quadplanes to 300Hz 2016-04-11 09:32:45 +10:00
Andrew Tridgell
1fe9582ac3 Plane: back to velocity controller for quadplane landing
now with much smoother attitude control thanks to some help from
Leonard
2016-04-10 22:01:19 +10:00
Andrew Tridgell
4a5c4a5189 Plane: not in vtol mode when quadplane not enabled
prevents logging error in auto if quadplane not enabled and running a
VTOL mission command
2016-04-10 22:01:18 +10:00
Ricardo de Almeida Gonzaga
5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Andrew Tridgell
97a7192f76 Plane: make it more obvious that AUTO_FBW_STEER is not for normal use 2016-04-06 07:58:23 +10:00
Andrew Tridgell
5f1ad68bd9 Plane: improved velocity controller for quadplane landing 2016-04-04 09:50:35 +10:00
Andrew Tridgell
8b30569ad1 Plane: setup quadplane earlier in startup
this ensures the GCS gets the full parameter list as the param count
will be set before mavlink starts
2016-04-03 06:49:38 +10:00
Andrew Tridgell
5cc4b20c73 Plane: smooth out final descent for landing 2016-04-02 22:45:51 +11:00
Andrew Tridgell
197cefaaa7 Plane: prevent large nose-down on start of velocity controller 2016-04-02 21:19:06 +11:00
Andrew Tridgell
ae51e51c6a Plane: use velocity controller for initial quadplane landing 2016-04-02 20:54:01 +11:00
Andrew Tridgell
b1266603a6 Plane: setup immediate pitch limit on quadplane takeoff
this prevents a single loop with large pitch down demand
2016-04-02 19:53:48 +11:00
Andrew Tridgell
913cf9dd37 Plane: set min quad throttle to 10%
fixes spin when armed
2016-04-01 22:18:51 +11:00
Andrew Tridgell
7f85c14c96 Plane: fixed landing detector for new AP_Motors code 2016-04-01 21:54:32 +11:00
Andrew Tridgell
70679a06aa Plane: fixed quadplane throttle control in AUTO 2016-04-01 17:29:51 +11:00
Andrew Tridgell
52cc369f15 Plane: fixed typo in AP_Motors conversion 2016-04-01 16:45:01 +11:00
Andrew Tridgell
e7f7afcc4d Plane: added correct filter defaults 2016-04-01 16:44:49 +11:00
Andrew Tridgell
9cf909607f Plane: setup reasonable quadplane defaults 2016-04-01 16:40:06 +11:00
Andrew Tridgell
dd6c4d6225 Plane: fixed up parameters for quadplane
this fixes quadplane parameters for the new AP_Motors code
2016-04-01 16:17:07 +11:00
Randy Mackay
b96ea15220 Plane: quadplane uses AC_AttitudeControl_Multi 2016-04-01 11:59:30 +09:00
Randy Mackay
41b584ac9e Plane: fix quadplane qstabilize throttle input 2016-04-01 11:59:30 +09:00
Randy Mackay
52caed2573 Plane: QTUN df messages angle boost field as float 2016-04-01 11:59:30 +09:00
Randy Mackay
70f81ee338 Plane: remove multicopter PID parameters
These have been moved to the AC_AttitudeControl class
2016-04-01 11:59:30 +09:00
Randy Mackay
39f795d9fd Plane: quadplane sets motors desired spool state 2016-04-01 11:59:30 +09:00
Andrew Tridgell
f73c8ab8ed Plane: allow testing of all motors in sequence
this makes for an easier startup test for a quadplane, allowing a
single MAVLink command to test that all motors are working correctly
in the right sequence
2016-04-01 11:09:51 +11:00
Tom Pittenger
6718241dad cleanup comments 2016-03-29 05:32:28 -07:00
Gustavo Jose de Sousa
a4c099feaa waf: create program groups for main products
Currently we need to build a different binary for each type of copter frame.
This is a preparation for setting all those binaries to a group called
"copter". We create the groups for the rest of the main products for
consistency.
2016-03-26 15:43:08 -03:00
Andrew Tridgell
dc9d87fde3 Plane: prepare for 3.5.2 release 2016-03-26 14:52:17 +11:00
Andrew Tridgell
8a6e5ffe80 Plane: fixed bug in rangefinder landing
introduced with QLAND change
2016-03-26 10:06:07 +11:00
Andrew Tridgell
b47b558246 Plane: change code URL 2016-03-25 20:47:03 +11:00
Andrew Tridgell
4d7beab8cc Plane: added QTUN logging for quadplane 2016-03-25 12:33:19 +11:00
Andrew Tridgell
0a199945a2 Plane: added copter RATE logging for quadplane 2016-03-25 12:13:59 +11:00
Andrew Tridgell
1fa075e7a8 Plane: change default quadplane gains
lower filter frequency, higher I gain for roll/pitch
2016-03-25 10:16:15 +11:00
Lucas De Marchi
f258b66627 ArduPlane: Update path locations for parameters
Thanks to Francisco Ferreira for noticing that.
2016-03-23 17:50:38 -03:00
Andrew Tridgell
0442c2c659 Plane: prepare for 3.5.1 release 2016-03-21 09:44:52 +11:00
Andrew Tridgell
f0eddd6366 Plane: ensure we always eventually capture a loiter 2016-03-18 13:47:45 +11:00
Andrew Tridgell
30ca9fbb01 Plane: cope with upgrade to shifted indexes for quadplane 2016-03-18 12:33:58 +11:00
Michael du Breuil
35bb6a634e Plane: Make base_mode armed status depend upon the arming library, not soft armed 2016-03-17 15:16:17 +11:00
Don Gagne
cae7ea0d13 Add @Volatile, @ReadOnly support 2016-03-17 10:58:05 +11:00
Lucas De Marchi
e01d49ff53 ArduPlane: replace header guard with pragma once 2016-03-16 18:40:45 +11:00
Michael du Breuil
0117522998 Plane: Use arming voltage 2016-03-14 09:06:58 -07:00
Andrew Tridgell
89970e4eaa Plane: support motor_test for quadplanes 2016-03-13 10:05:10 +11:00
Andrew Tridgell
d644474817 Plane: support octaquad planes 2016-03-13 10:04:25 +11:00
Andrew Tridgell
d7d528560d Plane: don't start summing for loiter until we reach loiter circle 2016-03-10 15:43:28 +11:00
Tom Pittenger
f3638f421e Plane: fix short loiters exiting early 2016-03-10 15:42:18 +11:00
Michael du Breuil
f60b3fd6c7 Plane: remove "Command recieved" statustext 2016-03-10 15:36:05 +11:00
Andrew Tridgell
f4ccf94dfc Plane: added QLAND mode
for VTOL landing. Use for failsafe as well
2016-03-09 18:20:41 +11:00
Andrew Tridgell
927efa90f8 Plane: fixed log printing of Q modes 2016-03-09 17:29:13 +11:00
Don Gagne
1df7baa5c5 Plane: update quadplane param description increment 2016-03-08 09:27:56 +09:00
Tom Pittenger
ff249788bf Plane: add a default Navigation option as explained in the param docs 2016-03-03 09:16:26 -08:00
Randy Mackay
f66d5f7a8c Plane: use ahrs.get_origin instead of ekf.getOriginLLH
This ensures we get the origin from the active EKF
2016-03-03 16:20:59 +09:00
Tom Pittenger
75be40ea59 Plane: add LAND_THR_SLEW 2016-03-02 10:54:19 -08:00
Tom Pittenger
ed6aa4ed17 Plane: added throttle limiting via max power (current*voltage) 2016-03-02 10:20:44 -08:00
Tom Pittenger
bf5005103c Plane: allow loiter waypoints to have a zero lat/lng or alt to mean use current 2016-03-02 08:49:11 -08:00
Tom Pittenger
be3941efdf Plane: unify loiter mission items to require heading to next wp
- except loiter_unlimited because it never exits
2016-03-02 08:48:25 -08:00
Tom Pittenger
9e452838ab Plane: loiter missions to default to loiter_radius if mission says 0 or 1.
- except loiter_unlim which uses RTL_loiter, although I'm not sure why.
2016-02-29 10:12:20 -08:00
Tom Pittenger
ed98617d42 Plane: utilize radius for loiter commands 2016-02-29 06:43:29 -08:00
Andrew Tridgell
f35d05e374 Plane: improved quadplane default gains
0.25 is better for an average quadplane for roll/pitch

0.5 is a bit high for accel-z, 0.3 is better
2016-02-29 21:46:27 +11:00
Andrew Tridgell
93ac82e1f6 Plane: write voltage/current much more frequently 2016-02-29 21:24:54 +11:00
Will Sackfield
fabe235130 ArduPlane: initialize the fail_test variable
* Clang complains if variables are not initialized
2016-02-29 14:14:37 +11:00
Will Sackfield
5f5035933f ArduPlane: static cast to uint8 on initialization of struct
* clang requires that the casting be explicit
2016-02-29 14:14:37 +11:00
Andrew Tridgell
968f07f583 Plane: allow live quadplane PID tuning 2016-02-29 14:10:32 +11:00
Tom Pittenger
b8fc524954 Plane: enforce expected flight_stage in TECS 2016-02-25 06:37:24 -08:00
Tom Pittenger
993e5b438c Plane: add to LAND_NEUTRL behavior
offer netrual vs disabled outputs
2016-02-25 05:51:44 -08:00
Tom Pittenger
6399d00950 Plane: convert to using static send_statustext
- no more MSG_STATUSTEXT
- TODO: replace calls to gcs_send_text and gcs_send_text_fmt to GCS_MAVLINK::send_statustext()
2016-02-24 09:18:06 +11:00
Andrew Tridgell
ad78a31255 Plane: move set_dataflash(0 for static logging 2016-02-24 09:18:05 +11:00
Tom Pittenger
881dabf048 Plane: add missionLoaded arming check fail for mis.len <= 1 2016-02-22 16:19:40 +11:00
Andrew Tridgell
1acf25b6e2 Plane: use set_dataflash()
give GCS_MAVLINK a dataflash object for logging text messages
2016-02-22 12:34:32 +11:00
Andrew Tridgell
b84b480086 Plane: added PID tuning for quadplane modes 2016-02-20 20:20:27 +11:00
Andrew Tridgell
e2abaefc44 Plane: check SCHED_LOOP_RATE for quadplane 2016-02-20 20:02:52 +11:00
Lucas De Marchi
0b22b520b8 ArduPlane: remove unused CMAKE define
This is a leftover from previos cmake build system.
2016-02-19 19:15:39 -02:00
Peter Barker
ca4017d093 Plane: defines.h should not use defines from config.h
config.h includes defines.h early, so defines in config.h are unavailable
2016-02-19 12:34:23 -02:00
Tom Pittenger
d0edfa5dfa Plane: compile warning fix
/ardupilot/ArduPlane/quadplane.cpp:773:107: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
2016-02-17 14:54:02 -08:00
Tom Pittenger
0b26a34f22 Plane: new param LAND_THEN_NEUTRL
// @Description: When enabled, after an autoland and auto-disarm via LAND_DISARMDELAY happens then set all servos to neutral. This is helpful when an aircraft has a rough landing upside down or a crazy angle causing the servos to strain.
2016-02-16 23:40:44 -08:00
Andrew Tridgell
8ecf54bf75 Plane: use throttle slew when in quadplane assisted flight
this prevents a sudden throttle change on a petrol motor when
transitioning
2016-02-13 11:38:33 +11:00
Tom Pittenger
a280396645 Plane: nonfunctional change, comment only. Units were in old in comment 2016-02-12 12:14:38 -08:00
Tom Pittenger
c837fbca2f Plane: 3/3 new param TECS_LAND_SRC for Land Sink Rate Change
// @Description: When zero, the flare sink rate (TECS_LAND_SINK) is a fixed sink demand. With this enabled the flare sinkrate will increase/decrease the flare sink demand as you get further beyond the LAND waypoint. Has no effect before the waypoint. This value is added to TECS_LAND_SINK proportional to distance traveled after wp. With an increasing sink rate you can still land in a given distance if you're traveling too fast and cruise passed the land point. A positive value will force the plane to land sooner proportional to distance passed land point. A negative number will tell the plane to slowly climb allowing for a pitched-up stall landing. Recommend 0.2 as initial value.
2016-02-12 11:39:27 -08:00
Tom Pittenger
8ac6343730 Plane: removing mission_cmd in TECS and making it bool is_landing
this is reverse-thrust cleanup suggested by Tridge
2016-02-12 11:22:59 -08:00
Tom Pittenger
d04b5e735f Plane: add SYS_STATUS reverse_motor
- helpful to tell GCS to interpret VFR_HUD as negative when bit is enabled
- throttle is sent as abs()
2016-02-11 18:46:01 +11:00
Tom Pittenger
fa53263ca9 Plane: make throttle_percentage() signed 2016-02-11 18:46:01 +11:00
Tom Pittenger
ebec68c55b Plane: param desc to increase THR_MIN range to include negative thrust 2016-02-10 22:18:07 -08:00
Tom Pittenger
f369899509 Plane: restrict rudder arming where reverse_thrust is enabled and commanding negative 2016-02-10 22:18:06 -08:00
Tom Pittenger
a920b7322d Plane: more desc for param USE_REV_THRUST 2016-02-10 22:04:50 -08:00
Tom Pittenger
046741d23b Plane: abort landing at 90% throttle instead of 95% 2016-02-08 21:13:43 -08:00
Tom Pittenger
b098466e87 Plane: reduce redundant logging of STAT from 6 Hz to 5 Hz
- STAT log entry was being done every 5 Hz plus at 1 Hz. This removes the 1Hz.
2016-02-08 21:13:12 -08:00