Module Point

This module contains the POINT classes.

1) Point#POINT_VEC3 class, extends Base#BASE

The Point#POINT_VEC3 class defines a 3D point in the simulator.

Important Note: Most of the functions in this section were taken from MIST, and reworked to OO concepts. In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.

1.1) POINT_VEC3 constructor

A new POINT instance can be created with:

2) Point#POINT_VEC2 class, extends Point#POINT_VEC3

The Point#POINT_VEC2 class defines a 2D point in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.

2.1) POINT_VEC2 constructor

A new POINT instance can be created with:

Global(s)

POINT_VEC2
POINT_VEC3

Type POINT_VEC2

POINT_VEC2.ClassName
POINT_VEC2:DistanceFromPointVec2(PointVec2Reference)

Calculate the distance from a reference Point#POINT_VEC2.

POINT_VEC2:DistanceFromVec2(Vec2Reference)

Calculate the distance from a reference DCSTypes#Vec2.

POINT_VEC2:GetAltitudeText()

Return no text for the altitude of the POINT_VEC2.

POINT_VEC2:New(x, y, LandHeightAdd)

Create a new POINT_VEC2 object.

POINT_VEC2.PointVec2

Type POINT_VEC3

POINT_VEC3.ClassName
POINT_VEC3:Flare(Point, (, FlareColor, Azimuth)

Flares the point in a color.

POINT_VEC3.FlareColor
POINT_VEC3:FlareGreen((, Azimuth)

Flare the POINT_VEC3 Green.

POINT_VEC3:FlareRed(Azimuth)

Flare the POINT_VEC3 Red.

POINT_VEC3:FlareWhite((, Azimuth)

Flare the POINT_VEC3 White.

POINT_VEC3:FlareYellow((, Azimuth)

Flare the POINT_VEC3 Yellow.

POINT_VEC3:Get2DDistance(TargetPointVec3)

Return the 2D distance in meters between the target POINTVEC3 and the POINTVEC3.

POINT_VEC3:Get3DDistance(TargetPointVec3)

Return the 3D distance in meters between the target POINTVEC3 and the POINTVEC3.

POINT_VEC3:GetAltitudeText()

Return the altitude text of the POINT_VEC3.

POINT_VEC3:GetBRText(TargetPointVec3)

Return a BR string from a POINTVEC3 to the POINTVEC3.

POINT_VEC3:GetDirectionRadians(DirectionVec3)

Return a direction in radians from the POINT_VEC3 using a direction vector in Vec3 format.

POINT_VEC3:GetDirectionVec3(TargetPointVec3)

Return a direction vector Vec3 from POINTVEC3 to the POINTVEC3.

POINT_VEC3:GetNorthCorrectionRadians()

Get a correction in radians of the real magnetic north of the POINT_VEC3.

POINT_VEC3:GetVec3()

Return the coordinates of the POINT_VEC3 in Vec3 format.

POINT_VEC3:GetX()

Return the x coordinate of the POINT_VEC3.

POINT_VEC3:GetY()

Return the y coordinate of the POINT_VEC3.

POINT_VEC3:GetZ()

Return the z coordinate of the POINT_VEC3.

POINT_VEC3:IsMetric()

Gets if the POINT_VEC3 is metric or NM.

POINT_VEC3.Metric
POINT_VEC3:New(x, y, z)

Create a new POINT_VEC3 object.

POINT_VEC3.PointVec3
POINT_VEC3.RoutePointAction
POINT_VEC3:RoutePointAir(AltType, Type, Action, Speed, SpeedLocked)

Build an air type route point.

POINT_VEC3.RoutePointAltType
POINT_VEC3.RoutePointType
POINT_VEC3:SetMetric(Metric)

Sets the POINT_VEC3 metric or NM.

POINT_VEC3:Smoke(SmokeColor)

Smokes the point in a color.

POINT_VEC3:SmokeBlue()

Smoke the POINT_VEC3 Blue.

POINT_VEC3.SmokeColor
POINT_VEC3:SmokeGreen()

Smoke the POINT_VEC3 Green.

POINT_VEC3:SmokeOrange()

Smoke the POINT_VEC3 Orange.

POINT_VEC3:SmokeRed()

Smoke the POINT_VEC3 Red.

POINT_VEC3:SmokeWhite()

Smoke the POINT_VEC3 White.

POINT_VEC3:ToStringBR(AngleRadians, Distance)

Provides a Bearing / Range string

Type POINT_VEC3.FlareColor

POINT_VEC3.FlareColor.Green
POINT_VEC3.FlareColor.Red
POINT_VEC3.FlareColor.White
POINT_VEC3.FlareColor.Yellow

Type POINT_VEC3.RoutePointAction

POINT_VEC3.RoutePointAction.TurningPoint

"Turning Point"

Type POINT_VEC3.RoutePointAltType

POINT_VEC3.RoutePointAltType.BARO

"BARO"

Type POINT_VEC3.RoutePointType

POINT_VEC3.RoutePointType.TurningPoint

"Turning Point"

Type POINT_VEC3.SmokeColor

POINT_VEC3.SmokeColor.Blue
POINT_VEC3.SmokeColor.Green
POINT_VEC3.SmokeColor.Orange
POINT_VEC3.SmokeColor.Red
POINT_VEC3.SmokeColor.White

Global(s)

#POINT_VEC2 POINT_VEC2
#POINT_VEC3 POINT_VEC3

Type Point

Type POINT_VEC2

The POINT_VEC2 class

Field(s)

#string POINT_VEC2.ClassName
POINT_VEC2:DistanceFromPointVec2(PointVec2Reference)

Calculate the distance from a reference Point#POINT_VEC2.

Parameter

Return value

DCSTypes#Distance: The distance from the reference Point#POINT_VEC2 in meters.

POINT_VEC2:DistanceFromVec2(Vec2Reference)

Calculate the distance from a reference DCSTypes#Vec2.

Parameter

Return value

DCSTypes#Distance: The distance from the reference DCSTypes#Vec2 in meters.

POINT_VEC2:GetAltitudeText()

Return no text for the altitude of the POINT_VEC2.

Return value

#string: Empty string.

POINT_VEC2:New(x, y, LandHeightAdd)

Create a new POINT_VEC2 object.

Parameters

  • DCSTypes#Distance x : The x coordinate of the Vec3 point, pointing to the North.

  • DCSTypes#Distance y : The y coordinate of the Vec3 point, pointing to the Right.

  • DCSTypes#Distance LandHeightAdd : (optional) The default height if required to be evaluated will be the land height of the x, y coordinate. You can specify an extra height to be added to the land height.

Return value

Point#POINT_VEC2:

DCSTypes#Vec2 POINT_VEC2.PointVec2

Type POINT_VEC3

The POINT_VEC3 class

Field(s)

#string POINT_VEC3.ClassName
POINT_VEC3:Flare(Point, (, FlareColor, Azimuth)

Flares the point in a color.

Parameters

  • Point : POINT_VEC3.FlareColor

  • DCSTypes#Azimuth ( : ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

  • FlareColor :

  • Azimuth :

#POINT_VEC3.FlareColor POINT_VEC3.FlareColor
POINT_VEC3:FlareGreen((, Azimuth)

Flare the POINT_VEC3 Green.

Parameters

  • DCSTypes#Azimuth ( : ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

  • Azimuth :

POINT_VEC3:FlareRed(Azimuth)

Flare the POINT_VEC3 Red.

Parameter

  • Azimuth :

POINT_VEC3:FlareWhite((, Azimuth)

Flare the POINT_VEC3 White.

Parameters

  • DCSTypes#Azimuth ( : ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

  • Azimuth :

POINT_VEC3:FlareYellow((, Azimuth)

Flare the POINT_VEC3 Yellow.

Parameters

  • DCSTypes#Azimuth ( : ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

  • Azimuth :

POINT_VEC3:Get2DDistance(TargetPointVec3)

Return the 2D distance in meters between the target POINTVEC3 and the POINTVEC3.

Parameter

Return value

DCSTypes#Distance: Distance The distance in meters.

POINT_VEC3:Get3DDistance(TargetPointVec3)

Return the 3D distance in meters between the target POINTVEC3 and the POINTVEC3.

Parameter

Return value

DCSTypes#Distance: Distance The distance in meters.

POINT_VEC3:GetAltitudeText()

Return the altitude text of the POINT_VEC3.

Return value

#string: Altitude text.

POINT_VEC3:GetBRText(TargetPointVec3)

Return a BR string from a POINTVEC3 to the POINTVEC3.

Parameter

Return value

#string: The BR text.

POINT_VEC3:GetDirectionRadians(DirectionVec3)

Return a direction in radians from the POINT_VEC3 using a direction vector in Vec3 format.

Parameter

  • DCSTypes#Vec3 DirectionVec3 : The direction vector in Vec3 format.

Return value

#number: DirectionRadians The direction in radians.

POINT_VEC3:GetDirectionVec3(TargetPointVec3)

Return a direction vector Vec3 from POINTVEC3 to the POINTVEC3.

Parameter

Return value

DCSTypes#Vec3: DirectionVec3 The direction vector in Vec3 format.

POINT_VEC3:GetNorthCorrectionRadians()

Get a correction in radians of the real magnetic north of the POINT_VEC3.

Return value

#number: CorrectionRadians The correction in radians.

POINT_VEC3:GetVec3()

Return the coordinates of the POINT_VEC3 in Vec3 format.

Return value

DCSTypes#Vec3: The Vec3 coodinate.

POINT_VEC3:GetX()

Return the x coordinate of the POINT_VEC3.

Return value

#number: The x coodinate.

POINT_VEC3:GetY()

Return the y coordinate of the POINT_VEC3.

Return value

#number: The y coodinate.

POINT_VEC3:GetZ()

Return the z coordinate of the POINT_VEC3.

Return value

#number: The z coodinate.

POINT_VEC3:IsMetric()

Gets if the POINT_VEC3 is metric or NM.

Return value

#boolean: Metric true means metric, false means NM.

POINT_VEC3.Metric
POINT_VEC3:New(x, y, z)

Create a new POINT_VEC3 object.

Parameters

Return value

Point#POINT_VEC3: self

DCSTypes#Vec3 POINT_VEC3.PointVec3
#POINT_VEC3.RoutePointAction POINT_VEC3.RoutePointAction
POINT_VEC3:RoutePointAir(AltType, Type, Action, Speed, SpeedLocked)

Build an air type route point.

Parameters

Return value

#table: The route point.

#POINT_VEC3.RoutePointAltType POINT_VEC3.RoutePointAltType
#POINT_VEC3.RoutePointType POINT_VEC3.RoutePointType
POINT_VEC3:SetMetric(Metric)

Sets the POINT_VEC3 metric or NM.

Parameter

  • #boolean Metric : true means metric, false means NM.

POINT_VEC3:Smoke(SmokeColor)

Smokes the point in a color.

Parameter

POINT_VEC3:SmokeBlue()

Smoke the POINT_VEC3 Blue.

#POINT_VEC3.SmokeColor POINT_VEC3.SmokeColor
POINT_VEC3:SmokeGreen()

Smoke the POINT_VEC3 Green.

POINT_VEC3:SmokeOrange()

Smoke the POINT_VEC3 Orange.

POINT_VEC3:SmokeRed()

Smoke the POINT_VEC3 Red.

POINT_VEC3:SmokeWhite()

Smoke the POINT_VEC3 White.

POINT_VEC3:ToStringBR(AngleRadians, Distance)

Provides a Bearing / Range string

Parameters

  • #number AngleRadians : The angle in randians

  • #number Distance : The distance

Return value

#string: The BR Text

Type POINT_VEC3.FlareColor

FlareColor

Field(s)

POINT_VEC3.FlareColor.Green
POINT_VEC3.FlareColor.Red
POINT_VEC3.FlareColor.White
POINT_VEC3.FlareColor.Yellow

Type POINT_VEC3.RoutePointAction

RoutePoint Actions

Field(s)

POINT_VEC3.RoutePointAction.TurningPoint

"Turning Point"

Type POINT_VEC3.RoutePointAltType

RoutePoint AltTypes

Field(s)

POINT_VEC3.RoutePointAltType.BARO

"BARO"

Type POINT_VEC3.RoutePointType

RoutePoint Types

Field(s)

POINT_VEC3.RoutePointType.TurningPoint

"Turning Point"

Type POINT_VEC3.SmokeColor

SmokeColor

Field(s)

POINT_VEC3.SmokeColor.Blue
POINT_VEC3.SmokeColor.Green
POINT_VEC3.SmokeColor.Orange
POINT_VEC3.SmokeColor.Red
POINT_VEC3.SmokeColor.White