Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Scripting: applet for Plane follow on a switch #27137

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ArduPlane/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,8 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_int_do_reposition(const mavlink_com
if (((int32_t)packet.param2 & MAV_DO_REPOSITION_FLAGS_CHANGE_MODE) ||
(plane.control_mode == &plane.mode_guided)) {
plane.set_mode(plane.mode_guided, ModeReason::GCS_COMMAND);

plane.guided_state.target_heading_type = GUIDED_HEADING_NONE;

// add home alt if needed
if (requested_position.relative_alt) {
requested_position.alt += plane.home.alt;
Expand Down
52 changes: 46 additions & 6 deletions Tools/autotest/default_params/glider.parm
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
LIM_PITCH_MAX 1000
LIM_PITCH_MIN -1500
LIM_ROLL_CD 3000

THR_MAX 0
THR_FAILSAFE 2
Expand All @@ -9,6 +6,11 @@ RTL_RADIUS 175
WP_RADIUS 90
KFF_RDDRMIX 0.07

# fixed wing tuning
PTCH_LIM_MAX_DEG 10
PTCH_LIM_MIN_DEG -15
ROLL_LIMIT_DEG 30

RLL_RATE_FF 0.6
RLL_RATE_P 0.5
RLL_RATE_I 0.14
Expand All @@ -26,9 +28,10 @@ PTCH2SRV_TCONST 0.45
PTCH2SRV_RMAX_UP 75
PTCH2SRV_RMAX_DN 75


ARSPD_FBW_MIN 17
ARSPD_FBW_MAX 45
AIRSPEED_CRUISE 38
AIRSPEED_MIN 17
AIRSPEED_MAX 45
ARSPD_USE 1

HOME_RESET_ALT -1

Expand All @@ -47,3 +50,40 @@ NAVL1_LIM_BANK 30

SCHED_LOOP_RATE 200

WP_LOITER_RAD 230

CHUTE_ENABLED 1.000000
CHUTE_TYPE 10.000000
CHUTE_SERVO_ON 1900.000000
CHUTE_OPTIONS 1.000000

INS_ACCSCAL_X 1.001000
INS_ACCSCAL_Y 1.001000
INS_ACCSCAL_Z 1.001000
INS_ACCOFFS_X 0.001000
INS_ACCOFFS_Y 0.001000
INS_ACCOFFS_Z 0.001000
INS_ACC2SCAL_X 1.001000
INS_ACC2SCAL_Y 1.001000
INS_ACC2SCAL_Z 1.001000
INS_ACC2OFFS_X 0.001000
INS_ACC2OFFS_Y 0.001000
INS_ACC2OFFS_Z 0.001000

SIM_SERVO_SPEED 0.110000
SIM_SERVO_DELAY 0.010000
SIM_SERVO_FILTER 10

SIM_GLD_BLN_BRST 50000

SERVO1_MIN 1000
SERVO1_MAX 2000
SERVO1_FUNCTION 0
SERVO2_FUNCTION 4
SERVO3_TRIM 1460.000000
SERVO3_REVERSED 1
SERVO3_FUNCTION 19
SERVO4_REVERSED 1
SERVO5_FUNCTION 4
SERVO6_FUNCTION 56
SERVO9_FUNCTION 27
Loading
Loading