Historical project documentation. Content is maintained in GitLab.

Parameters

Documentation/NGOS/Signals/Shells/Cmds/Ctrl/HALs/Conf/Params/Behaviors/Receiver/GPSNext Chapter

The NG Configuration Parameters

See the Documentation/Configs page for an explanation of configuration parameters and how to modify them.

The Global Parameters

Use the show globals command to list the current values of these parameters.

Parameter nameDefault valueHelp textDescription
`name`UAVPConfiguration nameThe name of this configuration used in the 'list conf' output.
`RC.ch.throttle`0RC channel throttleThe RC.ch.* parameters define which RC channel represents which RC function: throttle, nick, roll, yaw. They also define the channels for the pot[0..7] channels.
`RC.ch.nick`2RC channel nick
`RC.ch.roll`1RC channel roll
`RC.ch.yaw`3RC channel yaw
`RC.ch.pot0`8RC channel pot0
`RC.ch.pot1`4RC channel pot1
`RC.ch.pot2`6RC channel pot2
`RC.ch.pot3`5RC channel pot3
`RC.ch.pot4`7RC channel pot4
`RC.ch.pot5`9RC channel pot5
`RC.ch.pot6`10RC channel pot6
`RC.ch.pot7`11RC channel pot7
`RC.mode`2RC stick modeDefines which of the four possible stick modes you use on your RC transmitter.
Please see Documentation/HOWTO/RC-Modes for more information.
`BAT.minimum`9.80000000Battery minimum voltageDefines the minimal value of the battery voltage measurement. If the battery's voltage falls below this voltage, the while.battery.low() behavior condition will trigger which is by default used to play the low-battery warning sound.
`BAT.offset`0.00000000Battery offset voltageCan be used to calibrate the internal battery voltage measurement. The configured value is added to each measurement.
`TERM.mode`userTerminal modeLimits the set of commads shown in the help output. Valid values are user, expert and api. This parameter can also be set using the `mode` command.
`HW.HAL`noneHW HAL to useThe Hardware Abstraction Layer to use.
`HW.uart0.bootmsg`yesHW boot messages on UART0Whether to show boot messages on the given UART or not. Disable boot messages if you plan to use this UART for DSL or similar.
`HW.uart1.bootmsg`yesHW boot messages on UART1
`HW.uart0.baud`115200HW baud rate for UART0The baud rate for the given UART. Valid values are 1200, 2400, 4800, 9600, 19200, 38400, 57600, 100000 and 115200 Baud.
`HW.uart1.baud`115200HW baud rate for UART1
`HW.uart0.format`8N1HW format for UART0The format for the given UART. Valid values are 8N1, 7N1, 8N2, 7N2, 8E1, 7E1, 8E2, 7E2, 8O1, 7O1, 8O2 and 8O1.
`HW.uart1.format`8N1HW format for UART1
`HW.uart0.mode`autoHW mode for UART0Defines how to use the given UART. Valid values are auto, spektrum, [m-link|msb] and venus.
/!\ To use DSL or M-Link/MSB/M-Bus on a port you need to switch that UART to 38400 baud first!
`HW.uart1.mode`autoHW mode for UART1
`HW.gyro.type`ADXR300HW gyro typeValid gyro types are ADXR300, MLX, ADXR610, MPU-2000deg, MPU-1000deg, MPU-500deg and MPU-250deg
`HW.gyro.scale.N`1000HW gyro N scaling
`HW.gyro.scale.R`1000HW gyro R scaling
`HW.gyro.scale.Y`1000HW gyro Y scaling
`HW.acc.horizontal`yesHW acc mount orientation
`HW.compass.inverted`noHW compass upside down
`HW.compass.corr`0HW correct compass heading
`HW.actor.init`0HW number of actors
`HW.use.sound`invertedHW do use sound deviceDefines if the buzzer is used. Valid values are yes, no and inverted.
`HW.use.acc`yesHW do use accelerometerDefines if linear acceleration sensor is used.
{i} We advise to set this to yes. /!\ Not all controllers support this parameter!
`HW.use.baro`yesHW do use barometer
`HW.use.ngpp`yesHW do use NG peripherial protocol (may need NGPP)
`HW.use.gps`yesHW do use Global Positioning System (may need NGPP)
`HW.use.compass`yesHW do use compass (may need NGPP)Defines if compass sensor is used.
{i} We advise to set this to no for HW-0.10.
`CTRL.use.dtc`yesCTRL do use dynamic throttle controlDefines if the Dynamic Throttle Control (DTC) is used or if a simple limitter algorithm is used.
{i} We advise to set this to yes.
`CTRL.use.PT1.comp`noCTRL do use PT1 compensation
`CTRL.PT1.comp.k1`800CTRL PT1 parameter K1
`CTRL.PT1.comp.t1.down`148CTRL PT1 parameter T1 down
`CTRL.PT1.comp.t1.up`148CTRL PT1 parameter T1 up
`CTRL.rate.limit`noCTRL do angular rate limit
`CAL.Ncorr`0CAL nick angle correction
`CAL.Rcorr`0CAL roll angle correction
`CAL.hmc.offset.X`0HW HMC5883L X Offset
`CAL.hmc.offset.Y`0HW HMC5883L Y Offset
`CAL.hmc.offset.Z`0HW HMC5883L Z Offset
`CAL.hmc.range.X`32767HW HMC5883L X Range
`CAL.hmc.range.Y`32767HW HMC5883L Y Range
`CAL.hmc.range.Z`32767HW HMC5883L Z Range
`ACC.nickcal`0Nick Acc calibrationThese three parameters hold the linear accelerometer calibration done when the Quadcopter stands exactly horizontal. When the ACC calibration gets triggered by command or Behavior rules the NGOS stores the result in these parameters.
`ACC.rollcal`0Roll Acc calibration
`ACC.yawcal`0Yaw Acc calibration
`ACC.nickcorr`0Nick Acc correction
`ACC.rollcorr`0Roll Acc correction
`ACC.yawcorr`0Yaw Acc correction
`RC.sum.jitter`16RC sum jitter range
`RC.yaw.jitter`32RC yaw jitter range
`RC.show.drops`noRC show frame dropsDefines if an error message should be printed to the console for each dropped RC packet.
{i} We advise to set this to no.
`RC.dev.primary`rcsumRC primary input deviceDefines the Primary Default RC Control. It can be set to the values rcsum, uart0 and uart1.
`RC.dev.secondary`rcsumRC secondary input deviceDefines the Secondary RC Control used for Diversity or Teacher/Student mode. It can be set to the values rcsum, uart0 and uart1.
`RC.dev.mix`primaryRC device mixing typeDefines the RC Mix Mode. It can be set to the values primary, secondary, ts-mix, ts-switch and diversity.

Controller Dependent Parameters

Use the show conf command to list the current values of these parameters.

Shared Parameters

The following parameters are controller dependent but used by more than one controller:

Parameter nameDefault valueHelp textDescription
`controller`noneClosed-loop controllerSelects the closed-loop control algorithm to use. Use the list ctrl command to get a list of known controllers.
`T.idle`20Throttle idle speedRepresents the minimal output to the motor controllers when having finished the SPINUP flight-phase. This value assures that the motors will never stop since a controller will never output less as a motor signal.
`T.reserve`20Throttle control reserveRepresents the amount of control-reserve the closed-loop control will have when having finished the SPINGUP flight-phase. This means that a motor will receive an output signal of T.idle + T.reserve when having finished the SPINUP flight-phase.
`T.spinup`2Throttle spinup time (sec)Represents the time the SPINUP flight-phase takes. Within that time-frame the closed-loop control will spinup the motors to their initial speed. The speed is defined by the parameters T.idle and T.reserve.
`P.nick`80Nick proportional factorThis are the Proportional Parameters meaning the P of the PID closed-loop control of the controller for the nick-, roll- and yaw-axis.
{i} Note that the parameters have to be positive. The algorithms are implemented accordingly!
`P.roll`80Roll proportional factor
`P.yaw`200Yaw proportional factor
`D.nick`70Nick differential factorThis are the Differential Parameters meaning the D of the PID closed-loop control of the controller for the nick-, roll- and yaw-axis.
{i} Note that the parameters have to be positive. The algorithms are implemented accordingly!
`D.roll`70Roll differential factor
`D.yaw`70Yaw differential factor
`I.nick`35Nick integral factorThis are the Integral Parameters meaning the I of the PID closed-loop control of the controller for the nick-, roll- and yaw-axis.
{i} Note that the parameters have to be positive. The algorithms are implemented accordingly!
`I.roll`35Roll integral factor
`I.yaw`0Yaw integral factor
`CTRL.use.acc`yesCTRL do use accelerometer
`CTRL.use.compass`noCTRL do use compass (needs NGPP)
`RC.throttlehover`-1600RC hover throttle
`RC.fact.nick`40RC stick factor nickThe RC Factor Parameters define what factor gets used when calculating RC movements into the closed-loop control. A bigger value assures smaller stick movement for the same change.
`RC.fact.roll`40RC stick factor roll
`RC.fact.yaw`50RC stick factor yaw

‘wolferl’ Controller Parameters

Parameter nameDefault valueHelp textDescription
`ACC.step`2Acc pull max step

‘bearing’ Controller Parameters

Parameter nameDefault valueHelp textDescription
`ACC.step`2Acc pull max step
These parameters represent the usual Kalman parameters for the Kalman implementation for attitude. Be sure to check regular documentation on Kalman filters before changing these values!
`Kalman.Angle.Q`0.00030000Kalman angle process varDefines the measurement noise of the gyro measurement. Raising it results in less trust into the gyro measurements.
`Kalman.Bias.Q`0.00010000Kalman bias process varDefines the measurement noise of the "bias" measurement. Since we do not measure the bias but model it as a random walking process, this is not a real noise value. Raising it results in less trust into the pseudo bias measurements.
`Kalman.Acc.R`3.00000000Kalman system varDefines the system noise of the modeled system. Raising it results in less trust into the guessed angle and in more trust to "reality", meaning the measurement from the accelerometer.
`Kalman.Cycle`1Kalman update intervallDefines how often the linear accelerometer gets used to hold the value of the gyro integral. As you probably know the Kalman filter is separated into a "predict" and a "update" phase. This parameter defines how often the predict phase should happen until we do an update phase.

‘amir’ Controller Parameters

Parameter nameDefault valueHelp textDescription
`ACC.valid`125Allowed ACC divergence from (1000mg)^2
These parameters represent the usual Kalman parameters for the Kalman implementation for attitude. Be sure to check regular documentation on Kalman filters before changing these values!
`Kalman.Angle.Q`0.00030000Kalman angle process varDefines the measurement noise of the gyro measurement. Raising it results in less trust into the gyro measurements.
`Kalman.Bias.Q`0.00010000Kalman bias process varDefines the measurement noise of the "bias" measurement. Since we do not measure the bias but model it as a random walking process, this is not a real noise value. Raising it results in less trust into the pseudo bias measurements.
`Kalman.Acc.R`3.00000000Kalman system varDefines the system noise of the modeled system. Raising it results in less trust into the guessed angle and in more trust to "reality", meaning the measurement from the accelerometer.
`Kalman.Cycle`1Kalman update intervallDefines how often the linear accelerometer gets used to hold the value of the gyro integral. As you probably know the Kalman filter is separated into a "predict" and a "update" phase. This parameter defines how often the predict phase should happen until we do an update phase.
`Kalman.Limit`1Kalman gyro stationary limit
`P.z`1950Height proportional factorThe PID closed-loop control parameters of the altitude hold controller.
Use the ctrl.altitude.hold(x) behavior action to enable/disable altitude hold.
`D.z`5000Height differential factor
`I.z`0Height integral factor
`P.z.limit`20Height correction limiterThe maximum throttle adjustment made by the altitude hold controller.
`P.z.upfact`28Upwards height correction (%)
`Z.Kalman.L1`1.29170001Height Kalman-Bucy L1 factorThese parameters represent the usual Kalman-Bucy parameters for the Kalman implementation for height. This implementation precalculates the Inverse in Matlab. Be sure to check regular documentation on Kalman filters before changing these values!
`Z.Kalman.L2`0.83420002Height Kalman-Bucy L2 factor
`Z.Kalman.L3`-0.26930001Height Kalman-Bucy L3 factor
`Axis.decoupling`yesAxis decoupling

KalmanZ.L[123]

The Kalman parameter for the Kalman-Bucy filter for height are represented by 3 precalculated constants called L1, L2 and L3. To find values for these, one needs to estimate the noise of the accelerometer and barometer sensor data.

To be able to precalculate L1, L2 and L3 we need to measure the standard deviation of the raw sensor data. Having done that, Matlab is able to calulate the standard deviation from the raw sensor data like this:

  ACC_NOISE  = std(accRaw)^2
  BARO_NOISE = std(baroRaw)^2

The value ACC_WALK needs to be guessed and represents the step-width of the random walk modelling the bias-walk.

The three constants then can get precalculated in Matlab with the following Matlab-Script:

  % Standard deviation of the sensor noise signals:
  ACC_NOISE  = 0.0798;
  BARO_NOISE = 0.7488;
  ACC_WALK   = 0.005;

  % Build system matrix
  A = [0,1,0;0,0,-1;0,0,0]
  B = [0;1;0];
  C = [1,0,0];
  D = [0];

  % Calculate covariance matrix
  Q = diag([0,ACC_NOISE,ACC_WALK]);
  R = BARO_NOISE;

  % Calculate Kalman gain
  L = lqr(A',C',Q,R,[])'

The array L[] contains the 3 constants L1, L2 and L3 after the above script has run.

‘amir-ng’ Controller Parameters

The following parameters control the DCM attitude stabilization algorthm:

Parameter nameDefault valueHelp textDescription
`I.yaw.delay`0Yaw integral activation delay [ms]
`DCM.Kalman.corr.Q`0.00010000DCM Kalman process var (corr)
`DCM.Kalman.bias.Q`0.00010000DCM Kalman process var (bias)
`DCM.Kalman.Acc.R`0.00100000DCM Kalman system var (Acc)
`DCM.Kalman.Compass.R`0.00010000DCM Kalman Compass system var
`DCM.Kalman.weight.NR`100DCM Kalman correction weight N/R
`DCM.Kalman.weight.Y`400DCM Kalman correction weight Y

These parameters control the height hold stabilization algorithm:

Parameter nameDefault valueHelp textDescription
`P.z`1950Height proportional factorThe PID closed-loop control parameters of the altitude hold controller.
Use the ctrl.altitude.hold(x) behavior action to enable/disable altitude hold.
`D.z`5000Height differential factor
`I.z`0Height integral factor
`P.z.limit`20Height correction limiterThe maximum throttle adjustment made by the altitude hold controller.
`P.z.upfact`28Upwards height correction (%)

And the following parameters control the GPS Position filter (POS.*) and the Position Navigation algorithm:

Parameter nameDefault valueHelp textDescription
`POS.Kalman.Acc.Q`0.20000000Position Kalman process var (Acc)
`POS.Kalman.GPS.R`0.05000000Position Kalman system var (GPS)
`POS.Kalman.Baro.R`0.00001000Position Kalman system var (Baro)
`NAV.angle.max`10Navigation maximum angle
`NAV.angle.attack`50Navigation angle attack (more -> softer)
`NAV.min.satellites`6Navigation mininal number of satellites

Controller usage of each of the supported sensor devices may be enabled or disabled:

Parameter nameDefault valueHelp textDescription
`CTRL.use.baro`noCTRL do use baro
`CTRL.use.gps`noCTRL do use GPS (needs NGPP)

The controller also supports ADTC - Attitude Dynamic Throttle Control which tries to compensate attitude induced height changes by dynamically ajust throttle:

Parameter nameDefault valueHelp textDescription
`CTRL.use.ADTC`noCTRL do use attitude dependant throttle control

Furthermore the controller supports Heading-Hold which can be switched on and off during the flight using behaviors too:

Parameter nameDefault valueHelp textDescription
`CTRL.use.HH`noCTRL do use Heading Hold PID
`CTRL.acc.hh.fact`40CTRL ACC/HH stick factor

Ignore this parameter for now: ;)

Parameter nameDefault valueHelp textDescription
`FLIP.turnrate`30Flip turnrate