Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
fc636b61
Commit
fc636b61
authored
8 years ago
by
Daniel Agar
Browse files
Options
Downloads
Patches
Plain Diff
fw_pos_control_l1_params.c param metadata
parent
b471d940
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c
+254
-104
254 additions, 104 deletions
src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c
with
254 additions
and
104 deletions
src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c
+
254
−
104
View file @
fc636b61
...
...
@@ -54,6 +54,8 @@
* @unit m
* @min 12.0
* @max 50.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_L1_PERIOD
,
20
.
0
f
);
...
...
@@ -65,6 +67,8 @@ PARAM_DEFINE_FLOAT(FW_L1_PERIOD, 20.0f);
*
* @min 0.6
* @max 0.9
* @decimal 2
* @increment 0.05
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_L1_DAMPING
,
0
.
75
f
);
...
...
@@ -77,6 +81,8 @@ PARAM_DEFINE_FLOAT(FW_L1_DAMPING, 0.75f);
* @unit norm
* @min 0.0
* @max 1.0
* @decimal 2
* @increment 0.01
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_THR_CRUISE
,
0
.
6
f
);
...
...
@@ -100,6 +106,8 @@ PARAM_DEFINE_FLOAT(FW_THR_SLEW_MAX, 0.0f);
* @unit deg
* @min -60.0
* @max 0.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_P_LIM_MIN
,
-
45
.
0
f
);
...
...
@@ -112,6 +120,8 @@ PARAM_DEFINE_FLOAT(FW_P_LIM_MIN, -45.0f);
* @unit deg
* @min 0.0
* @max 60.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_P_LIM_MAX
,
45
.
0
f
);
...
...
@@ -124,6 +134,8 @@ PARAM_DEFINE_FLOAT(FW_P_LIM_MAX, 45.0f);
* @unit deg
* @min 35.0
* @max 65.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_R_LIM
,
50
.
0
f
);
...
...
@@ -138,6 +150,8 @@ PARAM_DEFINE_FLOAT(FW_R_LIM, 50.0f);
* @unit norm
* @min 0.0
* @max 1.0
* @decimal 2
* @increment 0.01
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_THR_MAX
,
1
.
0
f
);
...
...
@@ -157,6 +171,8 @@ PARAM_DEFINE_FLOAT(FW_THR_MAX, 1.0f);
* @unit norm
* @min 0.0
* @max 1.0
* @decimal 2
* @increment 0.01
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_THR_MIN
,
0
.
0
f
);
...
...
@@ -172,6 +188,8 @@ PARAM_DEFINE_FLOAT(FW_THR_MIN, 0.0f);
* @unit norm
* @min 0.0
* @max 0.4
* @decimal 2
* @increment 0.01
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_THR_IDLE
,
0
.
15
f
);
...
...
@@ -185,6 +203,8 @@ PARAM_DEFINE_FLOAT(FW_THR_IDLE, 0.15f);
* @unit norm
* @min 0.0
* @max 1.0
* @decimal 2
* @increment 0.01
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_THR_LND_MAX
,
1
.
0
f
);
...
...
@@ -200,10 +220,181 @@ PARAM_DEFINE_FLOAT(FW_THR_LND_MAX, 1.0f);
* @unit m
* @min 0.0
* @max 150.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_CLMBOUT_DIFF
,
10
.
0
f
);
/**
* Landing slope angle
*
* @unit deg
* @min 1.0
* @max 15.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_ANG
,
5
.
0
f
);
/**
*
*
* @unit m
* @min 1.0
* @max 15.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_HVIRT
,
10
.
0
f
);
/**
* Landing flare altitude (relative to landing altitude)
*
* @unit m
* @min 0.0
* @max 25.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_FLALT
,
8
.
0
f
);
/**
* Landing throttle limit altitude (relative landing altitude)
*
* Default of -1.0 lets the system default to applying throttle
* limiting at 2/3 of the flare altitude.
*
* @unit m
* @min -1.0
* @max 30.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_TLALT
,
-
1
.
0
f
);
/**
* Landing heading hold horizontal distance
*
* @unit m
* @min 0
* @max 30.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_HHDIST
,
15
.
0
f
);
/**
* Enable or disable usage of terrain estimate during landing
*
* @boolean
* @group FW L1 Control
*/
PARAM_DEFINE_INT32
(
FW_LND_USETER
,
0
);
/**
* Flare, minimum pitch
*
* Minimum pitch during flare, a positive sign means nose up
* Applied once FW_LND_TLALT is reached
*
* @unit deg
* @min 0
* @max 15.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_FL_PMIN
,
2
.
5
f
);
/**
* Flare, maximum pitch
*
* Maximum pitch during flare, a positive sign means nose up
* Applied once FW_LND_TLALT is reached
*
* @unit deg
* @min 0
* @max 45.0
* @decimal 1
* @increment 0.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_FL_PMAX
,
15
.
0
f
);
/**
* Min. airspeed scaling factor for landing
*
* Multiplying this factor with the minimum airspeed of the plane
* gives the target airspeed the landing approach.
* FW_AIRSPD_MIN * FW_LND_AIRSPD_SC
*
* @unit norm
* @min 1.0
* @max 1.5
* @decimal 2
* @increment 0.01
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_AIRSPD_SC
,
1
.
3
f
);
/*
* TECS parameters
*
*/
/**
* Minimum Airspeed
*
* If the airspeed falls below this value, the TECS controller will try to
* increase airspeed more aggressively.
*
* @unit m/s
* @min 0.0
* @max 40
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_AIRSPD_MIN
,
10
.
0
f
);
/**
* Trim Airspeed
*
* The TECS controller tries to fly at this airspeed.
*
* @unit m/s
* @min 0.0
* @max 40
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_AIRSPD_TRIM
,
15
.
0
f
);
/**
* Maximum Airspeed
*
* If the airspeed is above this value, the TECS controller will try to decrease
* airspeed more aggressively.
*
* @unit m/s
* @min 0.0
* @max 40
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_AIRSPD_MAX
,
20
.
0
f
);
/**
* Maximum climb rate
*
...
...
@@ -221,8 +412,10 @@ PARAM_DEFINE_FLOAT(FW_CLMBOUT_DIFF, 10.0f);
* FW_THR_MAX reduced.
*
* @unit m/s
* @min 2.0
* @max 10.0
* @min 1.0
* @max 15.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_CLMB_MAX
,
5
.
0
f
);
...
...
@@ -235,6 +428,10 @@ PARAM_DEFINE_FLOAT(FW_T_CLMB_MAX, 5.0f);
* to measure FW_T_CLMB_MAX.
*
* @unit m/s
* @min 1.0
* @max 5.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_SINK_MIN
,
2
.
0
f
);
...
...
@@ -249,6 +446,10 @@ PARAM_DEFINE_FLOAT(FW_T_SINK_MIN, 2.0f);
* the aircraft.
*
* @unit m/s
* @min 2.0
* @max 15.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_SINK_MAX
,
5
.
0
f
);
...
...
@@ -261,6 +462,10 @@ PARAM_DEFINE_FLOAT(FW_T_SINK_MAX, 5.0f);
* to respond.
*
* @unit s
* @min 1.0
* @max 10.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_TIME_CONST
,
5
.
0
f
);
...
...
@@ -273,6 +478,10 @@ PARAM_DEFINE_FLOAT(FW_T_TIME_CONST, 5.0f);
* to respond.
*
* @unit s
* @min 1.0
* @max 10.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_THRO_CONST
,
8
.
0
f
);
...
...
@@ -283,6 +492,10 @@ PARAM_DEFINE_FLOAT(FW_T_THRO_CONST, 8.0f);
* This is the damping gain for the throttle demand loop.
* Increase to add damping to correct for oscillations in speed and height.
*
* @min 0.0
* @max 2.0
* @decimal 1
* @increment 0.1
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_THR_DAMP
,
0
.
5
f
);
...
...
@@ -295,6 +508,10 @@ PARAM_DEFINE_FLOAT(FW_T_THR_DAMP, 0.5f);
* and height offsets are trimmed out, but reduces damping and
* increases overshoot.
*
* @min 0.0
* @max 2.0
* @decimal 2
* @increment 0.05
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_INTEG_GAIN
,
0
.
1
f
);
...
...
@@ -309,6 +526,10 @@ PARAM_DEFINE_FLOAT(FW_T_INTEG_GAIN, 0.1f);
* from under-speed conditions.
*
* @unit m/s/s
* @min 1.0
* @max 10.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_VERT_ACC
,
7
.
0
f
);
...
...
@@ -323,6 +544,10 @@ PARAM_DEFINE_FLOAT(FW_T_VERT_ACC, 7.0f);
* the solution more towards use of the accelerometer data.
*
* @unit rad/s
* @min 1.0
* @max 10.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_HGT_OMEGA
,
3
.
0
f
);
...
...
@@ -333,10 +558,14 @@ PARAM_DEFINE_FLOAT(FW_T_HGT_OMEGA, 3.0f);
* This is the cross-over frequency (in radians/second) of the complementary
* filter used to fuse longitudinal acceleration and airspeed to obtain an
* improved airspeed estimate. Increasing this frequency weights the solution
* more towards use of the a
r
ispeed sensor, whilst reducing it weights the
* more towards use of the ai
r
speed sensor, whilst reducing it weights the
* solution more towards use of the accelerometer data.
*
* @unit rad/s
* @min 1.0
* @max 10.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_SPD_OMEGA
,
2
.
0
f
);
...
...
@@ -353,6 +582,10 @@ PARAM_DEFINE_FLOAT(FW_T_SPD_OMEGA, 2.0f);
* aircraft (eg powered sailplanes) can use a lower value, whereas
* inefficient low aspect-ratio models (eg delta wings) can use a higher value.
*
* @min 0.0
* @max 20.0
* @decimal 1
* @increment 0.5
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_RLL2THR
,
15
.
0
f
);
...
...
@@ -373,6 +606,8 @@ PARAM_DEFINE_FLOAT(FW_T_RLL2THR, 15.0f);
*
* @min 0.0
* @max 2.0
* @decimal 1
* @increment 1.0
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_SPDWEIGHT
,
1
.
0
f
);
...
...
@@ -385,6 +620,10 @@ PARAM_DEFINE_FLOAT(FW_T_SPDWEIGHT, 1.0f);
* will work well provided the pitch to servo controller has been tuned
* properly.
*
* @min 0.0
* @max 2.0
* @decimal 1
* @increment 0.1
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_PTCH_DAMP
,
0
.
0
f
);
...
...
@@ -392,6 +631,10 @@ PARAM_DEFINE_FLOAT(FW_T_PTCH_DAMP, 0.0f);
/**
* Height rate P factor
*
* @min 0.0
* @max 2.0
* @decimal 2
* @increment 0.05
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_HRATE_P
,
0
.
05
f
);
...
...
@@ -399,6 +642,10 @@ PARAM_DEFINE_FLOAT(FW_T_HRATE_P, 0.05f);
/**
* Height rate FF factor
*
* @min 0.0
* @max 2.0
* @decimal 2
* @increment 0.05
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_HRATE_FF
,
0
.
0
f
);
...
...
@@ -406,107 +653,10 @@ PARAM_DEFINE_FLOAT(FW_T_HRATE_FF, 0.0f);
/**
* Speed rate P factor
*
* @min 0.0
* @max 2.0
* @decimal 2
* @increment 0.01
* @group FW TECS
*/
PARAM_DEFINE_FLOAT
(
FW_T_SRATE_P
,
0
.
02
f
);
/**
* Landing slope angle
*
* @unit deg
* @min 1.0
* @max 15.0
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_ANG
,
5
.
0
f
);
/**
*
*
* @unit m
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_HVIRT
,
10
.
0
f
);
/**
* Landing flare altitude (relative to landing altitude)
*
* @unit m
* @min 0.0
* @max 25.0
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_FLALT
,
8
.
0
f
);
/**
* Landing throttle limit altitude (relative landing altitude)
*
* Default of -1.0 lets the system default to applying throttle
* limiting at 2/3 of the flare altitude.
*
* @unit m
* @min -1.0
* @max 30.0
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_TLALT
,
-
1
.
0
f
);
/**
* Landing heading hold horizontal distance
*
* @unit m
* @min 0
* @max 30.0
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_HHDIST
,
15
.
0
f
);
/**
* Enable or disable usage of terrain estimate during landing
*
* 0: disabled, 1: enabled
*
* @boolean
* @group FW L1 Control
*/
PARAM_DEFINE_INT32
(
FW_LND_USETER
,
0
);
/**
* Flare, minimum pitch
*
* Minimum pitch during flare, a positive sign means nose up
* Applied once FW_LND_TLALT is reached
*
* @unit deg
* @min 0
* @max 15.0
* @group FW L1 Control
*
*/
PARAM_DEFINE_FLOAT
(
FW_LND_FL_PMIN
,
2
.
5
f
);
/**
* Flare, maximum pitch
*
* Maximum pitch during flare, a positive sign means nose up
* Applied once FW_LND_TLALT is reached
*
* @unit deg
* @min 0
* @max 45.0
* @group FW L1 Control
*
*/
PARAM_DEFINE_FLOAT
(
FW_LND_FL_PMAX
,
15
.
0
f
);
/**
* Landing airspeed scale factor
*
* Multiplying this factor with the minimum airspeed of the plane
* gives the target airspeed the landing approach.
*
* @min 1.0
* @max 1.5
* @group FW L1 Control
*/
PARAM_DEFINE_FLOAT
(
FW_LND_AIRSPD_SC
,
1
.
3
f
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment