Configs
| Documentation | /NGOS | /Signals | /Shells | /Cmds | /Ctrl | /HALs | /Conf | /Params | /Behaviors | /Receiver | /GPS | Next Chapter |
The NG Configurations
Introduction
Different Controllers need to be able to have different configuration parameters. To allow this, the NGOS has two types of configuration parameters, global parameters and controller dependent parameters. Both can be used with the same commands and some Controllers share parameters with other ones if the parameter represents the same variable.
Global Configuration Parameters
The Global Configuration Parameters are the same for all possible Controllers. They represent global variables which can be only changed by the user. The parameters can be viewed with the command show globals. The value of the parameters can be changed using the command set <var> <val>.
The output of the show globals parameters looks similar to this:
. {{{
show globals
Current global configuration:
Name UAVP Configuration name
RC.ch.throttle 0 RC channel throttle RC.ch.nick 2 RC channel nick RC.ch.roll 1 RC channel roll RC.ch.yaw 3 RC channel yaw RC.ch.pot0 8 RC channel pot0 RC.ch.pot1 4 RC channel pot1 RC.ch.pot2 6 RC channel pot2 RC.ch.pot3 5 RC channel pot3 RC.ch.pot4 7 RC channel pot4 RC.ch.pot5 9 RC channel pot5 RC.ch.pot6 10 RC channel pot6 RC.ch.pot7 11 RC channel pot7
RC.mode 2 RC stick mode
BAT.minimum 9.80000019 Battery minimum voltage BAT.offset 0.00000000 Battery offset voltage
TERM.mode user Terminal mode
HW.HAL none HW HAL to use
HW.uart0.bootmsg yes HW boot messages on UART0 HW.uart1.bootmsg yes HW boot messages on UART1
HW.uart0.baud 115200 HW baud rate for UART0 HW.uart1.baud 115200 HW baud rate for UART1
HW.uart0.format 8N1 HW format for UART0 HW.uart1.format 8N1 HW format for UART1
HW.uart0.mode auto HW mode for UART0 HW.uart1.mode auto HW mode for UART1
HW.gyro.type ADXR300 HW gyro type HW.gyro.scale.N 1000 HW gyro N scaling HW.gyro.scale.R 1000 HW gyro R scaling HW.gyro.scale.Y 1000 HW gyro Y scaling HW.acc.horizontal yes HW acc mount orientation HW.compass.inverted no HW compass upside down HW.compass.corr 0 HW correct compass heading HW.actor.init 0 HW number of actors
HW.use.sound inverted HW do use sound device HW.use.acc yes HW do use accelerometer HW.use.baro yes HW do use barometer HW.use.ngpp yes HW do use NG peripherial protocol (may need NGPP) HW.use.gps yes HW do use Global Positioning System (may need NGPP) HW.use.compass yes HW do use compass (may need NGPP)
CTRL.use.dtc yes CTRL do use dynamic throttle control CTRL.use.PT1.comp no CTRL do use PT1 compensation
CTRL.PT1.comp.k1 800 CTRL PT1 parameter K1 CTRL.PT1.comp.t1.down 148 CTRL PT1 parameter T1 down CTRL.PT1.comp.t1.up 148 CTRL PT1 parameter T1 up
CTRL.rate.limit no CTRL do angular rate limit
CAL.Ncorr 0 CAL nick angle correction CAL.Rcorr 0 CAL roll angle correction
CAL.hmc.offset.X 0 HW HMC5883L X Offset CAL.hmc.offset.Y 0 HW HMC5883L Y Offset CAL.hmc.offset.Z 0 HW HMC5883L Z Offset CAL.hmc.range.X 32767 HW HMC5883L X Range CAL.hmc.range.Y 32767 HW HMC5883L Y Range CAL.hmc.range.Z 32767 HW HMC5883L Z Range
ACC.nickcal 0 Nick Acc calibration ACC.rollcal 0 Roll Acc calibration ACC.yawcal 0 Yaw Acc calibration
ACC.nickcorr 0 Nick Acc correction ACC.rollcorr 0 Roll Acc correction ACC.yawcorr 0 Yaw Acc correction
RC.sum.jitter 16 RC sum jitter range RC.yaw.jitter 32 RC yaw jitter range RC.show.drops no RC show frame drops
RC.dev.primary rcsum RC primary input device RC.dev.secondary rcsum RC secondary input device RC.dev.mix primary RC device mixing type }}}
Controller Dependent Parameters
Each Controller has associated Controller Dependent Parameters. Some of them are shared between controllers because they represent the same parameters, some are not. They represent configuration parameters used by the currently configured Controller and affect the closed-loop control algorithm implemented by that Controller. The parameters of the currently configured controller can be viewed with the command show conf.
The output of the show conf parameters may look similar to this (when using the amir controller):
# show conf
Current controller configuration:
Controller amir Closed-loop controller
T.idle 20 Throttle idle speed
T.reserve 20 Throttle control reserve
T.spinup 2 Throttle spinup time (sec)
P.nick 80 Nick proportional factor
P.roll 80 Roll proportional factor
P.yaw 200 Yaw proportional factor
D.nick 70 Nick differential factor
D.roll 70 Roll differential factor
D.yaw 70 Yaw differential factor
I.nick 35 Nick integral factor
I.roll 35 Roll integral factor
I.yaw 0 Yaw integral factor
ACC.valid 125 Allowed ACC divergence from (1000mg)^2
Kalman.Angle.Q 0.00030000 Kalman angle process var
Kalman.Bias.Q 0.00010000 Kalman bias process var
Kalman.Acc.R 3.00000000 Kalman system var
Kalman.Cycle 1 Kalman update intervall
Kalman.Limit 1 Kalman gyro stationary limit
P.z 1950 Height proportional factor
D.z 5000 Height differential factor
I.z 0 Height integral factor
P.z.limit 20 Height correction limiter
P.z.upfact 28 Upwards height correction (%)
Z.Kalman.L1 1.29170001 Height Kalman-Bucy L1 factor
Z.Kalman.L2 0.83420002 Height Kalman-Bucy L2 factor
Z.Kalman.L3 -0.26930001 Height Kalman-Bucy L3 factor
CTRL.use.acc yes CTRL do use accelerometer
CTRL.use.compass no CTRL do use compass (needs NGPP)
RC.throttlehover -1600 RC hover throttle
RC.fact.nick 40 RC stick factor nick
RC.fact.roll 40 RC stick factor roll
RC.fact.yaw 50 RC stick factor yaw
Axis.decoupling yes Axis decouplingHow to use different configurations
The different configurations can be configured on the NG Shells. Each controller will have its own controller dependant configuration variables. Some of them are shared between controllers because they represent the same parameters, some are not. Switching to a Controller also switches to its associated controller dependent configuration parameters.
The needed Shell Commands
The Global Configuration Parameters can be viewed using the command show globals. The parameters of the Controller Dependent Parameters can be viewed with the command show conf after having choosen a controller using the command ‘set controller <ctrl>’.
The command set controller <ctrl> configures the currently used closed-loop controller amd switches to its associated controller dependent configuration parameters.
The values of the parameters can be changed with the command set <var> <val>. For controller dependent integer parameters there’s a second command called edit <var>.
The global and and controller dependent parameters can be stored with the command conf store [<slot>] and loaded with the command conf load [<slot>]. The commands always store global parameters, configured controller and all controller dependent variables in one slot.
Behavior triggered Configuration Change
There exists a behavior action which can change the configured controller. It is called ctrl.switch.conf(x). It can switch to the next or the previous configuration or to a specific one.