Commit Graph

108 Commits

Author SHA1 Message Date
Lucas De Marchi baa287e5e5 ArduPlane: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03:00
Rimvydas Naktinis 9fdf39baf0 Plane: Added a method that returns current altitude relative to terrain, if available, or home otherwise. 2016-05-05 09:02:20 -07:00
Michael du Breuil 0fcfcdc169 Plane: Broadcast POSITION_TARGET_GLOBAL_INT as part of the EXTENDED_STATUS stream 2016-05-01 07:38:23 +10:00
Andrew Tridgell a99616bd10 Plane: prepare for 3.6.0beta1 release 2016-04-30 14:34:47 +10:00
Andrew Tridgell 4666b25258 Plane: initial implementation of QRTL for quadplane RTL 2016-04-30 14:34:47 +10:00
Michael du Breuil de1e299754 Plane: Remove support for CONDITION_CHANGE_ALT 2016-04-30 10:56:05 +09:00
Michael du Breuil 731c68f273 Plane: Change mode to RTL on end of mission rather then staying in auto
Deleted commands_process as it had 2 lines of useful code left, and was cleaner to move the remaining two lines into the caller case
2016-04-29 13:12:18 +10:00
James Stoyell 4e7e84fc99 Plane: Modified last_valid_rc_ms AFS failsafe input to work when standard failsafe is on
Ran into a bug on our physical plane where failsafe.last_valid_rc_ms was not recognizing that the transmitter had failed. This is likely due to how the standard failsafe works in receiving lower-than-possible throttle values. So in order to account for this, I added a new variable to the failsafe, AFS_last_valid_rc_ms, and I update it only if the ch3_failsafe (the throttle failsafe) is not on. If the throttle failsafe is on, that means that the plane has indeed lost transmitter input, so the AFS needs to recognize that.
2016-04-22 11:48:36 -07:00
Tom Pittenger 2ba9a04bf5 Plane: smooth-out the end of takeoff pitch by reducing takeoff pitch min via TKOFF_PLIM_SEC
@Description: This parameter reduces the pitch minimum limit of an auto-takeoff just a few seconds before it reaches the target altitude. This reduces overshoot by allowing the flight controller to start leveling off a few seconds before reaching the target height. When set to zero, the mission pitch min is enforced all the way to and through the target altitude, otherwise the pitch min slowly reduces to zero in the final segment. This is the pitch_min, not the demand. The flight controller should still be commanding to gain altitude to finish the takeoff but with this param it is not forcing it higher than it wants to be. (+1 squashed commits)
2016-04-21 22:54:17 -07:00
Andrew Tridgell cf7b6123a9 Plane: log the number of lost log messages 2016-04-21 16:45:02 +10:00
Andrew Tridgell 8683616d8c Plane: redo scheduler table and improve perf logging
The scheduler table was still setup for a worst case CPU of
AVR2560. Adjust times for the stm32 and improve perf logging
2016-04-21 16:45:02 +10:00
Andrew Tridgell a7006a7784 Plane: refactor perf variables into a structure 2016-04-21 16:45:02 +10:00
Andrew Tridgell 27fb35253c Plane: added in-flight transmitter tuning 2016-04-16 20:26:43 +10:00
Tom Pittenger 436062ef37 Plane: improved crash detection
- fixes bug where a bungee launch is configured but the aircraft gets bumped and triggers the prop to spin up. This will now detect that and "crash' and disable the motor
2016-04-14 22:34:46 -07:00
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Andrew Tridgell dc9d87fde3 Plane: prepare for 3.5.2 release 2016-03-26 14:52:17 +11:00
Andrew Tridgell 0442c2c659 Plane: prepare for 3.5.1 release 2016-03-21 09:44:52 +11:00
Lucas De Marchi e01d49ff53 ArduPlane: replace header guard with pragma once 2016-03-16 18:40:45 +11:00
Michael du Breuil 0117522998 Plane: Use arming voltage 2016-03-14 09:06:58 -07:00
Andrew Tridgell f4ccf94dfc Plane: added QLAND mode
for VTOL landing. Use for failsafe as well
2016-03-09 18:20:41 +11:00
Tom Pittenger ed6aa4ed17 Plane: added throttle limiting via max power (current*voltage) 2016-03-02 10:20:44 -08:00
Tom Pittenger be3941efdf Plane: unify loiter mission items to require heading to next wp
- except loiter_unlimited because it never exits
2016-03-02 08:48:25 -08:00
Tom Pittenger 6399d00950 Plane: convert to using static send_statustext
- no more MSG_STATUSTEXT
- TODO: replace calls to gcs_send_text and gcs_send_text_fmt to GCS_MAVLINK::send_statustext()
2016-02-24 09:18:06 +11:00
Tom Pittenger 2e92089ce6 Plane: Reverse Thrust
Reverse thrust for controlled landings, even with much steeper approach slopes. This is achieved by allowing throttle demand to go negative to maintain a target airspeed. A Pre-Flare stage was added, triggered by an altitude, to allow for a slower airspeed just before land. That lower airspeed can be near stall.
new params LAND_PF_ALT, LAND_PF_SEC, LAND_PF_ARSPD, USE_REV_THRUST
2016-02-09 14:18:02 +11:00
Tom Pittenger 1cb094f12e Plane: make throttle signed (pos and neg) 2016-02-09 14:18:02 +11:00
Tom Pittenger 9157f634eb Plane: Add Tom Pittenger to authors list 2016-02-02 10:50:12 +09:00
Andrew Tridgell 379ca5ac00 Plane: prepare for 3.5.0 release 2016-01-30 13:04:51 +11:00
Andrew Tridgell 99847da297 Plane: release 3.5.0beta2 2016-01-29 12:21:39 +11:00
Michael du Breuil bcc939930c Plane: Only resend the mixer configuration if its changed 2016-01-29 12:20:14 +11:00
Andrew Tridgell d82c8dcd6d ArduPlane: update for changed AP_Camera API 2016-01-29 09:19:44 +11:00
Dario Lindo Andres 9bba55f937 ArduPlane: Added precise camera trigger logging
Added update_trigger and check_digital_pin functions
added camera trigger precise time mark
detect camera feedback pin status
added support for simple digital pin
included support for digital pin. Already included in
added support for TRIGGER MSG
2016-01-29 09:19:43 +11:00
Andrew Tridgell 23eef91c59 Plane: added parameter RTL_RADIUS
this allows the loiter radius for RTL to be controlled separately from
the radius for loiter (as requested by a user)
2016-01-19 15:04:30 +11:00
Andrew Tridgell ebe1fe0b17 Plane: raise version to 3.5.0beta1 2016-01-09 13:33:27 +11:00
Andrew Tridgell 70018ee0cb Plane: fixed final descent for VTOL auto landing 2016-01-09 07:38:54 +11:00
Andrew Tridgell f068a8c913 Plane: added support for VTOL_TAKEOFF and VTOL_LAND commands 2016-01-09 07:38:53 +11:00
Andrew Tridgell 0d6b353bcb Plane: added quad assistance and auto support for quadplane 2016-01-09 07:38:52 +11:00
Andrew Tridgell 6468fc6d93 Plane: Initial implementation of quadplane
adds "HOVER" mode
2016-01-09 07:38:52 +11:00
Tom Pittenger 7cde90553d Plane: new param CRASH_ACC_THRESH
@Description: X-Axis deceleration threshold to notify the crash detector that there was a possible impact which helps disarm the motor quickly after a crash. This value should be much higher than normal negative x-axis forces during normal flight, check flight log files to determine the average IMU.x values for your aircraft and motor type. Higher value means less sensative (triggers on higher impact). For electric planes that don't vibrate much during fight a value of 25 is good (that's about 2.5G). For petrol/nitro planes you'll want a higher value. Set to 0 to disable the collision detector.
2016-01-02 09:58:32 +11:00
Tom Pittenger 21205f8b41 Plane: improved crash detection logic and agility
- inhibit crash detection warnings when disabled by param so now it can be completely disabled
- reset is_crashed when disabled by param
- fixed pre-takeoff detection bug by adding in_preLaunch_flight_stage() where we are actually in FLIGHT_NORMAL instead of FLIGHT_TAKEOFF during setup of bungee launches. This now detects if we're in that state
- simplified the use of been_auto_flying to check across all flight stages. before it was excluded to handle hand-launches which can now be detected with in_preLaunch_flight_stage()
- added impact detector timer to clamp is_flying a few seconds after an impact
- logging new impact detector as "STAT.Hit"
2016-01-02 09:58:31 +11:00
Tom Pittenger 3b06260358 Plane: refactored interface
- added guided mode handling
- now handles gracefully a manual mode changes during evasion
2015-12-31 15:36:49 +11:00
Siddharth Bharat Purohit 78566bda36 Plane: wire up accel calibrator for plane 2015-12-29 10:46:35 -08:00
Andrew Tridgell 513d5c17b9 Plane: allow for settable main loop rate 2015-12-27 14:57:19 +09:00
Julien BERAUD 8e66ce6f27 Plane: Update optical flow declaration
Pass ahrs as param
2015-12-18 17:56:06 +11:00
Lucas De Marchi 1308dd888f ArduPlane: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:45 +11:00
Peter Barker 574f95bd76 Plane: support multiple simultaneous backends 2015-12-03 13:21:51 +11:00
Tom Pittenger eaad72c192 Plane: Add support for handing ADS-B traffic
- parse MAVLINK_MSG_ADSB_VEHICLE msg
- new 1Hz adsb_update task to compare list against for threat detection
- perform object avoidance via loiter or loiter_and_descend. More methods are welcome!
2015-11-23 19:45:40 +11:00
Caio Marcelo de Oliveira Filho c8888329e1 Plane: use millis/micros/panic functions 2015-11-20 12:26:40 +09:00
lvale e18181e5c2 Plane: Uniformization of severities
Plane uniformization of severities
2015-11-09 09:38:25 +11:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00