Commit Graph

338 Commits

Author SHA1 Message Date
Lucas De Marchi 72fd2d6f05 global: use static method to construct AP_SerialManager 2017-09-26 03:01:21 +01:00
Lucas De Marchi fbe0d9761c global: use static method to construct AP_OpticalFlow 2017-09-26 03:01:21 +01:00
Lucas De Marchi 2d2876a226 ArduPlane: use static method to construct AP_Arming_Plane 2017-09-26 03:01:21 +01:00
Lucas De Marchi b36a5919f5 global: use static method to construct AP_Mission
This also move the initialization to be in the header for those that
weren't already to maintain consistency.
2017-09-26 03:01:21 +01:00
Lucas De Marchi de5e044b02 global: use static method to construct AP_RPM 2017-09-26 03:01:21 +01:00
Lucas De Marchi 40fd1b346c global: remove rangefinder from AP_AHRS_NavEKF
AP_AHRS_NavEKF doesn't use the rangefinder, it just delegates the
calls to the right estimator.

For libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp the initialization
order has also been modified to match the order on vehicles. It's more
correct since it passes a reference when EKF2/EKF3 are already
constructed, while thos constructors use a pointer.  Ideally these
should be moved to an init() method though, or use a get_instance().
2017-09-26 03:01:21 +01:00
Lucas De Marchi 9027a55696 global: use static method to construct RangeFinder 2017-09-26 03:01:21 +01:00
Lucas De Marchi 62ac0ab8aa global: use static method to construct AP_Notify 2017-09-26 03:01:21 +01:00
Lucas De Marchi de680dac5b global: use static method to construct AP_Scheduler 2017-09-26 03:01:21 +01:00
Lucas De Marchi 8094482f21 global: use static method to construct AP_GPS 2017-09-26 03:01:21 +01:00
Lucas De Marchi 87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Lucas De Marchi c1a957fbf3 global: use static method to construct Compass 2017-09-26 03:01:21 +01:00
Lucas De Marchi 91feec0e14 global: use static method to construct AP_Baro 2017-09-26 03:01:21 +01:00
Lucas De Marchi 18ff17e22c ArduPlane: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Randy Mackay 3d7b6ddc40 Plane: support SET_GPS_GLOBAL_ORIGIN message 2017-09-19 10:30:15 +09:00
Peter Barker aee939f891 Plane: move gcs_out_of_time into GCS object 2017-09-12 18:28:07 +01:00
Andrew Tridgell 37220e1568 Plane: removed unused prototypes 2017-09-10 17:15:18 +10:00
Peter Barker c15c1b84a4 Plane: add constant structure holding firmware version 2017-08-30 15:54:46 +01:00
Peter Barker 8eeae45300 Plane: use GCS_MAVLINK subclasses to handle set_mode 2017-08-16 11:58:10 +10:00
Peter Barker 1a665280e9 Plane: remove CLI 2017-08-14 10:23:50 +09:00
Peter Barker 089f6f4650 Plane: move try_send_message send_hwstatus up 2017-08-03 14:33:37 +01:00
Peter Barker fee9e83881 Plane: move try_send_message mission handling up 2017-08-03 14:24:47 +01:00
Andrew Tridgell fedd2c558c Plane: added AETR log message
this makes debugging mixers much easier
2017-08-01 08:25:32 +10:00
Andrew Tridgell 5d91e29cea Plane: fixed px4_mixer for new function based mixing
this fixes the OVERRIDE_CHAN functionality to work correctly with the
new function based mixing code

It isn't a perfect match for ArduPilot mixing, but it is very close
for the key control surfaces, including mixed surfaces
2017-08-01 08:25:32 +10:00
Andrew Tridgell 0266168e69 Plane: removed old elevon and vtail mixers
now only use the function based mixing, and auto-convert on startup
2017-08-01 08:25:32 +10:00
Peter Barker 2fb46a67dd Plane: camera is responsible for taking distance-based-images and logging 2017-07-28 14:27:53 +01:00
Peter Barker fa39f315c6 Plane: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
Michael du Breuil b8e6ad7476 Plane: Document loop max time as being in microseconds 2017-07-15 17:27:04 +09:00
Peter Barker a250f47f13 Plane: remove unneeded telemetry_delayed parameter 2017-07-12 17:01:36 +01:00
Peter Barker 250f315678 Plane: eliminate gcs_send_mission_item_reached wrapper 2017-07-11 23:45:16 +01:00
Peter Barker 3b0a7703c4 Plane: eliminate gcs_send_message wrapper 2017-07-11 23:45:16 +01:00
Peter Barker 5a8f01c19c Plane: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00
Eugene Shamaev b95ebadf8b ArduPlane: move of CAN parameters into separate group 2017-07-03 11:44:32 +01:00
Andrew Tridgell 984e887d1d Plane: changed differential spoilers to scaled outputs
this matches new elevon, vtail and flaperon code
2017-07-03 11:17:42 +10:00
Peter Barker 5b70b688cb Plane: handle knowledge of in_log_download in DataFlash 2017-06-27 03:10:43 +01:00
Pierre Kancir 0bc9d294fb ArduPlane: change rangefinder msg for common one 2017-06-08 01:31:52 +01:00
Andrew Tridgell 92f88e9b33 Plane: fixed climb rate for quadplanes in CRUISE
the high loop rate of quadplanes led to less than 1cm/loop change in
height, which got truncated to zero. Adjusting height at 10Hz fixes
that.

Thanks to Marco for reporting this!
2017-05-10 08:03:23 +10:00
Andrew Tridgell 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
Andrew Tridgell b4ffcfa6bd Plane: added support for elevon and vtail servo functions
these make trimming and limiting servo movement easier
2017-04-24 16:26:08 +10:00
Eugene Shamaev ca84ab36be Plane: AOA and SSA estimations are added to parameters and data logs 2017-04-19 20:48:42 +10:00
Michael du Breuil 876ffa351b Plane: Update L1 constructor for new arguments 2017-04-06 08:26:04 +10:00
Andrey Kolobov 35d406aeab Plane: added a soaring controller to Arduplane 2017-03-14 08:53:10 +11:00
Randy Mackay c0f155fd27 Plane: use only downward facing rangefinder 2017-02-27 15:18:25 +09:00
Tom Pittenger 4ccd59f394 Plane: allow exiting loiter_to_alt in cases where you get stuck
- check for scenarios where updrafts can keep you from loitering down indefinitely.
2017-02-23 05:15:49 -08:00
Andrew Tridgell b3380ecfa7 Plane: support twin-engine planes
with differential thrust for yaw
2017-02-18 17:26:43 +11:00
Peter Barker 1d7994e9ba Plane: create GCS_Plane subclass 2017-02-13 17:03:06 +11:00
Peter Barker 49bf336539 Plane: Support for a GCS singleton 2017-02-13 09:32:01 +11:00
Peter Barker d060670ba3 Plane: rename gcs[] to gcs_chan[]
Wish to use gcs() to return the gcs singleton
2017-02-13 09:32:01 +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
Randy Mackay fad2ba608f Plane: send flight mode string to Notify 2017-01-23 15:07:21 -08:00
Randy Mackay 7cc8b7232c Plane: rename arming_checks to AP_Arming 2017-01-17 11:45:08 +09:00
Peter Barker fc28beacea Plane: AP_Arming: use callback in place of variable reference for home state 2017-01-17 11:45:08 +09:00
Andrew Tridgell b83f50be0f Plane: use new SRV_Channels API 2017-01-12 17:39:37 +11:00
Peter Barker af9729c126 Plane: correct compilation when parachute disabled 2017-01-02 20:39:03 -08:00
Tom Pittenger c286ceba43 Plane: move enum FlightStages to AP_Vehicle::FixedWing 2016-12-30 23:50:03 -08:00
priseborough 38a0e8a6ae ArduPlane: Add EKF3 and remove EKF1 2016-12-19 08:07:09 +11:00
Randy Mackay d95baf51c9 Plane: include AP_Beacon 2016-11-30 17:57:01 +09:00
Peter Barker f712dd5d7e Plane: add arming check for logging actually started 2016-11-29 15:14:09 -08:00
Peter Barker 17f5ef4610 Plane: inform dataflash of vehicle arm state 2016-11-28 09:42:09 -08:00
Tom Pittenger 9f184a1490 Plane: migrate aparm "LAND_" params from plane to AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger 1b0a263761 Plane: remove landing.cpp entirely 2016-11-25 19:07:30 -08:00
Tom Pittenger fc2f518f31 Plane: revert auto_state.checked_for_autoland back to Plane 2016-11-25 19:07:30 -08:00
Tom Pittenger db42252168 Plane: port the rest of plane/landing.cpp to AP_Landing 2016-11-25 19:07:30 -08:00
Tom Pittenger 9a79b79f1e AP_Landing: port more from plane 2016-11-25 19:07:30 -08:00
Tom Pittenger 10027b21d6 Plane/AP_Landing: port setup_landing_glide_slope() 2016-11-25 19:07:30 -08:00
Tom Pittenger d2376b7c8b Plane: migrate two helper functions to AP_Landing
- move functions restart_landing_sequence() and jump_to_landing_sequence() to AP_Landing
- NOTE: jump_to function can not set mode, so it is now done externally in vehicle
2016-11-25 19:07:30 -08:00
Tom Pittenger 896b931a7c Plane: Move auto_state variables to AP_landing members 2016-11-25 19:07:30 -08:00
Tom Pittenger 61b02cb41d AP_Landing: add new library for fixed wing landing abstraction 2016-11-25 19:07:30 -08:00
Tom Pittenger ce8db1fdba Plane: move struct Rangefinder_State to AP_Vehicle 2016-11-25 19:07:30 -08:00
Tom Pittenger 0ffeed644c Plane: remove define RANGEFINDER_ENABLED - always enabled 2016-11-25 19:07:30 -08:00
floaledm bae9ce20c1 Plane: update sensor status error flags independently of sending a sys_status message 2016-11-02 08:36:58 +11:00
Peter Barker 98ae6c776a Plane: support for AP_Stats (flight time, bootcount, runtime) 2016-10-29 14:53:25 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 5ac62c27e2 Plane: reduce change of false rangefinder readings triggering a flare
This doesn't count repeated readings towards the rangefinder count,
and resets the counter if the change is more than 20% of full
range. This greatly reduces the impact of poor sonar sensors for
landing
2016-10-23 15:53:12 +11:00
Ferrin Benjamin Katz 38581669ec Plane: slow down home update
Moved the code theat updates the home position while the aircraft is
unarmed from 10hz loop to one second loop and ensured that is does not
update more then once every 5 seconds. Closes issue 4311.
2016-10-17 09:50:25 +11:00
Andrew Tridgell 5724aef8b3 Plane: support automatic servo trimming
now that we have separated RC input from servo output with
SERVO_RNG_ENABLE=1 we can do full automatic servo trimming as an
option
2016-10-16 15:20:47 +11:00
Andrew Tridgell be1109174e Plane: apply elevon and vtail mixers after SRV_Channel remap
this is needed to ensure that changes in RCn_MIN/MAX don't cause
changes in the output handling for elevon nd vtail planes
2016-10-15 16:59:36 +11:00
Andrew Tridgell a23c373f16 Plane: fixed servo mixing for AFS and failsafe case 2016-10-15 16:59:35 +11:00
Andrew Tridgell 8170df7ba8 Plane: added servo remapping object 2016-10-15 16:59:35 +11:00
Andrew Tridgell c7f738c284 Plane: separate out the output channel mixing
this provides a framework for other output mixing types
2016-10-15 16:59:35 +11:00
Andrew Tridgell eb67c97bb2 Plane: split out flap output functions 2016-10-15 16:59:34 +11:00
Andrew Tridgell 40c6ebf61a Plane: refactor more of servos output code to be easier to read 2016-10-15 16:59:34 +11:00
Andrew Tridgell 33f17588b2 Plane: added auto fence enable on VTOL takeoff
fixes issue#724
2016-08-29 18:04:42 +10:00
Andrew Tridgell a5f20d8c44 Plane: fix for AP_FrSky_Telem API change 2016-08-25 10:16:19 +10:00
floaledm 43006a31a3 Plane: compatibility with revised AP_Frsky_Telem class 2016-08-25 10:16:18 +10:00
floaledm 71921f3aa4 Plane: removed frsky_telemetry_send scheduled task 2016-08-25 10:16:17 +10:00
Tom Pittenger b187e1f9a6 Plane: add reason to set_mode() 2016-08-17 22:38:54 -07:00
Tom Pittenger 285e41bac6 Plane: add avoidance_adsb framework for object avoidance 2016-08-17 22:38:54 -07:00
Tom Pittenger c4460a285c Plane: remove adsb sensor library based avoidance
adsb based avoidance has been moved to AP_Avoidance library
2016-08-17 22:38:54 -07:00
Tom Pittenger fa326de7fa Plane: add adsb to failsafe structure and report in heartbeat to GCS 2016-08-17 22:38:54 -07:00
Andrew Tridgell adb5a3ee1f Plane: re-work AFS for new AP_AdvancedFailsafe API 2016-08-16 12:55:51 +10:00
Andrew Tridgell 5d6dfd927b Plane: changes for AP_AdvancedFailsafe naming 2016-08-16 12:55:50 +10:00
Tom Pittenger e0136dc545 Plane: remove AP_Vehicle::FixedWing dependency in ap_airspeed 2016-08-08 00:02:42 -07:00
Tom Pittenger fc50f145ce Revert "ArduPlane: Convert references to AP_Airspeed. Added automatic migration of ARSPD_FBW_MIN and ARSPD_FBW_MAX (plane parameter) to ARSPD_FBW_MIN and ARSPD_FBW_MAX (library parameter)."
This reverts commit da1b18d918.
2016-08-07 17:54:24 -07:00
Tom Pittenger 8dad05d12e Revert "Airspeed: store reference in libraries and populate it"
This reverts commit c090ba2257.
2016-08-07 17:54:24 -07:00
Tom Pittenger c090ba2257 Airspeed: store reference in libraries and populate it
- also had to move the initial definition in plane.h so it happened before the others.
2016-08-04 11:06:44 -07:00
AndersonRayner da1b18d918 ArduPlane: Convert references to AP_Airspeed. Added automatic migration of ARSPD_FBW_MIN and ARSPD_FBW_MAX (plane parameter) to ARSPD_FBW_MIN and ARSPD_FBW_MAX (library parameter). 2016-08-04 10:09:04 -07:00
Tom Pittenger f90957e7ed Plane: remove all threat logic in adsb lib in favor of avoidance lib 2016-08-01 15:27:41 -07:00
Andrew Tridgell 327a057ee0 Plane: added internal combustion engine support
this allows for automatic engine start and restart
2016-07-25 10:06:03 +10:00
Andrew Tridgell 02babb71b3 ArduPlane: adjust for 16 channels in SERVO_OUTPUT_RAW 2016-07-25 10:06:02 +10:00
Andrew Tridgell 3f0a8d1761 Plane: added AP_Button support for plane
this also adds the g2 parameter table
2016-07-22 15:01:20 +10:00
Tom Pittenger 26efd90603 Plane: allow landing height adjustment on wp before land (aka approach wp) 2016-07-20 22:29:31 -07:00
Andrew Tridgell 4da3236c07 Plane: separate out landing height adjustment from barometer changes
this stores a landing height adjustment for an aborted landing
without adjusting barometer readings, applying them only on landing
2016-07-20 22:04:21 -07:00
Tom Pittenger 7751bee3be Revert "Plane: coverity scan - variables not initialized in constructor"
This reverts commit 9b807fa8a5.
2016-07-11 22:02:30 -07:00
Tom Pittenger 9b807fa8a5 Plane: coverity scan - variables not initialized in constructor 2016-07-05 13:31:51 -07:00
Andrew Tridgell 96d785f1c6 Plane: added auto_navigation_mode flag
this fixes a problem where modes like loiter and auto would allow for
rudder stick mixing even with STICK_MIXING=0
2016-07-05 12:52:13 +10:00
Tom Pittenger 0597dbd033 Plane: allow SET_ATTITUDE_TARGET to set rpy and throttle 2016-07-01 08:28:53 -07:00
Tom Pittenger 85afd9e245 Plane: remove guided roll flag, handle it with timer=0 2016-06-30 07:48:37 -07:00
Michael Day 8ac433f991 Plane: Can now command roll from a companion computer. 2016-06-30 10:27:44 -04:00
Andrew Tridgell ec367d4a09 Plane: re-order channel initialisation
this fixes a problem with spurious throttle output during board
startup. Many thanks to Marco for finding this!
2016-06-30 16:48:30 +10:00
Andrew Tridgell bf2e30f858 Plane: removed demo_servos()
this really didn't help much and slows down startup
2016-06-27 10:19:26 +10:00
Tom Pittenger b3f182157c Plane: take advantage of rangefinder support in relative_ground_altitude() 2016-06-03 23:43:43 -07:00
Tom Pittenger 4db5b80b37 Plane: add flag for auto_state.land_in_progress 2016-05-31 09:46:51 -07:00
Peter Barker af5a52e2aa Plane: subclass GCS_MAVLink in place of defining its functions for it 2016-05-29 16:21:21 +10:00
Andrew Tridgell d3494d1369 Plane: don't stall EKF during baro cal 2016-05-24 17:00:56 +10:00
Tom Pittenger 36a1054f77 Plane: remove Tom Pittenger as an author since he's now listed as a lead 2016-05-17 19:16:02 -07:00
Tom Pittenger c9167f89eb Plane: add Tom Pittenger as co-lead developer 2016-05-17 19:03:38 -07:00
Tom Pittenger 6746b4227a Plane: handle large negative baro offsets (corner case) to self-trigger a land-abort go-around
new param: LAND_ABORT_DEG
@Description: This parameter is used when using a rangefinder during landing for altitude correction from baro drift (RNGFND_LANDING=1) and the altitude correction indicates your altitude is higher than the intended slope path. Steeper slopes can result in crashes so this allows the option to remember the baro offset and self-abort the landing and come around for a another landing with the correct baro offset applied for a perfect slope. An auto-abort go-around will only happen once, next attempt will not auto-abort again. This operation happens entirely automatically in AUTO mode. This value is the delta degrees threshold to trigger the go-around. Example: if set to 5 deg and the mission planned slope is 15 deg then if the new slope is 21 then it will go-around. Set to 0 to disable. Requires LAND_SLOPE_RCALC > 0.
2016-05-17 15:41:09 -07:00
Tom Pittenger f048aafb76 Plane: store auto land slope
- also changed order of landing slope calc but is functionally the same
2016-05-17 15:39:05 -07:00
Tom Pittenger 034cd2413e Plane: re-calc landing glide slope to gracefully handle baro offset during long flights
New param: LAND_SLOPE_RCALC
@Description: This parameter is used when using a rangefinder during landing for altitude correction from baro drift (RNGFND_LANDING=1) and the altitude correction indicates your altitude is lower than the intended slope path. This value is the threshold of the correction to re-calculate the landing approach slope. Set to zero to keep the original slope all the way down and any detected baro drift will be corrected by pitching/throttling up to snap back to resume the original slope path. Otherwise, when a rangefinder altitude correction exceeds this threshold it will trigger a slope re-calculate to give a shallower slope. This also smoothes out the approach when flying over objects such as trees. Recommend a value of 2m.

default value is 2 (so, enabled by default)
2016-05-17 15:39:04 -07:00
Tom Pittenger 8a58f5a5eb Plane: convert airspeed_error_cmd to airspeed_error (in meters) 2016-05-13 17:21:59 -07:00
Andrew Tridgell 2a0476483b Plane: make takeoff less noisy with zero timeout 2016-05-14 08:26:10 +10:00
Andrew Tridgell 574ba71ef3 Plane: update for AP_TECS API change 2016-05-14 08:26:10 +10:00
Andrew Tridgell 12e0012b16 Plane: allow for NAV_LOITER_UNLIM and NAV_LOITER_TIME in quadplane 2016-05-11 15:57:41 +10:00
Andrew Tridgell 3fc43b94f9 Plane: separate out auto and guided VTOL states
this prevents a switch to AUTO from using VTOL mode incorrectly
2016-05-11 15:14:43 +10:00
Andrew Tridgell 691d4b6ca7 Plane: added local reached_loiter_target()
this distinguishes between VTOL and fixed wing loiter targets
2016-05-11 05:55:26 +10:00
Andrew Tridgell eab42c5740 Plane: fixed attitude logging with fast logging off 2016-05-11 05:55:24 +10:00
skyscraper 7f29903287 ArduPlane: Fix up after refactoring RC_Channel class
Further to refactor of RC_Channel class which included
adding get_xx set_xx methods, change reads and writes to the public members
to calls to  get and set functionsss

old public member(int16_t)   get function -> int16_t     set function (int16_t)
(expression where c is an object of type RC_Channel)
c.radio_in                     c.get_radio_in()           c.set_radio_in(v)
c.control_in                   c.get_control_in()         c.set_control_in(v)
c.servo_out                    c.get_servo_out()          c.set_servo_out(v)
c.pwm_out                      c.get_pwm_out()            // use existing
c.radio_out                    c.get_radio_out()          c.set_radio_out(v)
c.radio_max                    c.get_radio_max()          c.set_radio_max(v)
c.radio_min                    c.get_radio_min()          c.set_radio_min(v)
c.radio_trim                   c.get_radio_trim()         c.set_radio_trim(v);

c.min_max_configured() // return true if min and max are configured

Because data members of RC_Channels are now private and so cannot be written directly
 some overloads are provided in the Plane classes to provide the old functionality

new overload Plane::stick_mix_channel(RC_Channel *channel)
which forwards to the previously existing
void stick_mix_channel(RC_Channel *channel, int16_t &servo_out);

new overload Plane::channel_output_mixer(Rc_Channel* , RC_Channel*)const
which forwards to
(uint8_t mixing_type, int16_t & chan1, int16_t & chan2)const;

Rename functions

 RC_Channel_aux::set_radio_trim(Aux_servo_function_t function)
    to RC_Channel_aux::set_trim_to_radio_in_for(Aux_servo_function_t function)

 RC_Channel_aux::set_servo_out(Aux_servo_function_t function, int16_t value)
    to RC_Channel_aux::set_servo_out_for(Aux_servo_function_t function, int16_t value)

 Rationale:

        RC_Channel is a complicated class, which combines
        several functionalities dealing with stick inputs
        in pwm and logical units, logical and actual actuator
        outputs, unit conversion etc, etc
        The intent of this PR is to clarify existing use of
        the class. At the basic level it should now be possible
        to grep all places where private variable is set by
        searching for the set_xx function.

        (The wider purpose is to provide a more generic and
        logically simpler method of output mixing. This is a small step)
2016-05-10 16:21:16 +10:00
Andrew Tridgell db5f50e08e Plane: convert tuning to use AP_Tuning library 2016-05-07 18:34:15 +10:00
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