Module Positionable
This module contains the POSITIONABLE class.
1) Positionable#POSITIONABLE class, extends Identifiable#IDENTIFIABLE
The Positionable#POSITIONABLE class is a wrapper class to handle the DCS Positionable objects:
- Support all DCS Positionable APIs.
- Enhance with Positionable specific APIs not in the DCS Positionable API set.
- Manage the "state" of the DCS Positionable.
1.1) POSITIONABLE constructor:
The POSITIONABLE class provides the following functions to construct a POSITIONABLE instance:
- Positionable#POSITIONABLE.New(): Create a POSITIONABLE instance.
1.2) POSITIONABLE methods:
The following methods can be used to identify an measurable object:
- Positionable#POSITIONABLE.GetID(): Returns the ID of the measurable object.
- Positionable#POSITIONABLE.GetName(): Returns the name of the measurable object.
Global(s)
| POSITIONABLE |
Type DCSPositionable
| DCSPositionable.id_ |
The ID of the controllable in DCS |
Type POSITIONABLE
| POSITIONABLE.ClassName | |
| POSITIONABLE:GetAltitude() |
Returns the altitude of the DCS Positionable. |
| POSITIONABLE:GetHeading() |
Returns the DCS Positionable heading. |
| POSITIONABLE:GetPointVec2() |
Returns the DCSTypes#Vec2 vector indicating the point in 2D of the DCS Positionable within the mission. |
| POSITIONABLE:GetPointVec3() |
Returns the DCSTypes#Vec3 vector indicating the point in 3D of the DCS Positionable within the mission. |
| POSITIONABLE:GetPositionVec3() |
Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the DCS Positionable within the mission. |
| POSITIONABLE:GetVelocity() |
Returns the DCS Positionable velocity vector. |
| POSITIONABLE:InAir() |
Returns true if the DCS Positionable is in the air. |
| POSITIONABLE:IsAboveRunway() |
Returns if the Positionable is located above a runway. |
| POSITIONABLE:New(PositionableName) |
Create a new POSITIONABLE from a DCSPositionable |
| POSITIONABLE.PositionableName |
The name of the measurable. |
Global(s)
Type Positionable
Type DCSPositionable
A DCSPositionable
Field(s)
- DCSPositionable.id_
-
The ID of the controllable in DCS
Type POSITIONABLE
The POSITIONABLE class
Field(s)
- #string POSITIONABLE.ClassName
- POSITIONABLE:GetAltitude()
-
Returns the altitude of the DCS Positionable.
Return values
-
DCSTypes#Distance: The altitude of the DCS Positionable.
-
#nil: The DCS Positionable is not existing or alive.
-
- POSITIONABLE:GetHeading()
-
Returns the DCS Positionable heading.
Return value
#number: The DCS Positionable heading
- POSITIONABLE:GetPointVec2()
-
Returns the DCSTypes#Vec2 vector indicating the point in 2D of the DCS Positionable within the mission.
Return values
-
DCSTypes#Vec2: The 2D point vector of the DCS Positionable.
-
#nil: The DCS Positionable is not existing or alive.
-
- POSITIONABLE:GetPointVec3()
-
Returns the DCSTypes#Vec3 vector indicating the point in 3D of the DCS Positionable within the mission.
Return values
-
DCSTypes#Vec3: The 3D point vector of the DCS Positionable.
-
#nil: The DCS Positionable is not existing or alive.
-
- POSITIONABLE:GetPositionVec3()
-
Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the DCS Positionable within the mission.
Return values
-
DCSTypes#Position: The 3D position vectors of the DCS Positionable.
-
#nil: The DCS Positionable is not existing or alive.
-
- POSITIONABLE:GetVelocity()
-
Returns the DCS Positionable velocity vector.
Return values
-
DCSTypes#Vec3: The velocity vector
-
#nil: The DCS Positionable is not existing or alive.
-
- POSITIONABLE:InAir()
-
Returns true if the DCS Positionable is in the air.
Return values
-
#boolean: true if in the air.
-
#nil: The DCS Positionable is not existing or alive.
-
- POSITIONABLE:IsAboveRunway()
-
Returns if the Positionable is located above a runway.
Return values
-
#boolean: true if Positionable is above a runway.
-
#nil: The DCS Positionable is not existing or alive.
-
- POSITIONABLE:New(PositionableName)
-
Create a new POSITIONABLE from a DCSPositionable
Parameter
-
DCSPositionable#Positionable PositionableName: The DCS Positionable name
Return value
#POSITIONABLE: self
-
- #string POSITIONABLE.PositionableName
-
The name of the measurable.