Commit Graph

2059 Commits

Author SHA1 Message Date
Tom Pittenger 81f8358705 Plane: restart landing by jumping to DO_LAND_START or decrement mission
only takes effect on mode change
2015-08-29 21:17:35 +10:00
Stewart Loving-Gibbard 722dd29370 Plane: Moving to RSSI library for reading various kinds of RSSI, with the possibility of adding more.
* Retains ability to read from Analog Pin
* Adds ability to read RSSI from PWM channel value as is done in OpenLRSng, EazyUHF, and various other LRS.
* Handles any type of RSSI that provides RSSI values inverted - i.e. when the low value is the best signal and the high value is the worst signal.
* Has different key names from all existing RSSI parameters to provide for a clean break and easier distinguishing.
* Existing parameters are marked as obsolete
2015-08-29 08:05:59 +10:00
Randy Mackay 4bf36d787b Plane: use labs for int32 values 2015-08-28 13:14:50 +10:00
Randy Mackay cc68260478 Plane: sanity check do-set-home, do-set-ROI and fence-point locations 2015-08-28 13:14:38 +10:00
squilter 583c087eca Plane: update severities 2015-08-28 10:04:35 +10:00
André Kjellstrup d4ed30a023 Plane: releasenotes update 2015-08-28 10:03:16 +10:00
Randy Mackay e4c62811ea Plane: fix link to BATT parameter descriptions 2015-08-26 11:17:55 +09:00
Tom Pittenger ee9a66bd02 Plane: fix compiler warning re double promotion 2015-08-25 16:45:52 +09:00
Grant Morphett dda229aecd Plane: Added include guards for Plane.h 2015-08-25 13:54:16 +09:00
Tom Pittenger fed50aa5c5 Plane: is_crashed flag gets reset too easily
This behavior is excessively paranoid about clearing the flag so now it's extra sticky. You can only clear the is_crashed flag when:
- changing modes
- starting to execute a takeoff wp (if mission/index gets reset while still in auto)
- while in takeoff and throttle is suppressed it's held false

behavior that was removed:
- clear flag when starting to execute any nav cmd (reached next wp)
- if while crashed, you "start flying again" (non-sticky)
2015-08-24 20:00:12 +10:00
Tom Pittenger e1d566f9e7 Plane: simulator sets is_crashed
due to zero-ish vibration in SITL, the is_flying check thinks you're not flying, and this thinks you crashed. This is a SITL specific problem but it brings to light that *if* someone actually had a very low vibration aircraft we don't want to crash them. So, the vibe test has been removed for now. A better test is a variance on the accel
2015-08-24 00:32:41 -07:00
Andrew Tridgell 019f2af930 Plane: fixed build with HIL disabled 2015-08-23 22:21:51 +10:00
Tom Pittenger f4f111775e Plane: Log height of zero instead of old value 2015-08-23 16:55:08 +10:00
ziltoid2 b9dd6b7aac Plane: prevent delayed compass HIL data from disabling compass at system startup only 2015-08-23 16:48:48 +10:00
Tom Pittenger 37336bbbe1 Plane: moved is_flying related code to its own file 2015-08-23 10:34:19 +10:00
Tom Pittenger 204ff7b158 Plane: move statics into new struct
removed default case statements
2015-08-23 10:34:18 +10:00
Tom Pittenger 6d0ad05192 GCS_Mavlink: added is_crashed to mavlink heartbeat status which shows EMERGENCY 2015-08-23 10:34:18 +10:00
Tom Pittenger da8f4f9e95 Plane: reworked is_flying
add crash detection, allow disengage via param CRASH_DETECT
improved is_flying behavior
take off, landing and hard-landing improvements
add stillness check to is_flying and log it
minimum airspeed is determined ARSPD_FBW_MIN*0.75
2015-08-23 10:34:18 +10:00
squilter d421644f3a Plane: define and send FIRMWARE_VERSION 2015-08-23 09:21:57 +09:00
Michael Day f20beecb0b Plane: Climb/descent "intent" param with CONTINUE_AND_CHANGE_ALT
Param 1 of CONTINUE_AND_CHANGE_ALT now denotes which direction the
user expects the plane to travel when changing altitude:

0 = no expectation, command completes when within 5 m of altitude.
1 = climb expected, command completes at or above altitude.
2 = descent expected, command completes at or below altitude.
2015-08-20 11:37:17 +10:00
Andrew Tridgell f66174a1ce Plane: improved 3.4.0 release notes 2015-08-20 11:30:28 +10:00
Andrew Tridgell 0c833b76b7 Plane: update release notes for 3.4.0beta1 2015-08-20 11:11:28 +10:00
Andrew Tridgell b1f810fbb9 Plane: prepare plane 3.4.0beta1 release 2015-08-20 10:53:48 +10:00
Tom Pittenger 86e3116fb6 Plane: implement try send mission_item_reached
clean up unreachable code
2015-08-19 15:42:07 +10:00
Tom Pittenger f1eb2f88df Plane: post "Distance from LAND point" on every land
- waits until disarm after a land
2015-08-18 17:20:20 +10:00
Stewart Loving-Gibbard eb2ca91f1c Plane: Fixing unambiguous spelling errors in Parameters.cpp file.
These are user-visible in Mission Planner and the like.
2015-08-18 17:16:19 +10:00
Andrew Tridgell 6186b7a453 Plane: disable TRIM_RC_AT_START by default 2015-08-15 19:13:30 +10:00
Andrew Tridgell cc96f80f02 Plane: make TRAINING mode obey stall prevention roll limits
Fixes issue#2014
2015-08-14 13:36:21 +10:00
Andrew Tridgell ac2e1552b2 Plane: don't do battery failsafe when disarmed 2015-08-14 13:17:48 +10:00
Andrew Tridgell 58e829553f Plane: prevent build error with MSG_RPM 2015-08-12 15:03:52 +10:00
Andrew Tridgell f2c1010501 Plane: prevent mode switch changes changing WP tracking
this fixes a bug where a mode switch change during an AUTO mission
which does not change the flight mode would cause cross tracking to be
reset, so the plane will not correctly follow the desired track

Many thanks to Michael Du Breuil for the log that showed this bug
2015-08-12 14:42:49 +10:00
Gustavo Jose de Sousa 93c80b03ae ArduPlane: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:40 +10:00
squilter c24ba83fb1 Plane: init vehicle capabilities 2015-08-05 16:08:49 +09:00
Przemek Lekston ca915d9928 Plane: fix "logging disabled" build. 2015-08-03 10:07:52 +10:00
Grant Morphett c87929e907 Plane: Fix landing to stop divide by zero if params are 0
If someone mistakenly puts all 0's in their LAND command then
total_distance will be calculated as 0 and cause a divide by 0 error
below thus crashing ArduPilot.  Lets avoid that.
2015-08-03 09:53:48 +10:00
Andrew Tridgell 1b13be4ad7 Plane: disable camera logging when camera support disabled 2015-07-30 12:17:48 +10:00
Andrew Tridgell 6e0057778b Plane: remove unused file 2015-07-30 11:14:39 +10:00
Andrew Tridgell 9f9080983b Plane: trim out some log msgs on APM2
save a bit more flash
2015-07-30 11:14:06 +10:00
Andrew Tridgell 49f7adcc80 Plane: re-enable geofencing on APM2
it only just fits ...
2015-07-30 11:04:31 +10:00
Andrew Tridgell 6c07795b63 Plane: added HIL_SUPPORT define
disable HIL support on APM2 to save flash space
2015-07-30 11:04:31 +10:00
Andrew Tridgell 8f0e7e0693 Plane: fixed above_location_current() for non-terrain alt
thanks to Lekston for finding the bug (PR#2610)
2015-07-29 08:20:23 +10:00
Andrew Tridgell 58fa38cc12 Plane: allow rudder disarm based on ARMING_RUDDER parameter 2015-07-23 21:48:50 +10:00
pepevalbe da41d85433 Plane: It is possible to disarm with left rudder.
Using is_flying() avoid accidentally disarming while flying.
2015-07-23 21:48:44 +10:00
Przemek Lekston 4b38d444dd Plane: fix default behaviour of flaps. 2015-07-23 15:28:08 +10:00
Przemek Lekston 6a62b11536 Plane: fix LOITER_TO_ALT to verify headings towards waypoints within the loiter radius.
Whenever next waypoint is within the loiter radius, maintaining loiter would prevent us from ever pointing toward the next waypoint. Hence for very close waypoints loiter_to_alt becomes verified by the altitude only.
2015-07-23 15:24:43 +10:00
Grant Morphett cc6a981b12 Plane: deleted the old command_description.txt file which isn't used. 2015-07-21 16:31:24 +09:00
Andrew Tridgell 51bdbea745 Plane: fixed format for ARM message 2015-07-20 09:46:19 +10:00
Randy Mackay b670988e05 Plane: log IMUDT 2015-07-14 13:31:56 +09:00
Andrew Tridgell 266857c595 Plane: avoid linking optflow on APM2
not used, just taking memory
2015-07-10 16:46:30 +10:00
Lucas De Marchi e97034f8e9 ArduPlane: use ARRAY_SIZE macro 2015-07-07 07:56:30 +10:00
Randy Mackay 76ccf4043e Plane: log ahrs home and ekf origin 2015-07-06 12:11:56 +09:00
Tom Pittenger f1ee129423 Plane: compiler warnings
- float to double in gcs_send_test (x2)
- float to bool
2015-07-06 09:30:19 +10:00
Andre Kjellstrup edc32092ce Plane: Do not run long_failsafe during final or landing. 2015-07-02 14:28:45 +10:00
Andre Kjellstrup 9d525d4382 Plane: Do not run FailSafe if on final approach or landing.
A failsafe (Circle, RTL) would easily become a disaster if trigged
during approach or final.
2015-07-02 14:28:45 +10:00
Andre Kjellstrup baf4989a80 Plane: Ignore low voltage failsafe during landing
Log it, but do not switch to RTL if already in final or landing.
2015-07-02 14:28:44 +10:00
Peter Barker 3fce7eb21a Plane: use common mission logging code 2015-06-30 16:23:35 +10:00
Peter Barker bbfe67fe2a Plane: use common system information logging 2015-06-30 16:23:34 +10:00
Peter Barker 7f0a0cf64f Plane: DataFlash frontend/backend split 2015-06-26 16:02:50 +10:00
Michael du Breuil 54c06cde02 Plane: Log the steering controller PID state 2015-06-22 15:41:44 +10:00
Michael du Breuil 1a121f543b Plane: Use PIDS for steering rather then PIDY 2015-06-22 15:41:44 +10:00
Andrew Tridgell 4aac2c5c96 Plane: trigger OVERRIDE_CHAN in px4io
setup the MODESWITCH channel as our OVERRIDE_CHAN, allowing for
instant manual passthru in px4io when OVERRIDE_CHAN goes above 1750

This makes for faster switching, and avoids bugs where a still enabled
FMU channel disables override
2015-06-21 18:19:16 +10:00
Andrew Tridgell 248bf8c5a3 Plane: disable geofence on APM2 2015-06-20 14:52:42 +10:00
Andrew Tridgell 2dbe372b2f Plane: cleanup some coverity warnings 2015-06-20 13:26:34 +10:00
Andrew Tridgell ae1f2e8bea Plane: fixed missing break statement 2015-06-20 12:35:07 +10:00
Andre Kjellstrup 19aa7caad0 GCS_Failsafe: option to trigger only in AUTO mode. 2015-06-18 07:52:43 +10:00
Andre Kjellstrup 39797529fd GCS_Failsafe: defines for new failsafe option 2015-06-18 07:52:42 +10:00
Andre Kjellstrup 3e84132f6b GCS_Failsafe: new parameter option 2015-06-18 07:52:42 +10:00
Andrew Tridgell 76c0293a85 Plane: added support for DO_AUTOTUNE_ENABLE 2015-06-15 09:20:55 +10:00
Andrew Tridgell d5c5400e76 Plane: added support for ALTITUDE_WAIT mission command 2015-06-15 09:20:55 +10:00
Andrew Tridgell 358a13261c Plane: moved sink_rate calculation to update_alt()
this makes it available to non-landing code
2015-06-15 09:20:55 +10:00
Randy Mackay 814cb5ce18 Plane: add vibration DF logging and send to GCS 2015-06-12 21:36:47 +09:00
Andrew Tridgell 3427224bfc Plane: fixed logging of parameters on arming 2015-06-12 13:11:06 +10:00
Eugene Shamaev 5b34fa4f6a Plane: added DSM bind support 2015-06-10 17:19:10 +10:00
Andrew Tridgell 6b9854457d Plane: added PID tuning logging for ground steering 2015-06-09 12:48:56 +10:00
Andrew Tridgell bc6a52f8db Plane: fixed handling of OVERRIDE_CHAN on arming
When arming we need to ensure that we don't enable any channels
otherwise PX4IO will think that FMU is active and will stop running
the internal RC mixer
2015-06-09 12:48:55 +10:00
Michael Oborne 7dcd24137e Plane: add bitmask documentation 2015-06-05 10:21:21 +09:00
Lucas De Marchi 6bbf0e7770 Plane: stop using alias FUNCTOR_BIND_VOID 2015-06-04 13:37:38 +09:00
Andrew Tridgell bf396d7138 Plane: log to tlog when we set home via MAVLink 2015-06-04 13:26:39 +10:00
Andrew Tridgell 5942bf5cf0 Plane: added plane specific arming checks
added check for roll and pitch limits, after flyaway due to small
LIM_ROLL_CD
2015-06-04 13:26:39 +10:00
Andrew Tridgell 47f4a5db10 Plane: try to load px4 mixer 10 times on boot
this allows for possible temporary failures
2015-06-02 21:59:03 +10:00
Andrew Tridgell 3e74b82bc4 Plane: fixed two bugs in px4io override code
First bug is going via microSD to poulate mixer. We can't rely on the
microSD being writeable or functioning properly. Instead create the
buffer in memory and only write a copy to the filesystem.

Second bug is related to extreme trim values on channels. If trim
values are well out of range then the mixer fails and override fails.
2015-06-02 21:48:18 +10:00
Randy Mackay 9ece826c28 Plane: Log_Write_Startup writes parameters 2015-06-01 20:22:50 +09:00
Grant Morphett 2c3cff7f84 Plane: Moving parameter logging to be after all systems have started 2015-06-01 20:22:40 +09:00
Andrew Tridgell db784c83dc Plane: removed unnecessary pragmas 2015-06-01 17:42:21 +10:00
Andrew Tridgell 9adc879253 Plane: changes for new AHRS API 2015-06-01 16:16:49 +10:00
Andrew Tridgell 1797e2baa8 Plane: simpler initalisation of plane class
take advantage of C++11 in-class initialisation
2015-06-01 08:48:54 +10:00
Andrew Tridgell 57544a3537 Plane: added blank Parameters.pde for MissionPlanner 2015-05-30 15:21:33 +09:00
Andrew Tridgell 1520d8f734 Plane: catch a px4_mixer failure case 2015-05-30 11:17:56 +10:00
Andrew Tridgell 9b77260ebb Plane: disable PID logging on APM2 2015-05-29 16:32:05 +10:00
Andrew Tridgell 2f5ade4810 Plane: use 16 bit mask for GCS_PID_MASK 2015-05-27 15:09:47 +10:00
Andrew Tridgell 09476bf9d3 Plane: added GCS_PID_MASK for realtime pid tuning 2015-05-27 14:28:46 +10:00
Andrew Tridgell c31da93726 Plane: log roll and pitch PIDs 2015-05-27 14:28:45 +10:00
Peter Barker d7ed06816a Plane: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:15 +10:00
Andrew Tridgell 964b8ed2f3 Plane: fix for scheduler API change 2015-05-26 14:33:52 +10:00
Lucas De Marchi 7c4cf41ebc ArduPlane: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:54 +10:00
Andrew Tridgell 97687f04af Plane: enable messages for MAVLink gimbal support 2015-05-26 08:30:30 +10:00
Andrew Tridgell 5511140f95 Plane: fixed fence return point on breach
this was broken by the recent guided mode changes. Thanks to Grant for
noticing!
2015-05-24 15:24:02 +10:00
Andrew Tridgell eee191875e Plane: fixed plane version, removing old pde 2015-05-22 16:07:43 +10:00
Andrew Tridgell 8974c879fe Plane: fixed paths for GCS_MAVLink parameter file 2015-05-21 11:42:45 +10:00
Andrew Tridgell 8359b75201 Plane: removed NOINLINE define 2015-05-21 09:35:55 +10:00
Andrew Tridgell 78f02634d0 Plane: fixed ins reference in plane object 2015-05-21 07:48:54 +10:00
Andrew Tridgell 441d96c946 Plane: fixed APM1 build 2015-05-21 07:48:53 +10:00
Andrew Tridgell 554869033f Plane: disabled rangefinder on APM2
this saves 5k of flash space, enough for support to be kept for
another release
2015-05-21 07:48:53 +10:00
Andrew Tridgell 6fe65cdd9a Plane: removed duplicate rangefinder 2015-05-21 07:48:53 +10:00
Andrew Tridgell b92c2409e4 Plane: added local millis() and micros() to reduce code size a bit 2015-05-21 07:48:53 +10:00
Andrew Tridgell 150af130ee Plane: get closer to making var_info appear in text segment 2015-05-21 07:48:52 +10:00
Andrew Tridgell 18c37935c9 Plane: convert from .pde to .cpp files 2015-05-21 07:48:52 +10:00
Andrew Tridgell f75e9f95d1 Plane: Adjust for new AP_Scheduler syntax 2015-05-21 07:48:48 +10:00
Andrew Tridgell 6be0932d82 Plane: prepare for 3.3.0 release 2015-05-20 18:01:21 +10:00
Andrew Tridgell db871cc581 Plane: prevent trim values out of range for PX4 mixer
thanks to Brian Christal for a good bug report!
2015-05-17 21:24:58 +10:00
Tom Pittenger b4be1b866a Copter: compiler warning stuff
float to double promotion via cos instead of cosf
2015-05-16 08:21:36 +10:00
Andrew Tridgell 9ceee3cea7 Plane: support setting just accel trim with preflight-cal
use param5==2
2015-05-16 07:56:35 +10:00
Randy Mackay 174c55b0af Plane: add support for 4th mavlink channel 2015-05-15 15:07:28 +09:00
Andrew Tridgell 2feee9aa88 Plane: call Log_Write_POS() 2015-05-15 14:28:15 +10:00
Andrew Tridgell e362b4fc04 Plane: fix for new compass API 2015-05-15 14:25:44 +10:00
Andrew Tridgell 7f488c1c9c Plane: removed duplicate rangefinder instance 2015-05-14 08:51:59 +10:00
Tom Pittenger 76f448e512 Plane: Write new mission to log without telling GCS 2015-05-13 20:25:57 +09:00
Randy Mackay 0db25426c0 Plane: use accel_calibrated_ok_all 2015-05-12 16:32:20 +09:00
Randy Mackay a3271e4584 Plane: clarify SYSID_MAV parameter description 2015-05-11 09:23:06 +09:00
Andrew Tridgell ff126db1d3 Plane: make GUIDED behaviour match copter
we now have to be in GUIDED mode to accept a new GUIDED WP. When
entering GUIDED mode start loitering about the current position
2015-05-10 14:28:02 +10:00
Tom Pittenger eb2bfcd2d3 Plane: replace fabs() with labs(), unnecessary int to float conversion 2015-05-09 09:57:25 +10:00
Tom Pittenger ba29967454 Plane: if receiving last mission item then log new mission to dataflash 2015-05-08 21:01:51 +10:00
Andrew Tridgell fd84a6b493 Plane: fixed missing break in fence floor logic 2015-05-08 16:27:16 +10:00
Michael Day ee14678d2a Plane: Allow disabling of only the fence floor. 2015-05-08 16:25:22 +10:00
Andrew Tridgell 1a7d831327 Plane: support raw IMU logging 2015-05-07 12:11:52 +10:00
Andrew Tridgell 8395b92309 Plane: revert AP_Math class change 2015-05-05 13:27:04 +10:00
Tom Pittenger 2301883d5c Plane: compiler warnings: function not declared 2015-05-05 13:27:01 +10:00
Tom Pittenger c4c47cba66 Plane: compile warnings: float to double. print statements require doubles 2015-05-05 13:26:59 +10:00
Tom Pittenger 43006c0eec Plane: compiler warnings: apply is_zero(float) or is_equal(float) 2015-05-05 13:26:58 +10:00
Tom Pittenger c2eeed7d85 Plane: compiler warnings: apply is_zero(float) or is_equal(float) 2015-05-05 13:26:57 +10:00
Tom Pittenger 0cbbb20dcf Plane: compiler warnings: apply is_zero(float) or is_equal(float) 2015-05-05 13:26:54 +10:00
Andrew Tridgell a299fdacdf Plane: fix for HAL_SITL rename 2015-05-05 09:45:57 +10:00
Michael Day 8a6fc0ad77 Plane: If LAND_FLARE_SEC is 0 use LAND_FLARE_ALT for aim_height.
See discussion here:

https://github.com/diydrones/ardupilot/pull/2197
2015-04-30 17:19:55 +10:00
Michael Day 05d065b471 Plane: Make LAND_FLARE_SEC optional. 2015-04-30 14:34:34 +10:00
Andrew Tridgell 93fed6c2ac Plane: update release notes for 3.3.0beta2 2015-04-30 14:07:30 +10:00
Andrew Tridgell c65f5a1bda Plane: disable camera mount support on APM2
this makes the firmware small enough to squeeze onto an APM2 again
2015-04-30 11:57:20 +10:00
Andrew Tridgell 75c9689a64 Plane: added armed and safety state to STAT log message 2015-04-30 11:15:08 +10:00
Andrew Tridgell 5038e1d26d Plane: remove deprecated log types
we no longer depend on the binary format for Replay, so we can change
IDs now
2015-04-30 11:05:17 +10:00
Tom Pittenger f5dfe7c650 ArduPlane: Log isFlying status
Log is_flying() status and its float probability in new STAT msg
and piggyback on MODE bitmask flag.
2015-04-30 10:57:03 +10:00
Randy Mackay e122916815 Plane: fix MNT param description 2015-04-29 09:07:52 +09:00
Tom Pittenger c974134ea4 ArduPlane: RTL Autoland skip HOME
With RTL_AUTOLAND=1 we navigate to HOME then to the DO_LAND_START commands. Now with RTL_AUTOLAND=2 we head directly to the DO_LAND_START commands and thus skip changing altitude to ALT_HOLD_RTL and head directly to the first land waypoint as if it was the next normal waypoint.
2015-04-28 12:09:00 +10:00
Andrew Tridgell 3c9ed9b5a6 Plane: don't limit down pitch during landing
there is no reason for a special case for aircraft without airspeed
sensors
2015-04-28 09:25:49 +10:00
Andrew Tridgell c73945686c Plane: use ahrs.yaw_sensor not direct compass read for yaw
also use 10 degrees of margin, to cope with fast yaw changes (this
function is called at only 10Hz)
2015-04-25 09:12:17 +10:00
Andrew Tridgell 343a682d22 Plane: fixed conditional for 0 lat/lon 2015-04-25 09:12:17 +10:00
Michael Day 607d9ca839 Plane: Implementation of do_ and verify_ for MAV_CMD_NAV_LOITER_TO_ALT 2015-04-25 09:12:16 +10:00
Tom Pittenger 1176146e06 Plane: fix compile warnings for unused functions 2015-04-24 14:09:43 +09:00
Tom Pittenger bd9b573969 Plane: Fix compile warnings
- const values declared as default double
- This is the first pass in fixing the warnings, trying to catch some low hanging fruit. All const double values are changed to float. For example: 1.0 is now 1.0f.
- Only except is in location.pde where some double stuff is happening
- I did not change the exponentials 1e7 type stuff which should be 1e7f. A different commit
2015-04-24 12:20:53 +09:00
Randy Mackay 0acc4af63c Plane: replace range finder health with status 2015-04-24 10:57:28 +09:00
Paul Riseborough 32f87d008a Plane: Allow EKF to pull data from range finder object 2015-04-24 10:56:56 +09:00
Niels Joubert 6b7b3247ed Plane: Handle GPS Injection 2015-04-24 08:01:33 +10:00
Jaime Machuca ab1cf2261d Plane: add call to send digicam configure messages from a mission item
Also add log_picture to separate the taking of a picture
from the dataflash logging and feedback to GCS
2015-04-20 13:50:17 +09:00
Andrew Tridgell 664c92fb81 Plane: fixed RUDDER_ONLY to not combine direct rudder output
this prevents us over-rolling in FBWA
2015-04-20 09:09:23 +10:00
Andrew Tridgell edec706c12 Plane: added RUDDER_ONLY parameter
this gives much easier setup for rudder only aircraft.
2015-04-20 09:09:23 +10:00
Michael du Breuil 78a3ce46b9 Plane: Use tecs to control the throttle during takeoff 2015-04-16 08:56:37 +10:00
Michael du Breuil 867ca05e17 Plane: fix a relative altitude check for glide slope building 2015-04-13 20:15:07 -07:00
Michael du Breuil 4b1d71e390 Plane: rebuild the glide slope if we are above it and already climbing
(controlled by GLIDE_SLOPE_THR)
2015-04-13 20:14:51 -07:00
Michael Day 0279fdb0de Plane: Never trigger fence breach in LAND_FINAL flight stage. 2015-04-14 11:12:39 +10:00
Andrew Tridgell 03a50712db Plane: default LAND_DISARMDELAY to 20 seconds
most people will want to disarm
2015-04-06 15:37:54 -07:00
Andrew Tridgell 36796fb810 Plane: added LOCAL_POSITION_NED message 2015-04-05 09:25:41 -07:00
Randy Mackay 7e4dd9666c Plane: fix serial manager integration 2015-04-01 15:13:20 -07:00
Randy Mackay ab749f884f Plane: integrate Serial Manager instance 2015-04-01 14:59:26 -07:00
Andrew Tridgell 6a33588f67 Plane: make LOG_BITMASK logging when disarmed clearer 2015-03-31 14:38:09 -07:00
Randy Mackay d3663d43c1 Plane: send invalid batt curr if monitor unhealthy 2015-03-20 11:05:35 +09:00
Andrew Tridgell 9468a59204 Plane: require 3 seconds of not flying to declare a crash on land 2015-03-17 10:40:16 +11:00
Tom Pittenger 1b0ed277b3 Plane: Disarm On Land
After a landing has occur using a LAND waypoint, automatically disarm
after this many seconds have passed. Use 0 to not disarm.
2015-03-17 10:30:41 +11:00
Andrew Tridgell 90bb97a144 Plane: added last_flying_ms to auto_state
used to find out how long it is since we were last flying
2015-03-17 10:12:00 +11:00
Andrew Tridgell 18b277a9d2 Plane: use arm_motors() and disarm_motors() 2015-03-17 10:12:00 +11:00
Andrew Tridgell dd1059cecf Plane: added arm_motors() and disarm_motors() helper functions 2015-03-17 10:12:00 +11:00
Andrew Tridgell 86ef4a738c Plane: only pass through throttle in failsafe if armed 2015-03-16 16:45:49 +11:00
Andrew Tridgell e55350a5d6 Plane: added crash detection in autoland
if we are no longer flying then flare, which turns off the motor

This is based on work by Tom Pittenger
2015-03-16 10:59:53 +11:00
Andrew Tridgell fb8b96ba0d Plane: make is_flying() a bit more accurate in landing approach
prevent false negatives using the sink rate
2015-03-16 10:58:36 +11:00
Andrew Tridgell 1c1798fb11 Plane: support much smoother flare transitions
provide the height above the ground to TECS so it can make a smarter
pre-flare transition
2015-03-15 13:53:08 +11:00
Andrew Tridgell cac7714693 Plane: fixed parameter typo 2015-03-14 14:53:02 +11:00
Andrew Tridgell b0cdf8952b Plane: added HIL_MODE parameter
this allows for HIL with any firmware
2015-03-13 22:52:56 +11:00
Víctor Mayoral Vilches 4ae3bf5399 Plane: Update compass to the new interface 2015-03-13 18:46:17 +11:00
Michael Day b02098e19e Plane: Make radio trim optional at ground start. 2015-03-13 13:11:44 +11:00
Tom Pittenger 420e9e0d2e Plane: added INITIAL_MODE which is the mode we boot up into.
This is useful when flying without a RX or if you have a RX that
outputs zeros without a detected Txmtr
2015-03-13 13:04:23 +11:00
Andrew Tridgell a942ebbb70 Plane: removed unnecessary prototype 2015-03-13 11:21:47 +11:00
Andrew Tridgell dc9e2a54f3 Plane: fixed use of HAL soft_armed 2015-03-13 11:20:43 +11:00
Tom Pittenger 659904bf65 Plane: sped up is_flying filter since it is running at only 1Hz 2015-03-13 11:07:19 +11:00
Tom Pittenger 8f7bb61a54 Plane: changed arm check method to use new is_flying code 2015-03-13 11:07:05 +11:00
Tom Pittenger 58b0702793 Plane: isFlying redesign
The is_flying() function is too simplistic to be used as a generic
status. Added a sticky heuristic method that depends on the arm
state. More thought should go into the boolean result of isFlying but
this is at least safer than the original method.
2015-03-13 11:06:54 +11:00
Randy Mackay cb1b4ab486 Plane: send EKF_STATUS_REPORT in extra3 stream 2015-03-12 13:43:58 +09:00
Andrew Tridgell 5175f21225 Plane: removed 1D accel calibration 2015-03-12 12:50:29 +11:00
Andrew Tridgell 16cdf64d63 Plane: added CLI_ENABLED option
this disables using CLI by default, even if compiled in. This is
needed to make standard firmwares work well with companion computers
where the CLI may cause startup issues
2015-03-09 17:58:37 +11:00
Andrew Tridgell fa70c95c8e Plane: set gyros disabled when calibrating 2015-03-09 17:58:36 +11:00
Andrew Tridgell 8ef8a964f1 Plane: use new interactive accelcal 2015-03-07 21:56:40 +11:00
Andrew Tridgell 999710d0e1 Plane: fixed issue where auto is entered before GPS lock
thanks to Tom Pittenger for noticing this!
2015-02-25 22:54:52 +11:00
Andrew Tridgell 98b583bccc Plane: fixed bungee launch
we need to not do the general purpose throttle suppression if in auto
takeoff
2015-02-25 13:11:27 +11:00
Andrew Tridgell 5afe3fb958 Plane: mark 3.3.0beta1 2015-02-23 15:07:06 +11:00
Andrew Tridgell 422d0f05bd Plane: provide terrain height to rangefinder
used for power saving
2015-02-23 14:15:14 +11:00
Andrew Tridgell 64dfc68784 Plane: log mode on arming
this ensures the log is recorded with the right flight mode
2015-02-23 14:15:14 +11:00
Andrew Tridgell 6cf029f82a Plane: fixed to allow TKOFF_THR_DELAY up to 12.7 seconds
thanks to a report by jman841
2015-02-21 20:23:22 +11:00
Andrew Tridgell bee703ab2a Plane: removed incorrect conditional on parameter enum 2015-02-21 20:23:22 +11:00
Andrew Tridgell 76f8b9b07c Plane: support DO_SET_HOME MAVLink command 2015-02-21 10:14:18 +11:00
Joao Fortuna 6ac8629451 Plane: Fixed MAVLINK stream trigger calculation. 2015-02-20 13:12:59 +09:00
Andrew Tridgell d0d5524bce Plane: mark ELEVON_MIXING as deprecated 2015-02-19 15:55:30 +11:00
Andrew Tridgell 3f225b1a73 Plane: lower default FS_LONG_TIMEOUT value from 20 to 5 seconds
20 seconds is too long to be in CIRCLE mode
2015-02-16 10:03:17 +11:00
Andrew Tridgell e9f87a2626 Plane: implement MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES 2015-02-12 09:04:25 +11:00
Jonathan Challinger 4105edaa87 Plane: use hal.util soft_armed state 2015-02-11 20:57:27 +11:00
Andrew Tridgell d0075c0d23 Plane: support AUTOPILOT_VERSION command 2015-02-11 19:52:50 +11:00
Andrew Tridgell 03e110c834 Plane: update release notes 2015-02-10 09:53:30 +11:00
Andrew Tridgell e0db5616a2 Plane: fixed HIL mode in plane 2015-02-10 09:53:30 +11:00
Andrew Tridgell 3edc1ea4db Plane: tell arming if logging is available 2015-02-06 19:05:02 +11:00
Andrew Tridgell 8108ee796e Plane: update release-notes in master 2015-02-05 21:02:22 +11:00
Andrew Tridgell 4d6a7996f7 Plane: the next release will be 3.3.0
quite a few large changes pending
2015-02-05 20:55:00 +11:00
Andrew Tridgell 00758a3e91 Plane: improved landing parameter descriptions
fixes issue #1776
2015-02-03 17:19:45 +11:00
Andrew Tridgell 33225c2955 Plane: mark master as 3.2.2alpha1 2015-02-03 17:11:25 +11:00
Andrew Tridgell 28341a6c7a Plane: handle very steep landings more gracefully
prevent us trying to put the flare point too high or too far back if
the mission requires a steep landing
2015-02-03 16:44:28 +11:00
Andrew Tridgell 2ae412d513 Plane: only reset mission on disarm if not in AUTO mode
disarming while in a mission should leave the plane still flying the
mission, but with motor stopped. The user may do this during a landing
for example, but we want to keep gliding
2015-02-03 16:44:27 +11:00
Andrew Tridgell a172d898c5 Plane: force throttle to zero when disarmed
don't rely on the safety switch
2015-02-03 16:44:27 +11:00
Andrew Tridgell 2b0ccae776 Plane: fixed build warning 2015-02-03 09:49:15 +11:00
Randy Mackay ff2a31e3ae Plane: compile error fix when mount disabled 2015-01-29 14:05:15 +11:00
Randy Mackay 3a1465c9d1 Plane: integrate SerialManager
call SerialManager init_console on startup
use SerialManager's set_block_writes_all
2015-01-29 14:05:15 +11:00
Randy Mackay 37d1079d25 Plane: move MNT param's underscore to mount lib 2015-01-29 13:57:19 +11:00
Randy Mackay 681d28838f Plane: integrate mount frontend-backend restructure
initialise mount on startup
use mount.has_pan_control method
remove calls to unimplemented mount.configure_cmd
remove call to update_mount_type which is now handled by mount lib
2015-01-29 13:57:18 +11:00
Andrew Tridgell 5d8cec23db Plane: update version to 3.2.1beta1 2015-01-27 17:22:13 +11:00
Andrew Tridgell 3123504b38 Plane: start release notes for 3.2.1 2015-01-27 17:22:13 +11:00
Matthias Badaire ee00302b62 Plane: Frsky telemtry change move parameter to init of the class
Parameter needs to be passed and use at the init of the class frsky telem
2015-01-22 16:49:39 +11:00
Dario Lindo Andres 7f5243026d Plane: Cleanup code to remove 1280 ifdefs
Due to the imposibility to fit actual code on Legacies 1280 chips, some
cleanup is needed.
2015-01-22 16:12:26 +11:00
Robert Lefebvre 395c868727 Plane: Change Compass logging to new DataFlash method that handles instances. 2015-01-21 14:37:54 +09:00
Robert Lefebvre 7efb4eef65 Plane: Change Compass logging to use DataFlash library method. 2015-01-21 14:37:38 +09:00
Robert Lefebvre a2d73b42b9 Plane: Change Mode logging to use DataFlash library method. 2015-01-21 14:37:36 +09:00
Robert Lefebvre ac513a84db Plane: Change Attitude logging to use DataFlash library method. 2015-01-21 14:37:34 +09:00
Robert Lefebvre 233083c8e9 Plane: Change current logging to use DataFlash library method. 2015-01-21 14:37:31 +09:00
Robert Lefebvre 747232b197 Plane: Deprecate some Log Message enumerations which are moving to the DataFlash library. 2015-01-21 14:37:29 +09:00
Andrew Tridgell 674a7aa8d4 Plane: use set_skip_gyro_cal() in arming library 2015-01-20 19:47:59 +11:00
Andrew Tridgell 059c3769f3 Plane: cope with the changed semantics if airspeed.use() 2015-01-20 11:28:35 +11:00
Andrew Tridgell 5a01933b7b Plane: use dataflash Log_Write_Airspeed() 2015-01-20 09:10:57 +11:00
Dario Lindo Andres 0ea7a7a0cc Plane: Corrected LOGGING_ENABLED
When we configure LOGGING_ENABLED to DISABLED code does not
compile. Now it works!
2015-01-17 10:42:11 +13:00
Andrew Tridgell b8bfa755a9 Plane: raise alpha version 2015-01-09 15:47:47 +11:00
Andrew Tridgell ca431a47a6 Plane: use all_healthy() for SYS_STATUS health 2015-01-09 11:51:51 +11:00
Andrew Tridgell 035b1302ed Plane: updates for new AP_Baro API 2015-01-09 11:50:54 +11:00
Andrew Tridgell 4cb464db83 Plane: reduce the frame size of setup_failsafe_mixing() 2015-01-09 11:38:15 +11:00
Grant Morphett e122c0961e Plane: Arming updated to use RC channel objects not RC channels directly
The code had g.rc_3.control_in which would bypass the channel mapping and meant
arming could only occur if the throttle was always mapped to channel 3.
Updated to use the channel mapping object.
2015-01-08 11:55:19 +11:00
Staroselskii Georgii dc410a4b42 Plane: added AK8963 support 2015-01-07 08:41:13 +11:00
Andrew Tridgell a2242305c7 Plane: use common send_opticalflow() 2015-01-03 15:53:35 +11:00
Andrew Tridgell 28f58df310 Plane: send HAGL in OPTICAL_FLOW 2015-01-03 15:44:50 +11:00
Andrew Tridgell 8f571f1225 Plane: make optflow available to AHRS 2015-01-03 14:16:34 +11:00
Andrew Tridgell 8708297341 Plane: update for new OptFlow API 2015-01-03 14:16:33 +11:00
Andrew Tridgell 1e3c23e5a3 Plane: on takeoff set prev_WP_loc to current_loc 2015-01-03 14:07:02 +11:00
Andrew Tridgell 80d1bd230e Plane: report bad AHRS health if uncalibrated accels with EKF
fixes issue #1720
2015-01-03 14:06:46 +11:00
Andrew Tridgell ae96a48efc Plane: use location_path_proportion()
this should produce better glide slopes when the aircraft is off
course
2015-01-01 15:17:45 +11:00
Randy Mackay 6bec527aa3 Plane: BATT param's underscore moved to library 2014-12-31 15:22:56 +09:00
Randy Mackay 7d18744094 Plane: use battery.voltage2 method for logging 2014-12-31 15:22:55 +09:00
Randy Mackay 5cdb8a4c2a Plane: use battery.has_current 2014-12-31 15:22:54 +09:00
Randy Mackay 9be53502df Plane: remove logging dependecy on optflow 2014-12-31 15:22:41 +09:00
priseborough 195cdb6fd6 Plane: Don't log EKF optical flow data if not required 2014-12-31 13:16:11 +09:00
Randy Mackay 11def53ca7 Plane: pre_arm_gps_check flag always true 2014-12-26 12:32:38 +09:00
Andrew Tridgell eb13395967 Plane: cleanup mavlink_system setup 2014-12-17 11:30:04 +11:00
Andrew Tridgell 976ae14f1f Plane: improve landing aim point calculation
try to account for wind and current ground speed to dynamically update
glide slope in landing to flare at the right point
2014-12-15 21:51:08 +11:00
Andrew Tridgell 12f0c49915 Plane: remove fwd of unknown msg types 2014-12-11 12:32:52 +09:00
Andrew Tridgell 507117bd8f Plane: removed use of mavlink_check_target() 2014-12-11 12:31:15 +09:00
Randy Mackay f4fc910fea Plane: send OPTICAL_FLOW msg to GCS 2014-12-08 14:58:32 +09:00
Randy Mackay 2b9bf69c9e Plane: send optflow health in extended status 2014-12-08 14:58:29 +09:00
Andrew Tridgell 0599f1dcb1 Plane: changed version number to 3.2.1alpha1 2014-12-06 18:37:39 +11:00
priseborough f23722ecee Plane: Remove statement about flow driver rate in comment 2014-12-06 18:16:48 +11:00
priseborough ca53d5fb62 Plane: Increase rate at which optical flow sensor is checked
The sensor driver runs asynchronously at 10Hz, so needs to be checked frequently for arrival of data.
2014-12-06 18:16:48 +11:00
priseborough 898ad7432b Plane : Only build optical flow with PX4 board
Fixes SITL compile errors
2014-12-06 18:16:48 +11:00
priseborough 2500f7e9c2 Plane : Add data logging for optical flow use with EKF 2014-12-06 18:16:48 +11:00
priseborough 2db9247117 Plane : Add logging and EKF read for updated flow sensor interface 2014-12-06 18:16:47 +11:00
priseborough f047e35167 Plane : Enable optical flow by default if sensor is fitted 2014-12-06 18:16:46 +11:00
priseborough 9707989b9f Plane : Preliminary optical flow integration 2014-12-06 18:16:45 +11:00
Andrew Tridgell 7f383facac Plane: re-enable CLI on non-APM1/APM2 boards 2014-12-03 20:14:26 +11:00
Andrew Tridgell c05a0bc67f Plane: prevent a change altitude command from causing a sudden descent
when a change altitude command comes in while a large glide slope
altitude change is present we could end up using the old glide slope
with the new altitude. This resets the altitude offset, causing a
direct altitude change
2014-12-03 18:31:23 +11:00
Andrew Tridgell a0f69e06a7 Plane: prevent baro reset from OVERRIDE_CHAN
using OVERRIDE_CHAN would cause a baro reset as it would mean we are
temporarily disarmed, and the "reset baro and GPS when disarmed" check
would reset the baro

Now we only do the mixer update if disarmed
2014-11-29 19:55:25 +11:00
Andrew Tridgell c299f721b1 Plane: fixed sense of landing sink rate calculation
thanks to BretC for reporting
2014-11-29 07:48:07 +11:00
Andrew Tridgell d1fb137651 Plane: mark development version 3.2.1alpha 2014-11-29 06:59:47 +11:00
Andrew Tridgell 2f0bc1f202 Plane: setup pwm esc scaling 2014-11-26 11:14:44 +11:00
Andrew Tridgell b88e6b6302 Plane: prepare for 3.2.0 release 2014-11-25 13:58:28 +11:00
Andrew Tridgell 19847d8607 Plane: fixed missing break statement 2014-11-25 13:15:25 +11:00
Michael Day 8662aaa878 Plane: Support MAV_CMD_DO_FENCE_ENABLE as a mission item. 2014-11-25 13:02:47 +11:00
Andrew Tridgell 77958f8fd4 Plane: fixed CONTINUE_AND_CHANGE_ALT command
current_loc should be used, not prev_WP_loc
2014-11-25 10:44:02 +11:00
Michael Day 95d2e79312 Plane: Keep throwing WP in front plane for CONTINUE_AND_CHANGE_ALT 2014-11-25 10:43:15 +11:00
Michael Day 442c188ae0 Plane: Implementation of MAV_CMD_CONTINUE_AND_CHANGE_ALT. 2014-11-25 10:43:15 +11:00
Kirill A. Kornilov 8071d7c1d3 Plane: use set_radio_trimmed() for flaperons
See discussion in issue #1425
2014-11-25 08:20:10 +11:00
Andrew Tridgell b4e01b7936 Plane: if SKIP_GYRO_CAL is set the do a gyro cal on 3D accel cal
otherwise the user has no opportunity to do a gyro calibration
2014-11-21 19:09:19 +11:00
Andrew Tridgell 826ae8ee8b Plane: prepare for 3.1.2beta3 2014-11-21 14:50:04 +11:00
Andrew Tridgell c33f54378f Plane: changed preflight calibration to prevent accel cal from MP
MissionPlanner sends param1=1 and param3=1 for preflight
calibration. This was having the effect of redoing the accel
calibration as 1D cal on every flight!
2014-11-21 14:46:42 +11:00
Andrew Tridgell 2c7290fdc0 Plane: fixed baro test in CLI
fixes issue #1623

thanks to klrill-ka
2014-11-19 21:42:27 +11:00
Andrew Tridgell 2bb7606fba Plane: no need to set flaperons separately from flaperon_update()
fixes issue #1622

thanks to klrill-ka
2014-11-19 21:32:49 +11:00
Andrew Tridgell a519e0abb6 Plane: fix build with new mavlink repo 2014-11-18 11:20:08 +11:00
Randy Mackay c74aff56c1 Plane: move MOUNT_STATUS lower in GCS_MAVLink 2014-11-17 15:59:44 -08:00
Arthur Benemann 9ae443f2a2 Plane: append MOUNT_STATUS message to STREAM_EXTRA3 messages 2014-11-17 15:59:31 -08:00
Andrew Tridgell 0672d1fc3c Plane: mark beta2 2014-11-16 14:41:37 +11:00
Andrew Tridgell 34f7daf0fe Plane: started work on 3.1.2 release notes 2014-11-16 14:41:29 +11:00
Andrew Tridgell 78d85dfafc Plane: fixed handling of trim for flapersons
this allows TRIM_AUTO to work for flaperons

fixes issue #1188
2014-11-16 14:41:03 +11:00
Andrew Tridgell 8bcbce16ed GCS_MAVLink: show rangefinder status in SYS_STATUS 2014-11-14 15:34:36 +11:00
Evan Slatyer c4093b159f ArduPlane failsafes: remove rc_override_active
- rc_override_active is never set anywhere in the ArduPlane code; it's only used for Copter and Rover. Removing it significantly simplifies the failsafe code.
- modified code has been tested in SITL. Heartbeat and RC failures in AUTO, CRUISE, and RTL modes (covering the three cases in the failsafe check functions) have been simulated with FS_LONG_ACTN = 0, 1, and 2, FS_SHORT_ACTN = 0, 1, and 2, and FS_GCS_ENABL = 0, 1, and 2. In all cases the results are identical to those with the original code.
2014-11-14 11:35:27 +11:00
Andrew Tridgell e4ca0e1c5c Plane: fixed comment on negative flaps 2014-11-14 11:29:33 +11:00
Andrew Tridgell ba2e204143 Plane: fixed trim and range handling for flaperons 2014-11-14 11:27:50 +11:00
Andrew Tridgell ed6358730a Plane: fixed failsafe pass-thru for APM2 2014-11-14 11:27:32 +11:00
Andrew Tridgell 7f5cc97769 Plane: changed for new AP_Airspeed API 2014-11-13 21:12:59 +11:00
Andrew Tridgell fa5bab2682 Plane: log raw pressure and offset 2014-11-13 17:49:14 +11:00
Andrew Tridgell 3813bcb7ce Plane: small improvement to takeoff docs 2014-11-13 14:24:37 +11:00
Andrew Tridgell 135f9b2c54 Plane: added STALL_PREVENTION option
this will allow users to disable it if it proves to be a problem with
no airspeed sensor
2014-11-13 14:06:00 +11:00
Andrew Tridgell 58fd72944d Plane: honor TKOFF_THR_MAX in set_servos()
fixes issue #1555
2014-11-13 11:35:28 +11:00
Andrew Tridgell c8060cb9f7 Plane: use load factor to limit nav_roll_cd
this calculates the aerodymanic load factor from smoothed airspeed and
uses it to limit roll to keep it below the level where the load factor
would take us past the aerodymanic limit of the airframe
2014-11-12 13:36:02 +11:00
Andrew Tridgell ba312856ea Plane: provide a temperature to baro from the airspeed sensor 2014-11-12 13:36:02 +11:00
Arthur Benemann 5e2d7b1eaa Plane: Implement MSG_CAMERA_FEEDBACK on planes 2014-11-11 10:31:58 -08:00