model.getGlobalVariable(index [, phase])

Return current global variable value

Example:

  -- get GV3 (index = 2) from flight phase 1 (phase = 0)
  val = model.getGlobalVariable(2, 0)

Parameters

  • index zero based global variable index, use 0 for GV1, 8 for GV9

  • phase zero based phase index, use 0 for Phase 1, 5 for Phase 6

Return value

  • nil requested global variable does not exist

  • number current value of global variable

Notice

a simple warning or notice