Envrioment:
|
Mission Scripting
|
|
Function:
|
setAltitude
|
Added with: 2.7.11
|
|
Member Of:
|
Controller
|
Syntax:
|
function Controller.setAltitude(Class self , number altitude , boolean keep, string altType)
|
Description:
|
Sets the controlled aircraft group to the specified altitude in meters.
Optional boolean keep when set to true will maintain that altitude on passing waypoints. If no present or false the aircraft will return to the altitude as defined by their route.
Optional string altType will specify the altitude type used. If nil the altitude type of the current waypoint will be used. Accepted values are the altitude enumerator:
AI.Task.AltitudeType,
"RADIO" = "RADIO"
"BARO" = "BARO"
|
|
Return Value:
|
function
|
Return Example:
|
none
|
|
Examples:
|
The following will set the aircraft to fly at 100m AGL through their route:
Group.getByName("IAMTHEGREATEST"):getController:setAltitude(100, true, "BARO")
|
Related Functions:
|
Controller: setTask, resetTask, pushTask, popTask, hasTask, setCommand, setOption, setOnOff, setAltitude, setSpeed, knowTarget, isTargetDetected, getDetectedTargets
|
Notes:
|
|