Commit Graph

2194 Commits

Author SHA1 Message Date
Randy Mackay
f66d5f7a8c Plane: use ahrs.get_origin instead of ekf.getOriginLLH
This ensures we get the origin from the active EKF
2016-03-03 16:20:59 +09:00
Tom Pittenger
75be40ea59 Plane: add LAND_THR_SLEW 2016-03-02 10:54:19 -08:00
Tom Pittenger
ed6aa4ed17 Plane: added throttle limiting via max power (current*voltage) 2016-03-02 10:20:44 -08:00
Tom Pittenger
bf5005103c Plane: allow loiter waypoints to have a zero lat/lng or alt to mean use current 2016-03-02 08:49:11 -08:00
Tom Pittenger
be3941efdf Plane: unify loiter mission items to require heading to next wp
- except loiter_unlimited because it never exits
2016-03-02 08:48:25 -08:00
Tom Pittenger
9e452838ab Plane: loiter missions to default to loiter_radius if mission says 0 or 1.
- except loiter_unlim which uses RTL_loiter, although I'm not sure why.
2016-02-29 10:12:20 -08:00
Tom Pittenger
ed98617d42 Plane: utilize radius for loiter commands 2016-02-29 06:43:29 -08:00
Andrew Tridgell
f35d05e374 Plane: improved quadplane default gains
0.25 is better for an average quadplane for roll/pitch

0.5 is a bit high for accel-z, 0.3 is better
2016-02-29 21:46:27 +11:00
Andrew Tridgell
93ac82e1f6 Plane: write voltage/current much more frequently 2016-02-29 21:24:54 +11:00
Will Sackfield
fabe235130 ArduPlane: initialize the fail_test variable
* Clang complains if variables are not initialized
2016-02-29 14:14:37 +11:00
Will Sackfield
5f5035933f ArduPlane: static cast to uint8 on initialization of struct
* clang requires that the casting be explicit
2016-02-29 14:14:37 +11:00
Andrew Tridgell
968f07f583 Plane: allow live quadplane PID tuning 2016-02-29 14:10:32 +11:00
Tom Pittenger
b8fc524954 Plane: enforce expected flight_stage in TECS 2016-02-25 06:37:24 -08:00
Tom Pittenger
993e5b438c Plane: add to LAND_NEUTRL behavior
offer netrual vs disabled outputs
2016-02-25 05:51:44 -08:00
Tom Pittenger
6399d00950 Plane: convert to using static send_statustext
- no more MSG_STATUSTEXT
- TODO: replace calls to gcs_send_text and gcs_send_text_fmt to GCS_MAVLINK::send_statustext()
2016-02-24 09:18:06 +11:00
Andrew Tridgell
ad78a31255 Plane: move set_dataflash(0 for static logging 2016-02-24 09:18:05 +11:00
Tom Pittenger
881dabf048 Plane: add missionLoaded arming check fail for mis.len <= 1 2016-02-22 16:19:40 +11:00
Andrew Tridgell
1acf25b6e2 Plane: use set_dataflash()
give GCS_MAVLINK a dataflash object for logging text messages
2016-02-22 12:34:32 +11:00
Andrew Tridgell
b84b480086 Plane: added PID tuning for quadplane modes 2016-02-20 20:20:27 +11:00
Andrew Tridgell
e2abaefc44 Plane: check SCHED_LOOP_RATE for quadplane 2016-02-20 20:02:52 +11:00
Lucas De Marchi
0b22b520b8 ArduPlane: remove unused CMAKE define
This is a leftover from previos cmake build system.
2016-02-19 19:15:39 -02:00
Peter Barker
ca4017d093 Plane: defines.h should not use defines from config.h
config.h includes defines.h early, so defines in config.h are unavailable
2016-02-19 12:34:23 -02:00
Tom Pittenger
d0edfa5dfa Plane: compile warning fix
/ardupilot/ArduPlane/quadplane.cpp:773:107: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
2016-02-17 14:54:02 -08:00
Tom Pittenger
0b26a34f22 Plane: new param LAND_THEN_NEUTRL
// @Description: When enabled, after an autoland and auto-disarm via LAND_DISARMDELAY happens then set all servos to neutral. This is helpful when an aircraft has a rough landing upside down or a crazy angle causing the servos to strain.
2016-02-16 23:40:44 -08:00
Andrew Tridgell
8ecf54bf75 Plane: use throttle slew when in quadplane assisted flight
this prevents a sudden throttle change on a petrol motor when
transitioning
2016-02-13 11:38:33 +11:00
Tom Pittenger
a280396645 Plane: nonfunctional change, comment only. Units were in old in comment 2016-02-12 12:14:38 -08:00
Tom Pittenger
c837fbca2f Plane: 3/3 new param TECS_LAND_SRC for Land Sink Rate Change
// @Description: When zero, the flare sink rate (TECS_LAND_SINK) is a fixed sink demand. With this enabled the flare sinkrate will increase/decrease the flare sink demand as you get further beyond the LAND waypoint. Has no effect before the waypoint. This value is added to TECS_LAND_SINK proportional to distance traveled after wp. With an increasing sink rate you can still land in a given distance if you're traveling too fast and cruise passed the land point. A positive value will force the plane to land sooner proportional to distance passed land point. A negative number will tell the plane to slowly climb allowing for a pitched-up stall landing. Recommend 0.2 as initial value.
2016-02-12 11:39:27 -08:00
Tom Pittenger
8ac6343730 Plane: removing mission_cmd in TECS and making it bool is_landing
this is reverse-thrust cleanup suggested by Tridge
2016-02-12 11:22:59 -08:00
Tom Pittenger
d04b5e735f Plane: add SYS_STATUS reverse_motor
- helpful to tell GCS to interpret VFR_HUD as negative when bit is enabled
- throttle is sent as abs()
2016-02-11 18:46:01 +11:00
Tom Pittenger
fa53263ca9 Plane: make throttle_percentage() signed 2016-02-11 18:46:01 +11:00
Tom Pittenger
ebec68c55b Plane: param desc to increase THR_MIN range to include negative thrust 2016-02-10 22:18:07 -08:00
Tom Pittenger
f369899509 Plane: restrict rudder arming where reverse_thrust is enabled and commanding negative 2016-02-10 22:18:06 -08:00
Tom Pittenger
a920b7322d Plane: more desc for param USE_REV_THRUST 2016-02-10 22:04:50 -08:00
Tom Pittenger
046741d23b Plane: abort landing at 90% throttle instead of 95% 2016-02-08 21:13:43 -08:00
Tom Pittenger
b098466e87 Plane: reduce redundant logging of STAT from 6 Hz to 5 Hz
- STAT log entry was being done every 5 Hz plus at 1 Hz. This removes the 1Hz.
2016-02-08 21:13:12 -08:00
Tom Pittenger
66fcd8f58a Plane: run is_crashed at 5hz instead of 1hz 2016-02-08 21:13:04 -08:00
Andrew Tridgell
93185be1ff Plane: reset land_pre_flare on mode change 2016-02-09 14:18:02 +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
b8d5369ebd Plane: add flight stage LAND_PREFLARE 2016-02-09 14:18:02 +11:00
Andrew Tridgell
f8d8616598 Plane: support all types of multicopters in quadplane
adds Q_FRAME_CLASS for class of multicopter frame
2016-02-08 11:00:19 +11:00
Andrew Tridgell
eeda1b56de Plane: don't do throttle nudge while in geofence failsafe
user stick inputs should not apply when outside fence
2016-02-08 10:59:37 +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
Andrew Tridgell
125af1b856 Plane: added OVERRIDE_SAFETY parameter 2016-01-29 12:20:14 +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
8dba91658c ArduPlane: log a picture if AP_Camera::control() returns true 2016-01-29 10:01:51 +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
Jonathan Challinger
9000756c80 Plane: reflect changes to AP_Mount 2016-01-23 10:35:47 +09:00
Gustavo Jose de Sousa
c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
e9d3dc9e72 waf: vehicles and antennatracker: use methods from bld
Instead of from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
cf432e8b3e waf: ardupilotwaf: rename vehicle_stlib to ap_stlib
That function is not only for vehicles.
2016-01-22 20:10:28 -02:00
Gustavo Jose de Sousa
a35c0d48b0 waf: ardupilotwaf: rename program to ap_program
Make the rename so that there is no name clashes when defining it as a taskgen
method.
2016-01-22 20:10:28 -02:00
Andrew Tridgell
115d089904 Plane: continue limiting pitch during last phase of transition
this prevents a very high pitch demand causing the plane to slow down
to below assist speed
2016-01-20 18:30:48 +11:00
Andrew Tridgell
0223218c39 Plane: use altitude_error for quadplane climb rate assistance 2016-01-20 17:23:36 +11:00
Andrew Tridgell
69b2421563 Plane: ensure TECS is updated at 10Hz only 2016-01-20 17:23:36 +11:00
Andrew Tridgell
3a3afe42be Plane: don't force disarm on parachute release
in auto-throttle modes throttle is suppressed. In pilot controlled
modes pilot can lower throttle
2016-01-19 17:59:53 +11:00
squilter
c7e8a48a55 Plane: deploy parachute as fs action 2016-01-19 17:55:58 +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
3a9ebe3a8a Plane: added Q_TRAN_PIT_MAX 2016-01-19 11:05:56 +11:00
Andrew Tridgell
7e29761b99 Plane: try to smooth auto VTOL transitions 2016-01-19 11:05:56 +11:00
Andrew Tridgell
4adda34439 Plane: limit pitch to zero during airspeed wait VTOL mode 2016-01-19 11:05:56 +11:00
Lucas De Marchi
7f04e0106e waf: change binary names
APMrover2 -> ardurover
AntennaTracker -> antennatracker
ArduCopter -> arducopter
ArduPlane -> arduplane
2016-01-18 16:56:08 -02:00
Gustavo Jose de Sousa
17e5d99509 waf: allow partial builds with new mavlink as submodule
The task generator for the mavlink headers is given a name 'mavlink' and is
added as a dependency to all local static libraries, because all of them use
sources that include mavlink headers. It would be nice to have a good way to
detect sources that use mavlink headers or to declare list of libraries that
use the headers, so that the dependency could be added automatically.

Additionally, there's a minor change in syntax for the task generator: using
strings directly instead of lists.
2016-01-15 07:28:48 +11:00
Andrew Tridgell
eabceb34e1 Plane: update release notes for Pixracer support 2016-01-10 17:43:01 +11:00
Andrew Tridgell
5a24e93cc5 Plane: removed debug code and add quadplane setup checks 2016-01-09 16:26:13 +11:00
Andrew Tridgell
9e3c1fddef Plane: updated release notes 2016-01-09 15:17:45 +11:00
Andrew Tridgell
ebe1fe0b17 Plane: raise version to 3.5.0beta1 2016-01-09 13:33:27 +11:00
Tom Pittenger
7978872e32 AP_Plane: set path_propportion in TECS 2016-01-09 13:25:02 +11:00
Andrew Tridgell
ee819959b6 Plane: smoother takeoff and land transition in VTOL auto 2016-01-09 11:33:43 +11:00
Andrew Tridgell
2679cb2c50 Plane: improve yaw and position control in takeoff and landing
auto VTOL takeoff is always vertical. Yaw rate is zero on takeoff and
during VTOL descent
2016-01-09 10:47:41 +11:00
Andrew Tridgell
0986474eed Plane: call set_frame_orientation() before Init for quad motors 2016-01-09 07:44:45 +11:00
Andrew Tridgell
52c4715c94 Plane: fixed init bug on low memory for quadplane 2016-01-09 07:38:55 +11:00
Andrew Tridgell
787a6994a4 Plane: added Q_THR_MID parameter 2016-01-09 07:38:55 +11:00
Andrew Tridgell
4da798129e Plane: fixed zero throttle in QSTABILISE mode 2016-01-09 07:38:55 +11:00
Andrew Tridgell
cfb74406b6 Plane: fixed call to motors->Init() for quadplane 2016-01-09 07:38:55 +11:00
Andrew Tridgell
0a0e191284 Plane: init rc output after quadplane setup
this ensures first PWM pulses are correct
2016-01-09 07:38:55 +11:00
Andrew Tridgell
13a71c5cde Plane: use default motor mapping for channel setup 2016-01-09 07:38:55 +11:00
Andrew Tridgell
b1177521ef Plane: show throttle level in vtol modes 2016-01-09 07:38:54 +11:00
Andrew Tridgell
71b0d5fb6d Plane: disable quad motors in TRAINING and ACRO too 2016-01-09 07:38:54 +11:00
Andrew Tridgell
9c5ec5e74b Plane: allow yaw control in auto-throttle VTOL modes 2016-01-09 07:38:54 +11:00
Andrew Tridgell
70018ee0cb Plane: fixed final descent for VTOL auto landing 2016-01-09 07:38:54 +11:00
Andrew Tridgell
f259cf4b3f Plane: added Q_YAW_RATE_MAX parameter 2016-01-09 07:38:54 +11:00
Andrew Tridgell
f5a15fb7c5 Plane: don't yaw quad when disarming 2016-01-09 07:38:54 +11:00
Andrew Tridgell
ecd7d53cfc Plane: auto set trim on quad motor channels
this prevents a reboot causing a motor start
2016-01-09 07:38:54 +11:00
Andrew Tridgell
7010fd27ff Plane: fixed Q_THR_MAX_PWM parameter 2016-01-09 07:38:54 +11:00
Andrew Tridgell
780d1459f0 Plane: fixed force descend in VTOL land 2016-01-09 07:38:53 +11:00
Andrew Tridgell
4592085963 Plane: better VTOL land detection 2016-01-09 07:38:53 +11:00
Andrew Tridgell
fdd86c10ba Plane: smoother transitions to auto from VTOL takeoff 2016-01-09 07:38:53 +11:00
Andrew Tridgell
418464ab8c Plane: added quadplane version of is_flying() 2016-01-09 07:38:53 +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
5e784ddb5c Plane: consider flying status for throttle_wait 2016-01-09 07:38:53 +11:00
Andrew Tridgell
7afa2a493d Plane: implement VTOL flight stage 2016-01-09 07:38:53 +11:00
Andrew Tridgell
aab98ff757 Plane: fixed quad yaw assistance during transition timer 2016-01-09 07:38:52 +11:00
Andrew Tridgell
9ae4c3ec99 Plane: mark Q_ENABLE parameter as an enable parameter 2016-01-09 07:38:52 +11:00
Andrew Tridgell
0d6b353bcb Plane: added quad assistance and auto support for quadplane 2016-01-09 07:38:52 +11:00
Andrew Tridgell
48e1a0641f Plane: added throttle wait to quadplane 2016-01-09 07:38:52 +11:00
Andrew Tridgell
2983576067 Plane: added QLOITER mode
quadplane loiter
2016-01-09 07:38:52 +11:00
Andrew Tridgell
00ca292160 Plane: improved quadplane transition 2016-01-09 07:38:52 +11:00
Andrew Tridgell
ca85c332d6 Plane: separate QSTABILIZE and QHOVER modes 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
6cb20b679d Plane: add xtrack_error to DF log 2016-01-08 20:16:25 +11:00
Andrew Tridgell
f201552f6d Plane: always call load_all
this ensures defaults file works on first start after erase
2016-01-07 09:32:57 +11:00
Tom Pittenger
607201a9b1 Plane: zero course error for straight bungee launch
This fixes the behavior where it uses the heading when switched to AUTO instead of at launch causing a turn just after a bungee launch
2016-01-05 11:20:14 +11:00
Andrew Tridgell
7b6d862316 Plane: support up to 14 rc inputs for all boards 2016-01-04 08:22:35 +11:00
Andrew Tridgell
72edfcd1f6 Plane: update for changed peak hold API 2016-01-02 09:58:32 +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
Tom Pittenger
0bfe235d6b Plane: use abort landing logic with mavlink GO_AROUND cmd
- also enabled use of CMD_DO_GO_AROUND altitude param
2015-12-31 15:34:41 +11:00
Tom Pittenger
d18c25a0f9 Plane: add item_reached_msg to GUIDED 2015-12-31 15:31:39 +11:00
pepevalbe
9743e32f70 Plane: added group parameter for AP_Notify library 2015-12-31 11:33:05 +09:00
Siddharth Bharat Purohit
78566bda36 Plane: wire up accel calibrator for plane 2015-12-29 10:46:35 -08:00
Andrew Tridgell
7a5808276e Plane: fixed two build warnings with clang 2015-12-29 18:52:00 +11:00
Lucas De Marchi
a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Andrew Tridgell
513d5c17b9 Plane: allow for settable main loop rate 2015-12-27 14:57:19 +09:00
Andrew Tridgell
58d9b030ea Plane: update for Hz based AP_Scheduler 2015-12-27 14:57:08 +09:00
Don Gagne
eab8a8679d ArduPlane: fix invalid Range meta data 2015-12-27 16:10:44 +11:00
Andre Kjellstrup
6f5387c48d ArduPlane: Camera options for better camera control
All on one because they would not pass autotest if split up.
2015-12-18 18:16:11 +11:00
Jonathan Challinger
05eb723429 Plane: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Julien BERAUD
8e66ce6f27 Plane: Update optical flow declaration
Pass ahrs as param
2015-12-18 17:56:06 +11:00
Gustavo Jose de Sousa
dc81a2410e waf: use single entry point for make wrappers 2015-12-10 10:40:34 +09:00
Michael du Breuil
4b40a884e9 Plane: Don't disable compass checks for HIL mode unless actually in hil mode 2015-12-08 05:07:46 -07:00
Tom Pittenger
113961b66e Plane: compiler warning - double promotion 2015-12-07 15:49:55 +09:00
DonLakeFlyer
7479bc5734 Plane: return success or failure of get home position 2015-12-07 12:33:23 +09:00
Lucas De Marchi
1308dd888f ArduPlane: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:45 +11:00
Peter Barker
84b53e58d5 Plane: DataFlash-over-MAVLink support 2015-12-03 13:21:52 +11:00
Peter Barker
574f95bd76 Plane: support multiple simultaneous backends 2015-12-03 13:21:51 +11:00
Gustavo Jose de Sousa
7837bbfd81 waf: add a make wrappers 2015-12-03 07:54:32 +11:00
Gustavo Jose de Sousa
3100736c9f waf: add missing AP_ADSB library to ArduPlane 2015-12-03 07:54:32 +11:00
Lucas De Marchi
1cdc233bd2 waf: add missing AP_Parachute library to ArduPlane 2015-12-03 07:54:31 +11:00
Caio Marcelo de Oliveira Filho
6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi
8eb0b559f2 ArduPlane: avoid comparison between signed and unsigned 2015-12-01 16:28:18 -02:00
Lucas De Marchi
2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Tom Pittenger
4c1a70eb66 Plane: print start of land approach 2015-12-01 07:05:07 +11:00
Luis Vale Gonçalves
4722a388b9 Plane: Text revisions
text revisions
2015-11-27 18:54:30 +11:00
Luis Vale Gonçalves
b7f3782e4e Plane: Text revisions
text revisions
2015-11-26 07:56:52 +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
Tom Pittenger
d8d1343735 Plane: include AP_ADSB library in build for Plane 2015-11-23 19:45:40 +11:00
Andre Kjellstrup
db16b94e7f Plane: update RTL altitude param description 2015-11-21 12:44:34 +09:00
Caio Marcelo de Oliveira Filho
c8888329e1 Plane: use millis/micros/panic functions 2015-11-20 12:26:40 +09:00
Andrew Tridgell
9108179322 Plane: fixed build for SITL changes 2015-11-16 17:57:36 +11:00
Andrew Tridgell
8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
lvale
e18181e5c2 Plane: Uniformization of severities
Plane uniformization of severities
2015-11-09 09:38:25 +11:00
Tom Pittenger
5c3486d003 Plane: power-off rangefinder at high alt without terrain avail
- moved terrain alt rangefinder power-off trigger from trerrain thread to rangefinder thread
- allow rangefinder to power-off using baro if terrain data not available
2015-11-09 08:36:41 +11:00
Tom Pittenger
178bbb080b Plane: improve crosstrack error while navigating to loiter point
There is no crosstrack concept in the loiter navigation so when going from waypoint to loiter you will not converge onto the line between those two points. This commit adds crosstracking by performing normal waypoint navigation until you get near it.
2015-11-09 08:25:26 +11:00
Lucas De Marchi
e5595ff11c ArduPlane: don't use avr include dir for tags 2015-11-04 12:14:16 +11:00
Lucas De Marchi
0151853c21 ArduPlane: remove check for MAVLINK_COMM_NUM_BUFFERS 2015-11-04 12:14:15 +11:00
Lucas De Marchi
c55c07eaf6 ArduPlane: remove check for AVR CPUs
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:15 +11:00
Lucas De Marchi
d1be74c87e ArduPlane: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi
cfe6e209db ArduPlane: fix wrong printf format for printf
"%S" is used for wide string, but we are passing a char*. Use lowercase
in this case to remove warnings like this:

libraries/AP_InertialSensor/AP_InertialSensor.cpp: In member function
'bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract*, float&, float&)':
libraries/AP_InertialSensor/AP_InertialSensor.cpp:620:61: warning:
format '%S' expects argument of type 'wchar_t*', but argument 3 has type 'const char*' [-Wformat=]
                 "Place vehicle %S and press any key.\n", msg);
                                                             ^
2015-10-30 14:35:43 +09:00
Lucas De Marchi
d40349d6ae ArduPlane: fix wrong printf format for 32 bits
Heading is a 32 bits value, so use %d.
2015-10-30 14:35:38 +09:00
Lucas De Marchi
a6fd94c6fe ArduPlane: fix wrong printf format for 32 bits
"micros() - before" doesn't return a long value. Use "%u".
2015-10-30 14:35:35 +09: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
Lucas De Marchi
4ab9821624 Replace use of Log_Write_Message_P() with Log_Write_Message() 2015-10-30 14:35:28 +09:00
Lucas De Marchi
20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi
6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09:00
Lucas De Marchi
a964ac38ec Replace use of print_P() with print() 2015-10-30 14:35:21 +09:00
Lucas De Marchi
89fc4f4b62 Replace use of send_text_P() with send_text() 2015-10-30 14:35:17 +09:00
Lucas De Marchi
831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi
6f0db45b57 Replace use of strcasecmp_P() with strcasecmp() 2015-10-30 14:35:08 +09:00
Lucas De Marchi
84da1f5039 Rename gcs_send_text_P to gcs_send_text 2015-10-30 14:35:07 +09:00
Lucas De Marchi
84d5fb006f Remove use of Util::{v,}snprintf_P()
These are now the same function as Util::snprintf().
2015-10-30 14:35:05 +09:00
Lucas De Marchi
2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Lucas De Marchi
bd0f0a7536 ArduPlane: convert dos linefeeds to unix 2015-10-30 14:35:02 +09:00
Andrew Tridgell
3c3392aae5 Plane: improve error messages on failed parachute release 2015-10-27 16:06:34 +11:00
Andrew Tridgell
5d1d54a8cb Plane: added CHUTE_CHAN parameter for manual release 2015-10-27 16:06:34 +11:00
Andrew Tridgell
d20b86b95e Plane: suppress the throttle in auto-throttle modes after parachute release 2015-10-27 16:06:34 +11:00
Andrew Tridgell
9affddcaa3 Plane: initial support for AP_Parachute library 2015-10-27 16:06:34 +11:00
Andrew Tridgell
3dd47adafe Plane: fixed a condition where takeoff switches to land 2015-10-24 15:15:59 +11:00
Andrew Tridgell
537f22cdd1 Plane: changed thresholds for LAND_APPROACH
use 15% path progress when lined up, and 50% path progress if not
lined up
2015-10-24 15:00:34 +11:00
Tom Pittenger
f9fbb8a0f7 Plane: restrict land_approach stage change with tighter criteria
- inhibit switching from FLIGHT_NORMAL to FLIGHT_LAND_APPROACH until we meet stricter criteria other than just that LAND is next waypoint
- requires: nav bearing error < 10deg && have traveled path forward 30% of path && are below top of approach in case we hit waypoint while still descending
- exceptions: traveled path forward > 80% which basically means we're getting close to the flare point and better get into approach mode ASAP
2015-10-24 14:43:43 +11:00
Caio Marcelo de Oliveira Filho
62d4c05a8e ArduPlane: include SITL only for SITL board
Include board-specific files only when the board is used. Since these
should be exceptional cases, let the includer handle the ifdef instead
of putting ifdefs in every platform-specific header.

In the future we should evaluate whether the HAL for the board should
instantiate this.
2015-10-22 13:36:14 -02:00
Caio Marcelo de Oliveira Filho
49a42dc985 SITL: use a SITL namespace 2015-10-22 11:04:42 -02:00
Peter Barker
07842e211d Plane: use simple log entry numbers to download logs 2015-10-21 10:50:32 +11:00
Caio Marcelo de Oliveira Filho
db3e501aec ArduPlane: implement HAL::Callbacks
Also removes includes for each board since they are not necessary
anymore.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho
ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho
2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Randy Mackay
073828a764 Plane: add ahrs health pre-arm check 2015-10-16 13:50:59 +09:00
Gustavo Jose de Sousa
2cc07d2899 ArduPlane: use compass get_{field,offsets}() functions
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:06 +09:00
Randy Mackay
17ed125e41 Plane: add no break comment to suppress compiler warning 2015-10-03 12:56:30 +09:00
Randy Mackay
32c5b0e63c Plane: support set_home_position message 2015-10-03 12:56:28 +09:00
Randy Mackay
d54e28e129 Plane: send home position when home is set or get-home msg received 2015-10-03 12:56:27 +09:00
Andrew Tridgell
213bed99e1 Plane: use ahrs.send_ekf_status_report() 2015-09-29 10:59:19 +10:00
Tom Pittenger
617626f9f5 Plane: log flight_stage
logging plane flight stage in STAT.Stage
2015-09-28 18:18:09 +10:00
Andrew Tridgell
017ebc440b Plane: added SENSOR_RC_RECEIVER reporting in SYS_STATUS 2015-09-28 08:55:24 +10:00
Andrew Tridgell
458e967d06 Plane: added RPM logging
useful for seeing if a petrol motor is still running
2015-09-24 20:58:18 +10:00
Andrew Tridgell
c14dbcfc44 Plane: set version to 3.4.1dev 2015-09-24 11:12:41 +10:00
Andrew Tridgell
38d51ddb32 Plane: prepare for 3.4.0 release 2015-09-24 10:08:27 +10:00
Andrew Tridgell
91f990af06 Plane: added EKF2 to parameters as EK2_* 2015-09-23 11:56:37 +10:00
Andrew Tridgell
0592bd4e6f Plane: update release notes 2015-09-22 09:46:18 +10:00
Andrew Tridgell
b735999848 Plane: prepare for beta3 2015-09-22 09:43:39 +10:00
Randy Mackay
6da53ae3b2 Plane: replace SKIP_GYRO_CAL with INS_GYR_CAL
Also calibrate gyros with accel cal and set trim
2015-09-21 17:06:43 +09:00
Andrew Tridgell
9e7c38b933 Plane: moved logging of mode to Log_Write_Vehicle_Startup_Messages
this fixes a problem where the initial mode isn't logged on arming
2015-09-17 20:15:26 +10:00
Andrew Tridgell
d019f83bee Plane: allow for higher roll limits on takeoff
only restrict to LEVEL_ROLL_LIMIT below 5m. Above that start to allow
larger roll limits, reaching the full roll limit at 15m
2015-09-17 15:35:37 +10:00
Stewart Loving-Gibbard
2085156a07 Plane: Adding Logging of RSSI data. 2015-09-16 16:41:45 +09:00
Andrew Tridgell
86e8c7ed2f Plane: add some safety to detect bad lidar readings
we only accept a lidar if it changes by 5% of its full range, and we
reject a lidar again if the correction between barometric and lidar
range changes by more than 30m

This allows us to cope with faulty lidars which may give a constant
reading
2015-09-16 14:24:44 +10:00