Commit Graph

390 Commits

Author SHA1 Message Date
Gone4Dirt e02a9890b3 Plane: force mission resume on RTL when DO_LAND_START in mission 2020-02-25 10:05:12 +11:00
Peter Barker 74dbcac40e ArduPlane: log disarm method 2020-02-22 12:16:29 +11:00
Andy Piper 04792b23a9 ArduPlane: add gyro fft logging 2020-02-22 11:15:37 +11:00
Peter Barker 58d45ef04a Plane: let AP_Vehicle handle loop() 2020-02-06 14:41:06 +11:00
Peter Barker a45abc7762 Plane: move setup method up to AP_Vehicle base class 2020-01-28 11:34:51 +11:00
Peter Barker de423a945f Plane: move rssi initialisation into init_ardupilot
This makes it the same as Rover and Copter.
2020-01-28 11:34:51 +11:00
Peter Barker 33a0e55b32 Plane: correct duplicate button instance 2019-12-10 09:29:52 +09:00
Peter Barker a567e8bc94 Copter: use https:// scheme for ardupilot URLs 2019-12-10 07:53:46 +11:00
Andrew Tridgell d872ca27ce Plane: added dynamic harmonic notch support 2019-11-19 07:08:01 +08:00
Andrew Tridgell 2b27cd2ce9 Plane: Add EFI Support 2019-11-17 20:10:54 +11:00
Michael du Breuil ee96ec7f0d Plane: Support new AP_Vehicle::set_mode 2019-10-25 08:48:22 +08:00
Andrew Tridgell ff400243e0 Plane: added a new TAKEOFF flight mode
takeoff then circle in direction of takeoff
2019-10-17 12:19:43 +11:00
Peter Barker b12f620233 Plane: fix format string warnings 2019-09-02 21:00:59 +10:00
Peter Barker 2768d229ed Plane: stop updating sensor status flags
These are updated as required in the gcs library itself.
2019-08-17 17:45:03 +10:00
Peter Barker 20626a1fe1 Plane: move automatic declination setting into AP_Compass itself 2019-08-13 10:02:13 +10:00
Michael du Breuil 22598b1a4b Plane: Reduce inerital nav dependence 2019-07-16 12:11:42 +09:00
Peter Barker fb2422e496 Plane: stop setting eas2tas in AirSpeed - it can work it out itself 2019-06-06 12:44:36 +10:00
Peter Barker 13f7022cec Plane: move Arming functions into AP_Arming file 2019-05-30 16:02:10 +09:00
Peter Barker 400aa53654 Plane: move arming-related functionality into parent classes
Logging moves up
arming via mavlink moves up
arming via switch moves up
2019-05-30 07:37:30 +09:00
Tom Pittenger 08d5e7d4ae Plane: move heartbeat sending to gcs instead of by vehicles 2019-05-14 10:54:45 -06:00
Vinicius Knabben 99ad94ec49 Plane: Added parachute release on critcal sink rate and battery failsafe actions
Signed-off-by: Vinicius Knabben <viniciusknabben@hotmail.com>
2019-04-30 10:04:58 +10:00
Peter Barker 14a8bf3aec Plane: move responsibility for logging into library 2019-04-23 10:06:17 +10:00
Peter Barker ad16f31e11 Plane: call compass cal routine directly from sched table 2019-04-23 10:06:17 +10:00
Pierre Kancir 65b4ba0539 ArduPlane: use past_interval_finish_line and line_path_proportion from Location 2019-04-23 09:20:43 +10:00
Peter Barker 3a4cbdd41f Plane: remove pointless update_notify shim 2019-04-11 05:31:43 -07:00
Michael du Breuil 35bd143532 Plane: Update GPS before updating current_loc
Fixes 20ms of extra induced lag on the DCM position estimate
2019-04-05 23:08:24 -07:00
Tom Pittenger ade6281923 Plane: use #if ADVANCED_FAILSAFE == ENABLED just like Rover and Copter 2019-04-03 17:46:50 -07:00
Tom Pittenger 0270c57530 Plane: massive refactor and creation of Mode class 2019-04-02 16:28:52 +11:00
Peter Barker 73707077b5 Plane: move enabled parameter into compass library 2019-04-02 10:24:49 +11:00
Peter Barker f004765494 Plane: fix incorrect misleading comment 2019-03-31 18:35:53 -07:00
Peter Barker ca7566fff9 Plane: use enum class for ArmingMethod and ArmingRequired 2019-03-12 19:48:14 +11:00
Peter Barker bd444d97dc Plane: move sending of airspeed_autocal into AP_AirSpeed 2019-03-06 11:32:52 +11:00
Mark Whitehorn 487ad7a90f Plane: add QACRO mode for quadplanes
use acro_r/p/y_rate params in qacro
port ACRO throttle handling from copter

handle non-tailsitter controls
2019-03-05 10:13:20 +11:00
Dr.-Ing. Amilcar do Carmo Lucas f430fd14f6 Plane: replace location_offset() and get_distance() function calls with Location object member function calls
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Peter Barker dea75a87fd Plane: AHRS set_orientation renamed to update_orientation 2019-02-26 10:28:09 +11:00
Peter Barker 34853fb1bf Plane: move update_sensor_status_flags into GCS subclasses 2019-02-19 14:09:59 +11:00
Mark Whitehorn 95b3a5bacd ArduPlane: implement hover throttle learning for quadplanes
disable by default
check quadplane.enable in update_hover_learn
2019-02-16 19:04:13 -08:00
Peter Barker b6bf8d8368 Plane: make setting of home boolean in preparation for sanity checks 2019-02-15 08:28:45 +11:00
Michael du Breuil df1632054e Plane: Update throttle mix 2019-02-05 11:05:54 +11:00
Peter Barker 40856fef56 Plane: remove vestiges of old PX4_MIXER code 2019-01-19 19:31:03 +11:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Peter Barker 76b31f315a Plane: log_terrain_data no longer takes a DataFlash argument 2019-01-18 11:17:40 +11:00
Michael du Breuil 843c92ced5 Plane: Remove some redundant code/state resets 2019-01-15 10:45:50 +11:00
Andrew Tridgell f35cebcca4 Plane: fixed EKF yaw reset
we need to do the yaw reset before updating the rest of quadplane, or
it is not effective

thanks to Leonard for noticing the bug!
2019-01-14 08:32:17 +11:00
Nikhil Upadhye d1e93bae83 Plane: adding new mode QAUTOTUNE
copter like autotune support for quadplanes and tailsitter in VTOL mode.

cleanup
2018-12-14 16:33:11 +11:00
Peter Barker 153228bef5 Plane: call GCS update functions at quadcopter main loop rate 2018-12-10 12:52:41 +09:00
Peter Barker 7f5c0db949 Plane: adjust for new update entry points into GCS 2018-12-10 12:52:41 +09:00
IamPete1 c6e70c0454 Plane: add roll limit for tailsitters
Quadplane: add tailsitter pitch params
2018-12-01 09:40:07 +11:00
Peter Barker ba3a369651 Plane: remove update_events scheduler shim 2018-11-27 10:07:13 +11:00
Michael du Breuil 1e220d3d37 Plane: Add support for mode change to QLand as a failsafe 2018-11-24 14:37:04 -08:00
Peter Barker d4e88bc6ba Plane: remove pointless wrappers around RC_Channels functions 2018-11-23 10:56:17 +11:00
Peter Barker 03b71e1123 Plane: remove pointless wrappers around gcs functions 2018-11-23 10:56:17 +11:00
Andrew Tridgell da69bf3391 Plane: added an abstraction for reverse thrust
use have_reverse_thrust() and get_throttle_input()
2018-11-16 08:33:35 +11:00
Peter Barker a5c34f6172 Plane: OpticalFlow takes care of its own logging 2018-11-13 10:40:23 +11:00
Andrew Tridgell 432d786f82 Plane: pass height to landing gear update 2018-11-10 21:24:19 +11:00
Eugene Shamaev 01178a75e9 Plane: added landing gear support 2018-11-09 14:35:14 +11:00
Andrew Tridgell f2b8067023 Plane: pass manual_rc_mask to iocmu mixer 2018-11-07 07:35:45 +11:00
Andrew Tridgell c3d434bc35 Plane: pass mixing gain to iomcu 2018-11-07 07:35:45 +11:00
Andrew Tridgell d5c29fc57e Plane: use IOMCU mixing if available 2018-11-07 07:35:45 +11:00
Peter Barker 901664ce09 Plane: add support for RCn_OPTION (servorelay,camera)
Closes #7071
Closes #7666
2018-09-05 13:44:07 +10:00
Michael du Breuil e4bbcd5ee3 Plane: Don't initilize motors with a trim value 2018-08-23 13:19:08 +10:00
Alexander Malishev 001948d40c Plane: publish navigation info to OSD 2018-08-16 10:26:34 +10:00
Randy Mackay 903d00c4b2 Plane: remove compass accumulate 2018-08-06 11:05:34 +10:00
Andrew Tridgell 1d675390ab Plane: make soaring an optional build feature
this disables soaring on px4-v2, saving 5k of flash

This is needed to consider pr #9042, which takes a lot of flash space
2018-07-30 13:09:15 +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 4502fd21c3 Plane: use compass singleton for logging 2018-07-04 20:11:27 +01: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 9824832523 Plane: use AP_RTC
Plane: AP_GPS now sets the system time directly
2018-06-15 08:01:22 +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
Tom Pittenger 4dca1c48f2 Plane: update vehicle max_speed to ADSB library 2018-05-23 14:02:45 -07: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 68497f27fa Plane: move try_send_message handling of RC_CHANNELS up 2018-05-08 12:33:32 +01:00
Peter Barker 5ef417a669 Plane: GPS now logs its own data 2018-04-18 13:50:55 +09: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 7405bb7b85 Plane: Support new battery failsafes 2018-03-27 22:12:21 +01: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
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
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
Andrew Tridgell 2fb6113098 Plane: use AP:PerfInfo class 2018-02-10 10:50:22 +11:00
Andrew Tridgell d1e11a5bde Plane: fixed build (remove learn_offsets call) 2018-02-08 17:36:33 +11: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
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
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
Michael du Breuil 767018b1d4 Plane: Support unlocking cruise heading with rudder 2017-11-09 09:39:44 +11: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 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
Michael du Breuil d52f5155f0 Plane: Rename rc failsafe state members 2017-11-02 16:46:08 -07: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
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
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
Peter Barker 1a665280e9 Plane: remove CLI 2017-08-14 10:23:50 +09:00
Peter Barker 2fb46a67dd Plane: camera is responsible for taking distance-based-images and logging 2017-07-28 14:27:53 +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 c058fba5ac Plane: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +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 949e07c7e3 Plane: use DataFlash should_log to determine raw IMU logging 2017-06-29 15:26:27 +01: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
Michael du Breuil 92d505598b ArduPlane: Poll AP_Landing for fly forward information 2017-05-15 14:50:29 -07:00
Peter Barker 378015691b Plane: stop appending lf to PERF message 2017-05-01 16:21:55 +01: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 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 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
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 17ba8b3304 Plane: raise logging rate for PID and servos 2017-04-09 16:45:19 +10:00
Andrey Kolobov 35d406aeab Plane: added a soaring controller to Arduplane 2017-03-14 08:53:10 +11:00
Michael du Breuil 1bb806edb2 Plane: Use new landing interfaces 2017-03-02 12:38:59 +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 c787f4c56f Plane: initial support for tailsitter transitions 2017-02-18 17:26:43 +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
Tom Pittenger 1a34221db9 Plane: remove old commented code
- leftover from the AP_Landing stage refactor
2017-01-26 13:45:28 -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 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
Randy Mackay fc4741395d Plane: notify initialised after parameters loaded 2017-01-23 15:07:21 -08: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 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 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
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
Tom Pittenger a3ccca17ff Plane: use fabsf instead of fabs 2016-12-06 17:38:47 -08:00
Peter Barker 669dc01b67 Plane: correct on_flight_line landing stage check 2016-12-06 03:24:41 -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