From bd27a8c650a5b29f8e5f0efdd027be008b66dd0e Mon Sep 17 00:00:00 2001 From: Henry Wurzburg Date: Fri, 30 Dec 2022 07:17:17 -0600 Subject: [PATCH] AP_Scripting: Update readmes for aerobatics --- .../applets/Aerobatics/FixedWing/README.md | 16 ++++++++++----- .../Aerobatics/FixedWing/Schedules/README.md | 20 +++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/README.md b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/README.md index 1acf17a3cb..9bd30fa739 100644 --- a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/README.md +++ b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/README.md @@ -43,9 +43,11 @@ the ground track. | 20 | Procedure Turn | radius | bank angle | step-out | | Yes | | 23 | Half Climbing Circle | radius | height | bank angle | | Yes | | 25 | Laydown Humpty | radius | height | | | Yes | -| 25 | Barrel Roll | radius | length | num spirals | | No | -| 26 | Straight Hold | length | bank angle | | | No | +| 26 | Barrel Roll | radius | length | num spirals | | No | +| 27 | Straight Hold | length | bank angle | | | No | +| 28 | Partial Circle | radius | bank angle | arc angle | | No | | 31 | Multi Point Roll | length | num points | hold frac | pts to do | No | +| 32 | Side Step | width | length | | | No | Some notes about maneuver arguments (arg1 - arg4): These are parameters each maneuver requires to execute. For example the length of a roll or radius of a loop (in meters), the number of rolls, the height of the maneuver, etc. @@ -56,16 +58,19 @@ Length = 100, num points = 4, hold fraction = 0.5, pts to do = 2. Remember, the model is now exiting inverted so the next maneuver must be planned to start from this position. Note: In the script you will find other (specialised) manouvers which do not appear in the -'command table'. These tend to be specialised manouvers which may expect an inverted entry,a very high entry (270m), or -finish inverted and will not end well if started upright at a low altitude! These +'command table'. These are not intended to be used for 'tricks on a switch'. These manouvers are used in some of the schedules defined below. +Some are explained in the README.md file for the Schedules examples. ## Available Schedules (pre-defined sequences of manouvers) See the Schedules subdirectory for a wide variety of pre-defined full aerobatic schedules you can use and instructions for how to -install them. +install them. They can be used either in AUTO missions (See below) or as +"tricks on a switch". + +In addition, new tricks can be created and loaded from within these schedules files. See the "Airshow.txt" schedule for an example. ## Loading the script @@ -185,4 +190,5 @@ tracking. Some of the key parameters are: - AEROM_THR_MIN : minumum throttle percentage for all aerobatic maneuvers - AEROM_THR_BOOST: minumum throttle percentage for maneuvers marked as throttle boost - AEROM_YAW_ACCEL: maximum yaw acceleration in degrees per second per second. Lower to soften yaw control + - AEROM_BOX_WIDTH: the length of the aerobatic box whose center is defined by the start of a schedule - AEROM_PATH_SCALE: scale factor for all maneuvers. A value above 1.0 will increase the size of the maneuvers. A value below 1.0 will decrease the size. A negative value will mirror the maneuvers, allowing a sequence designed for left-to-right to be flown right-to-left. diff --git a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/Schedules/README.md b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/Schedules/README.md index 93cf31e799..8ab7b145e8 100644 --- a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/Schedules/README.md +++ b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/Schedules/README.md @@ -33,3 +33,23 @@ right-to-left and you want to fly it left-to-right due to the wind direction. If you set AEROM_PATH_SCALE to -0.5 then it would do a half-scale mirrored schedule. + +## Alignment + +Two commands are provided to provide alignment within the aerobatic "box": +align_center and align_box n. The start of a schedule defines the box center. +The AEROM_BOX_WIDTH defines the overall length of the box, modified by AEROM_PATH_SCALE if not "1". + +align_center: Delays the start of the next trick until the center of the box.If already past it, in the direction of +travel, the trick begins immediately. + +align_box n: Delays the start of the next trick until the n*(half box width-radius of trick) point of the box is reached in the direction of travel. If already past it, in the direction of travel, the trick begins immediately. So n = 1 means the end of the box for the next trick placement. + +## GCS/OSD messages + +name : string displays string as the trick name when selected or executed +message: string displays the string. Put just preceeding the trick to display it as it begins execution + +## Throttle Boost + +thr_boost = true command demands increased throttle output if the trick requires it for the specific vehicle.