Commit Graph

123 Commits

Author SHA1 Message Date
Andrew Tridgell
9b83781b4f Plane: fixed mixer arming error with FMUv4
thanks to Tim Gold for reporting this
2016-09-11 08:25:40 +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
ca32bcc58d Plane: add new flight mode AVOID_ADSB to mimic GUIDED 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
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
f85fc7c1dc Plane: pass in max airspeed via function call instead of using aparm 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
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
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
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
3177dc2f31 Plane: ADSB service needs to run at 10Hz for dynamic ADSB data 2016-07-20 22:46:51 -07:00
Tom Pittenger
ab38b12f2c Plane: adsb specific status updates 2016-07-20 22:40:14 -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
Andrew Tridgell
1256c2f351 Plane: changed for AP_Vehicle API change 2016-06-24 11:39:23 +10:00
Andrew Tridgell
f514e76f52 Plane: reset ground_start_count if we lose 3D fix
thanks to Michael for this suggestion
2016-06-22 21:25:11 +10:00
Andrew Tridgell
40db90cebe Plane: limit roll and pitch to Q_ANGLE_MAX in Q modes
planes often have large LIM_ROLL_CD
2016-06-16 22:00:04 +10:00
Michael du Breuil
bb9086b87f Plane: setup mixer in the one second loop when disarmed 2016-06-06 15:17:37 +10:00
Tom Pittenger
a80a87eb09 Plane: simplify TECS prep logic by utilizing auto_state.land_in_progress 2016-05-31 09:46:52 -07:00
Tom Pittenger
4db5b80b37 Plane: add flag for auto_state.land_in_progress 2016-05-31 09:46:51 -07:00
Andrew Tridgell
be14714fa4 ArduPlane: update signing timestamp on GPS lock 2016-05-21 15:25:13 +10:00
Tom Pittenger
4a6dd5a781 Plane: reset baro drift when setting home while disarmed 2016-05-17 15:32:42 -07:00
Tom Pittenger
78d6291e2c Plane: corrected land abort gcs msg 2016-05-13 17:22:13 -07:00
Tom Pittenger
6c0579a895 Plane: for better helical landings allow for instant approach stage if previous nav cmd was LOITER_TO_ALT 2016-05-13 17:22:07 -07: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
6b358a5618 Plane: added Q_GUIDED_MODE parameter
this allows you to do hybrid VTOL and fixed wing guided mode
2016-05-11 05:55:25 +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
cbbf26a1f6 Plane: removed Log_Write_IMUDT 2016-05-07 18:27:20 +10:00
Andrew Tridgell
3bbc6353d8 Plane: use have_ekf_logging() 2016-05-07 18:27:20 +10:00
Andrew Tridgell
226e6f1d6c Plane: only save compass offsets when disarmed and learning enabled 2016-04-30 16:43:14 +10:00
Andrew Tridgell
abfcf89f5e Plane: reduced the rate of EKF and attitude logging to 25Hz
this will reduce the log file size while not appreciably reducing the
ability to analyse logs
2016-04-30 14:34:47 +10:00
Andrew Tridgell
0fd044c1f7 Plane: added Q_RTL_MODE parameter
used to switch to VTOL landing on RTL
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
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
Luis Vale Gonçalves
73ac146b7e Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:37 -07:00
Andrew Tridgell
07168c3db4 Plane: fixed places that assumed mission command IDs are 8 bit 2016-04-23 21:03:46 +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
Tom Pittenger
183369b92a Plane: take advantage of L1 stale flag and correctly inhibit flight stage if not lined up on approach 2016-04-21 21:30:58 -07:00
Tom Pittenger
c5a3b1b134 Plane: non-functional change - change labels for approach flight stage criteria 2016-04-21 21:30:56 -07:00
Tom Pittenger
85913bd237 Plane: rely on flight stage to know if we're doing auto_land in TECS 2016-04-21 21:30:53 -07:00
Tom Pittenger
6a83ad419a Plane: moved update_flight_stage() inside setup_glide_slope()
the glide_slope gets calculated every time there's a major event such as mission item change or wp_proportion change so its good to update the flight stage then too because.
also logging stage when stage changes, might as well get an extra data point in there when it's timely
2016-04-21 21:30:51 -07:00
Michael du Breuil
ef348473eb Plane: Remove tecs_hgt_afe from the 50hz tecs update 2016-04-21 17:03:00 +10:00
Michael du Breuil
f5749b44cd Plane: Move position update to 50hz loop rather then the 10hz 2016-04-21 16:53:20 +10:00