Commit Graph

3453 Commits

Author SHA1 Message Date
Peter Barker d077723028 Plane: handle command_int in GCS base class 2018-07-06 09:43:09 +10:00
Peter Barker d76e7d210b Plane: handle command_long in GCS base class 2018-07-06 09:43:09 +10:00
Andrew Tridgell 1d91f18177 Plane: fixed version for enums 2018-07-05 11:10:31 +10:00
Andrew Tridgell bd4515947a Plane: updated release notes 2018-07-05 11:10:27 +10:00
Peter Barker 85f339caae Plane: remove annoying ice_update shim 2018-07-04 21:08:47 +01:00
Peter Barker e404562544 Plane: remove vexing button_update shim 2018-07-04 21:08:47 +01:00
Peter Barker c42fb6d797 Plane: remove pointless rangefinder_init shim function 2018-07-04 21:08:47 +01:00
Peter Barker 4502fd21c3 Plane: use compass singleton for logging 2018-07-04 20:11:27 +01:00
Peter Barker 3bfa4c8678 Plane: use singletons in AP_Arming 2018-07-03 13:44:11 +10:00
Peter Barker 320e24af65 Plane: move mavlink reboot code up to base class 2018-07-03 12:12:25 +10:00
Jacob Walser 4eb00ac779 Plane: refactor output_test -> output_test_seq 2018-07-02 11:31:58 -04:00
Lucas De Marchi 1a45aa12f5 AP_Param: warn on last pass only about unknown parameters
Do not warn about unknown parameters on the first pass, i.e. when
AP_Param:load_all() is called. This is because we may still not know
about dynamically loaded parameters. When we call the second (last)
time, we expect to already know all possible parameters, so print a
warning to both console and the debug terminal.
2018-06-28 10:18:19 -07:00
Lucas De Marchi 7f0d5ddf21 AP_Param: stop panic()'ing on unknown parameters
Our track record on keeping parameters up to date with master is not
great and panic()'ing when loading them apparently is not helping
because every and each vehicle has a different file.

On aerofc load_defaults_file() is used in the same way as
load_embedded_param_defaults() is in which the panic() behavior has been
previously removed.

This finishes the removal of the panic param and add warnings to the
debug console when reading the parameters (rather than when counting
them).
2018-06-28 10:18:19 -07:00
Andrew Tridgell bc503cc600 Plane: moved OSD to top level params
this is to give lots of depth for OSD params (which will be very
complex)
2018-06-27 14:55:00 +10:00
Alexander Malishev 75bf6984f5 Plane: added OSD support 2018-06-27 14:55:00 +10:00
Michael du Breuil 1c276e6af7 Plane: Remove unneeded wrapper functions
Also removes unneeded battery failsafe flag clearing
2018-06-27 11:39:35 +10:00
Peter Barker 23919daf11 Plane: use arming check_failed function 2018-06-23 15:33:19 +10:00
Andrew Tridgell d454bc555e Plane: added ESC_TELEMETRY to mavlink streams 2018-06-21 10:48:02 +10:00
Peter Barker f984e5e31d Plane: use magic force arm/disarm definitions 2018-06-20 11:43:38 +10:00
Peter Barker f5e241af01 Plane: option to force arm, bypassing checks 2018-06-20 11:43:38 +10:00
Peter Barker 2b7f9247e8 Plane: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Peter Barker 9824832523 Plane: use AP_RTC
Plane: AP_GPS now sets the system time directly
2018-06-15 08:01:22 +10:00
Michael du Breuil 12da35220c Plane: Simplify radio trimming, improve MAVLink report 2018-06-11 16:29:36 -07:00
Michael du Breuil fae8d1e489 Plane: Log navigation target location
Closes #4358
2018-06-12 09:08:58 +10:00
Peter Barker 2cdcca2841 Plane: move handling of MAV_CMD_DO_GRIPPER up 2018-06-11 19:07:39 +01:00
Andrew Tridgell d8a7618e15 Plane: update use of AC_Loiter controller for quadplane
this changes the way the loiter controller is initialised for QLOITER,
after discussions with Leonard.

The way we were doing it could cause a sudden acceleration demand when
switching into QLOITER.

This also changes the default loiter parameters to reduce the maximum
acceleration that will be applied in QLOITER. Many thanks to Leonard for
the advice
2018-06-11 08:40:58 +09:00
Michael du Breuil 47c0048499 Plane: Remove manual polling of flap input channel 2018-06-05 09:51:09 +10:00
Michael du Breuil a98a8d0789 Plane: Update to support new RC_Overrides conventions 2018-06-05 09:51:09 +10:00
Michael du Breuil 749861f8ad Plane: Only send healthy airspeed reports 2018-06-05 09:27:19 +10:00
Michael du Breuil 44f2a652f3 Plane: Remove software type param 2018-06-05 09:14:12 +10:00
Peter Barker 9437e893e5 Plane: move try_send_message handling of EKF_STATUS_REPORT up 2018-06-01 16:12:45 +01:00
Peter Barker ac729f4614 Plane: lock home when it is set from the GCS 2018-05-29 14:38:45 +10:00
Peter Barker 18c4823427 Plane: return MAV_RESULT_ACCEPTED for setting home to current location 2018-05-29 14:38:45 +10:00
Peter Barker bc9df01d21 Plane: remove sending of statustext for home location 2018-05-29 14:38:45 +10:00
Peter Barker 22306c370b Plane: factor out a Plane::set_home 2018-05-29 14:38:45 +10:00
Peter Barker ad600fff68 Plane: split home-set and home-locked state 2018-05-29 14:38:45 +10:00
Peter Barker 5a087ee7e2 Plane: create persist_streamrates() callback to indicate persistence 2018-05-29 13:08:29 +10:00
Peter Barker 8b4ffb11f5 Plane: move sending of vfr_hud up 2018-05-29 13:00:40 +10:00
Tom Pittenger 4dca1c48f2 Plane: update vehicle max_speed to ADSB library 2018-05-23 14:02:45 -07:00
Peter Barker ef77bea4eb Plane: move sending of simstate up 2018-05-23 18:36:50 +10:00
Peter Barker 2a68eca273 Plane: add type-correctness for stream messages 2018-05-22 11:21:25 +10:00
Peter Barker 2112d76b75 Plane: move try_send_message of servo-output-raw up 2018-05-21 19:08:08 +01:00
Andrew Tridgell ce73918873 Plane: fixed throttle_percentage for twin engine planes
there is no servo output for function 70 - use the scaled value
2018-05-21 14:39:56 +10:00
Andrew Tridgell 805b159fd4 Plane: update release notes for 3.9.0 2018-05-21 14:38:35 +10:00
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