Module Point
Core -- POINT_VEC classes define an extensive API to manage 3D points in the simulation space.
Demo Missions
POINT_VEC Demo Missions source code
POINT_VEC Demo Missions, only for beta testers
ALL Demo Missions pack of the last release
YouTube Channel
POINT_VEC YouTube Channel
Authors:
- FlightControl : Design & Programming
Contributions:
Global(s)
| COORDINATE |
COORDINATE class, extends Base#BASECOORDINATE defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space. |
| POINT_VEC2 |
POINT_VEC2 class, extends Point#COORDINATEThe Point#POINT_VEC2 class defines a 2D point in the simulator. |
| POINT_VEC3 |
POINT_VEC3 class, extends Point#COORDINATEPOINT_VEC3 defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space. |
Type COORDINATE
| COORDINATE:DistanceFromVec2(Vec2Reference) | |
| COORDINATE:Explosion(ExplosionIntensity) |
Creates an explosion at the point of a certain intensity. |
| COORDINATE:Flare(FlareColor, (, Azimuth) |
Flares the point in a color. |
| COORDINATE:FlareGreen((, Azimuth) |
Flare the COORDINATE Green. |
| COORDINATE:FlareRed(Azimuth) |
Flare the COORDINATE Red. |
| COORDINATE:FlareWhite((, Azimuth) |
Flare the COORDINATE White. |
| COORDINATE:FlareYellow((, Azimuth) |
Flare the COORDINATE Yellow. |
| COORDINATE:Get2DDistance(TargetCoordinate) |
Return the 2D distance in meters between the target COORDINATE and the COORDINATE. |
| COORDINATE:Get3DDistance(TargetCoordinate) |
Return the 3D distance in meters between the target COORDINATE and the COORDINATE. |
| COORDINATE:GetAltitudeText(Settings) |
Return the altitude text of the COORDINATE. |
| COORDINATE:GetAngleDegrees(DirectionVec3) |
Return an angle in degrees from the COORDINATE using a direction vector in Vec3 format. |
| COORDINATE:GetAngleRadians(DirectionVec3) |
Return an angle in radians from the COORDINATE using a direction vector in Vec3 format. |
| COORDINATE:GetBRAText(AngleRadians, Distance, Settings) |
Provides a Bearing / Range / Altitude string |
| COORDINATE:GetBRText(AngleRadians, Distance, Settings) |
Provides a Bearing / Range string |
| COORDINATE:GetBearingText(AngleRadians, Precision, Settings) |
Provides a bearing text in degrees. |
| COORDINATE:GetDirectionVec3(TargetCoordinate) |
Return a direction vector Vec3 from COORDINATE to the COORDINATE. |
| COORDINATE:GetDistanceText(Distance, Settings) |
Provides a distance text expressed in the units of measurement. |
| COORDINATE:GetHeading() |
Get the heading of the coordinate, if applicable. |
| COORDINATE:GetHeadingText(Settings) |
Return the heading text of the COORDINATE. |
| COORDINATE:GetLandHeight() |
Return the height of the land at the coordinate. |
| COORDINATE:GetMovingText(Settings) |
Return velocity text of the COORDINATE. |
| COORDINATE:GetNorthCorrectionRadians() |
Get a correction in radians of the real magnetic north of the COORDINATE. |
| COORDINATE:GetRandomVec2InRadius(OuterRadius, InnerRadius) |
Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE. |
| COORDINATE:GetRandomVec3InRadius(OuterRadius, InnerRadius) |
Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE. |
| COORDINATE:GetVec2() |
Return the coordinates of the COORDINATE in Vec2 format. |
| COORDINATE:GetVec3() |
Return the coordinates of the COORDINATE in Vec3 format. |
| COORDINATE:GetVelocity() |
Return the velocity of the COORDINATE. |
| COORDINATE:GetVelocityText(Settings) |
Return the velocity text of the COORDINATE. |
| COORDINATE.Heading | |
| COORDINATE:IlluminationBomb() |
Creates an illumination bomb at the point. |
| COORDINATE:IsInRadius(ToCoordinate, Radius, Coordinate) |
Returns if a Coordinate is in a certain Radius of this Coordinate in 2D plane using the X and Z axis. |
| COORDINATE:IsInSphere(ToCoordinate, Radius, Coordinate) |
Returns if a Coordinate is in a certain radius of this Coordinate in 3D space using the X, Y and Z axis. |
| COORDINATE:IsLOS(ToCoordinate) |
Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate. |
| COORDINATE:MarkToAll(MarkText) |
Mark to All |
| COORDINATE:MarkToCoalition(MarkText, Coalition) |
Mark to Coalition |
| COORDINATE:MarkToCoalitionBlue(MarkText) |
Mark to Blue Coalition |
| COORDINATE:MarkToCoalitionRed(MarkText) |
Mark to Red Coalition |
| COORDINATE:MarkToGroup(MarkText, MarkGroup) |
Mark to Group |
| COORDINATE:New(x, y, z) |
COORDINATE constructor. |
| COORDINATE:NewFromVec2(Vec2, LandHeightAdd) |
Create a new COORDINATE object from Vec2 coordinates. |
| COORDINATE:NewFromVec3(Vec3) |
Create a new COORDINATE object from Vec3 coordinates. |
| COORDINATE:RemoveMark(MarkID) |
Remove a mark |
| COORDINATE:SetHeading(Heading) |
Set the heading of the coordinate, if applicable. |
| COORDINATE:SetVelocity(Velocity) |
Set the velocity of the COORDINATE. |
| COORDINATE:Smoke(SmokeColor) |
Smokes the point in a color. |
| COORDINATE:SmokeBlue() |
Smoke the COORDINATE Blue. |
| COORDINATE:SmokeGreen() |
Smoke the COORDINATE Green. |
| COORDINATE:SmokeOrange() |
Smoke the COORDINATE Orange. |
| COORDINATE:SmokeRed() |
Smoke the COORDINATE Red. |
| COORDINATE:SmokeWhite() |
Smoke the COORDINATE White. |
| COORDINATE:ToString(Controllable, Settings, Task) |
Provides a coordinate string of the point, based on a coordinate format system: * Uses default settings in COORDINATE. |
| COORDINATE:ToStringA2A(Controllable, Settings) |
Provides a coordinate string of the point, based on the A2A coordinate format system. |
| COORDINATE:ToStringA2G(Controllable, Settings) |
Provides a coordinate string of the point, based on the A2G coordinate format system. |
| COORDINATE:ToStringAspect(TargetCoordinate) |
Return an aspect string from a COORDINATE to the Angle of the object. |
| COORDINATE:ToStringBR(TargetCoordinate, FromCoordinate, Settings) |
Return a BR string from a COORDINATE to the COORDINATE. |
| COORDINATE:ToStringBRA(TargetCoordinate, FromCoordinate, Settings) |
Return a BRAA string from a COORDINATE to the COORDINATE. |
| COORDINATE:ToStringBULLS(Coalition, Settings) |
Return a BULLS string from a COORDINATE to the BULLS of the coalition. |
| COORDINATE:ToStringFromRP(Controllable, Settings, ReferenceCoord, ReferenceName) |
Provides a coordinate string of the point, based on a coordinate format system: * Uses default settings in COORDINATE. |
| COORDINATE:ToStringLLDDM(Settings) |
Provides a Lat Lon string in Degree Decimal Minute format. |
| COORDINATE:ToStringLLDMS(Settings) |
Provides a Lat Lon string in Degree Minute Second format. |
| COORDINATE:ToStringMGRS(Settings) |
Provides a MGRS string |
| COORDINATE:Translate(Distance, Angle) |
Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE. |
| COORDINATE.Velocity | |
| COORDINATE.WaypointAction | |
| COORDINATE:WaypointAir(AltType, Type, Action, Speed, SpeedLocked) |
Build an air type route point. |
| COORDINATE:WaypointAirFlyOverPoint(AltType, Speed) |
Build a Waypoint Air "Fly Over Point". |
| COORDINATE:WaypointAirLanding(Speed) |
Build a Waypoint Air "Landing". |
| COORDINATE:WaypointAirTakeOffParking(AltType, Speed) |
Build a Waypoint Air "Take Off Parking". |
| COORDINATE:WaypointAirTakeOffParkingHot(AltType, Speed) |
Build a Waypoint Air "Take Off Parking Hot". |
| COORDINATE:WaypointAirTakeOffRunway(AltType, Speed) |
Build a Waypoint Air "Take Off Runway". |
| COORDINATE:WaypointAirTurningPoint(AltType, Speed) |
Build a Waypoint Air "Turning Point". |
| COORDINATE.WaypointAltType | |
| COORDINATE:WaypointGround(Speed, Formation) |
Build an ground type route point. |
| COORDINATE.WaypointType | |
| COORDINATE.x | |
| COORDINATE.y | |
| COORDINATE.z |
Type POINT_VEC2
| POINT_VEC2:AddAlt(Altitude) |
Add to the current land height an altitude. |
| POINT_VEC2:AddX(x) |
Add to the x coordinate of the POINT_VEC2. |
| POINT_VEC2:AddY(y) |
Add to the y coordinate of the POINT_VEC2. |
| POINT_VEC2:DistanceFromPointVec2(PointVec2Reference) | |
| POINT_VEC2:GetAlt() |
Return the altitude (height) of the land at the POINT_VEC2. |
| POINT_VEC2:GetLat() |
Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x). |
| POINT_VEC2:GetLon() |
Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z). |
| POINT_VEC2:GetRandomPointVec2InRadius(OuterRadius, InnerRadius) |
Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC2. |
| POINT_VEC2:GetX() |
Return the x coordinate of the POINT_VEC2. |
| POINT_VEC2:GetY() |
Return the y coordinate of the POINT_VEC2. |
| POINT_VEC2:New(x, y, LandHeightAdd) |
POINT_VEC2 constructor. |
| POINT_VEC2:NewFromVec2(Vec2, LandHeightAdd) |
Create a new POINT_VEC2 object from Vec2 coordinates. |
| POINT_VEC2:NewFromVec3(Vec3) |
Create a new POINT_VEC2 object from Vec3 coordinates. |
| POINT_VEC2:SetAlt(Altitude) |
Set the altitude of the POINT_VEC2. |
| POINT_VEC2:SetLat(x) |
Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x). |
| POINT_VEC2:SetLon(y, z) |
Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z). |
| POINT_VEC2:SetX(x) |
Set the x coordinate of the POINT_VEC2. |
| POINT_VEC2:SetY(y) |
Set the y coordinate of the POINT_VEC2. |
| POINT_VEC2.x |
The x coordinate in meters. |
| POINT_VEC2.y |
the y coordinate in meters. |
| POINT_VEC2.z |
Type POINT_VEC3
| POINT_VEC3:AddX(x) |
Add to the x coordinate of the POINT_VEC3. |
| POINT_VEC3:AddY(y) |
Add to the y coordinate of the POINT_VEC3. |
| POINT_VEC3:AddZ(z) |
Add to the z coordinate of the POINT_VEC3. |
| POINT_VEC3.FlareColor | |
| POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius) |
Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3. |
| 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:New(x, y, z) |
Create a new POINT_VEC3 object. |
| POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd) |
Create a new POINT_VEC3 object from Vec2 coordinates. |
| POINT_VEC3:NewFromVec3(Vec3) |
Create a new POINT_VEC3 object from Vec3 coordinates. |
| POINT_VEC3.RoutePointAction | |
| POINT_VEC3.RoutePointAltType | |
| POINT_VEC3.RoutePointType | |
| POINT_VEC3:SetX(x) |
Set the x coordinate of the POINT_VEC3. |
| POINT_VEC3:SetY(y) |
Set the y coordinate of the POINT_VEC3. |
| POINT_VEC3:SetZ(z) |
Set the z coordinate of the POINT_VEC3. |
| POINT_VEC3.SmokeColor | |
| POINT_VEC3.x |
The x coordinate in 3D space. |
| POINT_VEC3.y |
The y coordinate in 3D space. |
| POINT_VEC3.z |
The z coordiante in 3D space. |
Type POINT_VEC3.RoutePointAction
| POINT_VEC3.RoutePointAction.FromParkingArea |
"From Parking Area" |
| POINT_VEC3.RoutePointAction.TurningPoint |
"Turning Point" |
Type POINT_VEC3.RoutePointAltType
| POINT_VEC3.RoutePointAltType.BARO |
"BARO" |
Type POINT_VEC3.RoutePointType
| POINT_VEC3.RoutePointType.TakeOffParking |
"TakeOffParking" |
| POINT_VEC3.RoutePointType.TurningPoint |
"Turning Point" |
Global(s)
- #COORDINATE COORDINATE
-
COORDINATE class, extends Base#BASE
COORDINATE defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.
COORDINATE constructor
A new COORDINATE object can be created with:
- COORDINATE.New(): a 3D point.
- COORDINATE.NewFromVec2(): a 2D point created from a DCSTypes#Vec2.
- COORDINATE.NewFromVec3(): a 3D point created from a DCSTypes#Vec3.
Create waypoints for routes
A COORDINATE can prepare waypoints for Ground and Air groups to be embedded into a Route.
- COORDINATE.WaypointAir(): Build an air route point.
- COORDINATE.WaypointGround(): Build a ground route point.
Route points can be used in the Route methods of the Group#GROUP class.
Smoke, flare, explode, illuminate
At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:
Smoke
- COORDINATE.Smoke(): To smoke the point in a certain color.
- COORDINATE.SmokeBlue(): To smoke the point in blue.
- COORDINATE.SmokeRed(): To smoke the point in red.
- COORDINATE.SmokeOrange(): To smoke the point in orange.
- COORDINATE.SmokeWhite(): To smoke the point in white.
- COORDINATE.SmokeGreen(): To smoke the point in green.
Flare
- COORDINATE.Flare(): To flare the point in a certain color.
- COORDINATE.FlareRed(): To flare the point in red.
- COORDINATE.FlareYellow(): To flare the point in yellow.
- COORDINATE.FlareWhite(): To flare the point in white.
- COORDINATE.FlareGreen(): To flare the point in green.
Explode
- COORDINATE.Explosion(): To explode the point with a certain intensity.
Illuminate
- COORDINATE.IlluminationBomb(): To illuminate the point.
Markings
Place markers (text boxes with clarifications for briefings, target locations or any other reference point) on the map for all players, coalitions or specific groups:
- COORDINATE.MarkToAll(): Place a mark to all players.
- COORDINATE.MarkToCoalition(): Place a mark to a coalition.
- COORDINATE.MarkToCoalitionRed(): Place a mark to the red coalition.
- COORDINATE.MarkToCoalitionBlue(): Place a mark to the blue coalition.
- COORDINATE.MarkToGroup(): Place a mark to a group (needs to have a client in it or a CA group (CA group is bugged)).
- COORDINATE.RemoveMark(): Removes a mark from the map.
3D calculation methods
Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:
Distance
- COORDINATE.Get3DDistance(): Obtain the distance from the current 3D point to the provided 3D point in 3D space.
- COORDINATE.Get2DDistance(): Obtain the distance from the current 3D point to the provided 3D point in 2D space.
Angle
- COORDINATE.GetAngleDegrees(): Obtain the angle in degrees from the current 3D point with the provided 3D direction vector.
- COORDINATE.GetAngleRadians(): Obtain the angle in radians from the current 3D point with the provided 3D direction vector.
- COORDINATE.GetDirectionVec3(): Obtain the 3D direction vector from the current 3D point to the provided 3D point.
Translation
- COORDINATE.Translate(): Translate the current 3D point towards an other 3D point using the given Distance and Angle.
Get the North correction of the current location
- COORDINATE.GetNorthCorrection(): Obtains the north correction at the current 3D point.
Point Randomization
Various methods exist to calculate random locations around a given 3D point.
- COORDINATE.GetRandomVec2InRadius(): Provides a random 2D vector around the current 3D point, in the given inner to outer band.
- COORDINATE.GetRandomVec3InRadius(): Provides a random 3D vector around the current 3D point, in the given inner to outer band.
Metric system
- COORDINATE.IsMetric(): Returns if the 3D point is Metric or Nautical Miles.
- COORDINATE.SetMetric(): Sets the 3D point to Metric or Nautical Miles.
Coorinate text generation
- COORDINATE.ToStringBR(): Generates a Bearing & Range text in the format of DDD for DI where DDD is degrees and DI is distance.
- COORDINATE.ToStringLL(): Generates a Latutude & Longutude text.
- #POINT_VEC2 POINT_VEC2
-
POINT_VEC2 class, extends Point#COORDINATE
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.
POINT_VEC2 constructor
A new POINT_VEC2 instance can be created with:
- Point#POINT_VEC2.New(): a 2D point, taking an additional height parameter.
- Point#POINT_VEC2.NewFromVec2(): a 2D point created from a DCSTypes#Vec2.
Manupulate the X, Altitude, Y coordinates of the 2D point
A POINT_VEC2 class works in 2D space, with an altitude setting. It contains internally an X, Altitude, Y coordinate. Methods exist to manupulate these coordinates.
The current X, Altitude, Y axis can be retrieved with the methods POINT_VEC2.GetX(), POINT_VEC2.GetAlt(), POINT_VEC2.GetY() respectively. The methods POINT_VEC2.SetX(), POINT_VEC2.SetAlt(), POINT_VEC2.SetY() change the respective axis with a new value. The current Lat(itude), Alt(itude), Lon(gitude) values can also be retrieved with the methods POINT_VEC2.GetLat(), POINT_VEC2.GetAlt(), POINT_VEC2.GetLon() respectively. The current axis values can be changed by using the methods POINT_VEC2.AddX(), POINT_VEC2.AddAlt(), POINT_VEC2.AddY() to add or substract a value from the current respective axis value. Note that the Set and Add methods return the current POINT_VEC2 object, so these manipulation methods can be chained... For example:
local Vec2 = PointVec2:AddX( 100 ):AddY( 2000 ):GetVec2()
- #POINT_VEC3 POINT_VEC3
-
POINT_VEC3 class, extends Point#COORDINATE
POINT_VEC3 defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.
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 formulas embedded in the MIST framework were created by Grimes or previous authors, who you can find on the Eagle Dynamics Forums.
POINT_VEC3 constructor
A new POINT_VEC3 object can be created with:
- POINT_VEC3.New(): a 3D point.
- POINT_VEC3.NewFromVec3(): a 3D point created from a DCSTypes#Vec3.
Manupulate the X, Y, Z coordinates of the POINT_VEC3
A POINT_VEC3 class works in 3D space. It contains internally an X, Y, Z coordinate. Methods exist to manupulate these coordinates.
The current X, Y, Z axis can be retrieved with the methods POINT_VEC3.GetX(), POINT_VEC3.GetY(), POINT_VEC3.GetZ() respectively. The methods POINT_VEC3.SetX(), POINT_VEC3.SetY(), POINT_VEC3.SetZ() change the respective axis with a new value. The current axis values can be changed by using the methods POINT_VEC3.AddX(), POINT_VEC3.AddY(), POINT_VEC3.AddZ() to add or substract a value from the current respective axis value. Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:
local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()3D calculation methods
Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:
Point Randomization
Various methods exist to calculate random locations around a given 3D point.
- POINT_VEC3.GetRandomPointVec3InRadius(): Provides a random 3D point around the current 3D point, in the given inner to outer band.
Type Point
Type COORDINATE
Field(s)
- COORDINATE:DistanceFromVec2(Vec2Reference)
-
TODO: check this to replace - Calculate the distance from a reference DCSTypes#Vec2. @param #COORDINATE self @param Dcs.DCSTypes#Vec2 Vec2Reference The reference DCSTypes#Vec2. @return Dcs.DCSTypes#Distance The distance from the reference DCSTypes#Vec2 in meters.
Parameter
-
Vec2Reference:
-
- COORDINATE:Explosion(ExplosionIntensity)
-
Creates an explosion at the point of a certain intensity.
Parameter
-
#number ExplosionIntensity:
-
- COORDINATE:Flare(FlareColor, (, Azimuth)
-
Flares the point in a color.
Parameters
-
Utilities.Utils#FLARECOLOR FlareColor: -
Dcs.DCSTypes#Azimuth (: ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0. -
Azimuth:
-
- COORDINATE:FlareGreen((, Azimuth)
-
Flare the COORDINATE Green.
Parameters
-
Dcs.DCSTypes#Azimuth (: ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0. -
Azimuth:
-
- COORDINATE:FlareRed(Azimuth)
-
Flare the COORDINATE Red.
Parameter
-
Azimuth:
-
- COORDINATE:FlareWhite((, Azimuth)
-
Flare the COORDINATE White.
Parameters
-
Dcs.DCSTypes#Azimuth (: ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0. -
Azimuth:
-
- COORDINATE:FlareYellow((, Azimuth)
-
Flare the COORDINATE Yellow.
Parameters
-
Dcs.DCSTypes#Azimuth (: ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0. -
Azimuth:
-
- COORDINATE:Get2DDistance(TargetCoordinate)
-
Return the 2D distance in meters between the target COORDINATE and the COORDINATE.
Parameter
-
#COORDINATE TargetCoordinate: The target COORDINATE.
Return value
Dcs.DCSTypes#Distance: Distance The distance in meters.
-
- COORDINATE:Get3DDistance(TargetCoordinate)
-
Return the 3D distance in meters between the target COORDINATE and the COORDINATE.
Parameter
-
#COORDINATE TargetCoordinate: The target COORDINATE.
Return value
Dcs.DCSTypes#Distance: Distance The distance in meters.
-
- COORDINATE:GetAltitudeText(Settings)
-
Return the altitude text of the COORDINATE.
Parameter
-
Settings:
Return value
#string: Altitude text.
-
- COORDINATE:GetAngleDegrees(DirectionVec3)
-
Return an angle in degrees from the COORDINATE using a direction vector in Vec3 format.
Parameter
-
Dcs.DCSTypes#Vec3 DirectionVec3: The direction vector in Vec3 format.
Return value
#number: DirectionRadians The angle in degrees.
-
- COORDINATE:GetAngleRadians(DirectionVec3)
-
Return an angle in radians from the COORDINATE using a direction vector in Vec3 format.
Parameter
-
Dcs.DCSTypes#Vec3 DirectionVec3: The direction vector in Vec3 format.
Return value
#number: DirectionRadians The angle in radians.
-
- COORDINATE:GetBRAText(AngleRadians, Distance, Settings)
-
Provides a Bearing / Range / Altitude string
Parameters
-
#number AngleRadians: The angle in randians -
#number Distance: The distance -
Core.Settings#SETTINGS Settings:
Return value
#string: The BRA Text
-
- COORDINATE:GetBRText(AngleRadians, Distance, Settings)
-
Provides a Bearing / Range string
Parameters
-
#number AngleRadians: The angle in randians -
#number Distance: The distance -
Core.Settings#SETTINGS Settings:
Return value
#string: The BR Text
-
- COORDINATE:GetBearingText(AngleRadians, Precision, Settings)
-
Provides a bearing text in degrees.
Parameters
-
#number AngleRadians: The angle in randians. -
#number Precision: The precision. -
Core.Settings#SETTINGS Settings:
Return value
#string: The bearing text in degrees.
-
- COORDINATE:GetDirectionVec3(TargetCoordinate)
-
Return a direction vector Vec3 from COORDINATE to the COORDINATE.
Parameter
-
#COORDINATE TargetCoordinate: The target COORDINATE.
Return value
Dcs.DCSTypes#Vec3: DirectionVec3 The direction vector in Vec3 format.
-
- COORDINATE:GetDistanceText(Distance, Settings)
-
Provides a distance text expressed in the units of measurement.
Parameters
-
#number Distance: The distance in meters. -
Core.Settings#SETTINGS Settings:
Return value
#string: The distance text expressed in the units of measurement.
-
- COORDINATE:GetHeading()
-
Get the heading of the coordinate, if applicable.
Return value
#number: or nil
- COORDINATE:GetHeadingText(Settings)
-
Return the heading text of the COORDINATE.
Parameter
-
Settings:
Return value
#string: Heading text.
-
- COORDINATE:GetLandHeight()
-
Return the height of the land at the coordinate.
Return value
#number:
- COORDINATE:GetMovingText(Settings)
-
Return velocity text of the COORDINATE.
Parameter
-
Settings:
Return value
#string:
-
- COORDINATE:GetNorthCorrectionRadians()
-
Get a correction in radians of the real magnetic north of the COORDINATE.
Return value
#number: CorrectionRadians The correction in radians.
- COORDINATE:GetRandomVec2InRadius(OuterRadius, InnerRadius)
-
Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.
Parameters
-
Dcs.DCSTypes#Distance OuterRadius: -
Dcs.DCSTypes#Distance InnerRadius:
Return value
Dcs.DCSTypes#Vec2: Vec2
-
- COORDINATE:GetRandomVec3InRadius(OuterRadius, InnerRadius)
-
Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.
Parameters
-
Dcs.DCSTypes#Distance OuterRadius: -
Dcs.DCSTypes#Distance InnerRadius:
Return value
Dcs.DCSTypes#Vec3: Vec3
-
- COORDINATE:GetVec2()
-
Return the coordinates of the COORDINATE in Vec2 format.
Return value
Dcs.DCSTypes#Vec2: The Vec2 format coordinate.
- COORDINATE:GetVec3()
-
Return the coordinates of the COORDINATE in Vec3 format.
Return value
Dcs.DCSTypes#Vec3: The Vec3 format coordinate.
- COORDINATE:GetVelocity()
-
Return the velocity of the COORDINATE.
Return value
#number: Velocity in meters per second.
- COORDINATE:GetVelocityText(Settings)
-
Return the velocity text of the COORDINATE.
Parameter
-
Settings:
Return value
#string: Velocity text.
-
- COORDINATE:IlluminationBomb()
-
Creates an illumination bomb at the point.
- COORDINATE:IsInRadius(ToCoordinate, Radius, Coordinate)
-
Returns if a Coordinate is in a certain Radius of this Coordinate in 2D plane using the X and Z axis.
Parameters
-
#COORDINATE ToCoordinate: The coordinate that will be tested if it is in the radius of this coordinate. -
#number Radius: The radius of the circle on the 2D plane around this coordinate. -
Coordinate:
Return value
#boolean: true if in the Radius.
-
- COORDINATE:IsInSphere(ToCoordinate, Radius, Coordinate)
-
Returns if a Coordinate is in a certain radius of this Coordinate in 3D space using the X, Y and Z axis.
So Radius defines the radius of the a Sphere in 3D space around this coordinate.
Parameters
-
#COORDINATE ToCoordinate: The coordinate that will be tested if it is in the radius of this coordinate. -
#number Radius: The radius of the sphere in the 3D space around this coordinate. -
Coordinate:
Return value
#boolean: true if in the Sphere.
-
- COORDINATE:IsLOS(ToCoordinate)
-
Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.
Parameter
-
#COORDINATE ToCoordinate:
Return value
#boolean: true If the ToCoordinate has LOS with the Coordinate, otherwise false.
-
- COORDINATE:MarkToAll(MarkText)
-
Mark to All
Parameter
-
#string MarkText: Free format text that shows the marking clarification.
Return value
#number: The resulting Mark ID which is a number.
Usage:
local TargetCoord = TargetGroup:GetCoordinate() local MarkID = TargetCoord:MarkToAll( "This is a target for all players" ) -
- COORDINATE:MarkToCoalition(MarkText, Coalition)
-
Mark to Coalition
Parameters
-
#string MarkText: Free format text that shows the marking clarification. -
Coalition:
Return value
#number: The resulting Mark ID which is a number.
Usage:
local TargetCoord = TargetGroup:GetCoordinate() local MarkID = TargetCoord:MarkToCoalition( "This is a target for the red coalition", coalition.side.RED ) -
- COORDINATE:MarkToCoalitionBlue(MarkText)
-
Mark to Blue Coalition
Parameter
-
#string MarkText: Free format text that shows the marking clarification.
Return value
#number: The resulting Mark ID which is a number.
Usage:
local TargetCoord = TargetGroup:GetCoordinate() local MarkID = TargetCoord:MarkToCoalitionBlue( "This is a target for the blue coalition" ) -
- COORDINATE:MarkToCoalitionRed(MarkText)
-
Mark to Red Coalition
Parameter
-
#string MarkText: Free format text that shows the marking clarification.
Return value
#number: The resulting Mark ID which is a number.
Usage:
local TargetCoord = TargetGroup:GetCoordinate() local MarkID = TargetCoord:MarkToCoalitionRed( "This is a target for the red coalition" ) -
- COORDINATE:MarkToGroup(MarkText, MarkGroup)
-
Mark to Group
Parameters
-
#string MarkText: Free format text that shows the marking clarification. -
Wrapper.Group#GROUP MarkGroup: The Group that receives the mark.
Return value
#number: The resulting Mark ID which is a number.
Usage:
local TargetCoord = TargetGroup:GetCoordinate() local MarkGroup = GROUP:FindByName( "AttackGroup" ) local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup ) -
- COORDINATE:New(x, y, z)
-
COORDINATE constructor.
Parameters
-
Dcs.DCSTypes#Distance x: The x coordinate of the Vec3 point, pointing to the North. -
Dcs.DCSTypes#Distance y: The y coordinate of the Vec3 point, pointing to the Right. -
Dcs.DCSTypes#Distance z: The z coordinate of the Vec3 point, pointing to the Right.
Return value
-
- COORDINATE:NewFromVec2(Vec2, LandHeightAdd)
-
Create a new COORDINATE object from Vec2 coordinates.
Parameters
-
Dcs.DCSTypes#Vec2 Vec2: The Vec2 point. -
Dcs.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
-
- COORDINATE:NewFromVec3(Vec3)
-
Create a new COORDINATE object from Vec3 coordinates.
Parameter
-
Dcs.DCSTypes#Vec3 Vec3: The Vec3 point.
Return value
-
- COORDINATE:RemoveMark(MarkID)
-
Remove a mark
Parameter
-
#number MarkID: The ID of the mark to be removed.
Usage:
local TargetCoord = TargetGroup:GetCoordinate() local MarkGroup = GROUP:FindByName( "AttackGroup" ) local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup ) <<< logic >>> RemoveMark( MarkID ) -- The mark is now removed -
- COORDINATE:SetHeading(Heading)
-
Set the heading of the coordinate, if applicable.
Parameter
-
Heading:
-
- COORDINATE:SetVelocity(Velocity)
-
Set the velocity of the COORDINATE.
Parameter
-
#string Velocity: Velocity in meters per second.
-
- COORDINATE:Smoke(SmokeColor)
-
Smokes the point in a color.
Parameter
-
Utilities.Utils#SMOKECOLOR SmokeColor:
-
- COORDINATE:SmokeBlue()
-
Smoke the COORDINATE Blue.
- COORDINATE:SmokeGreen()
-
Smoke the COORDINATE Green.
- COORDINATE:SmokeOrange()
-
Smoke the COORDINATE Orange.
- COORDINATE:SmokeRed()
-
Smoke the COORDINATE Red.
- COORDINATE:SmokeWhite()
-
Smoke the COORDINATE White.
- COORDINATE:ToString(Controllable, Settings, Task)
-
Provides a coordinate string of the point, based on a coordinate format system: * Uses default settings in COORDINATE.
- Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
Parameters
-
Wrapper.Controllable#CONTROLLABLE Controllable: -
Core.Settings#SETTINGS Settings: -
Tasking.Task#TASK Task: The task for which coordinates need to be calculated.
Return value
#string: The coordinate Text in the configured coordinate system.
- COORDINATE:ToStringA2A(Controllable, Settings)
-
Provides a coordinate string of the point, based on the A2A coordinate format system.
Parameters
-
Wrapper.Controllable#CONTROLLABLE Controllable: -
Core.Settings#SETTINGS Settings:
Return value
#string: The coordinate Text in the configured coordinate system.
-
- COORDINATE:ToStringA2G(Controllable, Settings)
-
Provides a coordinate string of the point, based on the A2G coordinate format system.
Parameters
-
Wrapper.Controllable#CONTROLLABLE Controllable: -
Core.Settings#SETTINGS Settings:
Return value
#string: The coordinate Text in the configured coordinate system.
-
- COORDINATE:ToStringAspect(TargetCoordinate)
-
Return an aspect string from a COORDINATE to the Angle of the object.
Parameter
-
#COORDINATE TargetCoordinate: The target COORDINATE.
Return value
#string: The Aspect string, which is Hot, Cold or Flanking.
-
- COORDINATE:ToStringBR(TargetCoordinate, FromCoordinate, Settings)
-
Return a BR string from a COORDINATE to the COORDINATE.
Parameters
-
#COORDINATE TargetCoordinate: The target COORDINATE. -
FromCoordinate: -
Settings:
Return value
#string: The BR text.
-
- COORDINATE:ToStringBRA(TargetCoordinate, FromCoordinate, Settings)
-
Return a BRAA string from a COORDINATE to the COORDINATE.
Parameters
-
#COORDINATE TargetCoordinate: The target COORDINATE. -
FromCoordinate: -
Settings:
Return value
#string: The BR text.
-
- COORDINATE:ToStringBULLS(Coalition, Settings)
-
Return a BULLS string from a COORDINATE to the BULLS of the coalition.
Parameters
-
Dcs.DCSCoalition#coalition.side Coalition: The coalition. -
Settings:
Return value
#string: The BR text.
-
- COORDINATE:ToStringFromRP(Controllable, Settings, ReferenceCoord, ReferenceName)
-
Provides a coordinate string of the point, based on a coordinate format system: * Uses default settings in COORDINATE.
- Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
Parameters
-
Wrapper.Controllable#CONTROLLABLE Controllable: -
Core.Settings#SETTINGS Settings: -
ReferenceCoord: -
ReferenceName:
Return value
#string: The coordinate Text in the configured coordinate system.
- COORDINATE:ToStringLLDDM(Settings)
-
Provides a Lat Lon string in Degree Decimal Minute format.
Parameter
-
Core.Settings#SETTINGS Settings: (optional) Settings
Return value
#string: The LL DDM Text
-
- COORDINATE:ToStringLLDMS(Settings)
-
Provides a Lat Lon string in Degree Minute Second format.
Parameter
-
Core.Settings#SETTINGS Settings: (optional) Settings
Return value
#string: The LL DMS Text
-
- COORDINATE:ToStringMGRS(Settings)
-
Provides a MGRS string
Parameter
-
Core.Settings#SETTINGS Settings: (optional) Settings
Return value
#string: The MGRS Text
-
- COORDINATE:Translate(Distance, Angle)
-
Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE.
Parameters
-
Dcs.DCSTypes#Distance Distance: The Distance to be added in meters. -
Dcs.DCSTypes#Angle Angle: The Angle in degrees.
Return value
#COORDINATE: The new calculated COORDINATE.
-
- COORDINATE:WaypointAir(AltType, Type, Action, Speed, SpeedLocked)
-
Build an air type route point.
Parameters
-
#COORDINATE.WaypointAltType AltType: The altitude type. -
#COORDINATE.WaypointType Type: The route point type. -
#COORDINATE.WaypointAction Action: The route point action. -
Dcs.DCSTypes#Speed Speed: Airspeed in km/h. -
#boolean SpeedLocked: true means the speed is locked.
Return value
#table: The route point.
-
- COORDINATE:WaypointAirFlyOverPoint(AltType, Speed)
-
Build a Waypoint Air "Fly Over Point".
Parameters
-
#COORDINATE.WaypointAltType AltType: The altitude type. -
Dcs.DCSTypes#Speed Speed: Airspeed in km/h.
Return value
#table: The route point.
-
- COORDINATE:WaypointAirLanding(Speed)
-
Build a Waypoint Air "Landing".
Parameter
-
Dcs.DCSTypes#Speed Speed: Airspeed in km/h.
Return value
#table: The route point.
Usage:
LandingZone = ZONE:New( "LandingZone" ) LandingCoord = LandingZone:GetCoordinate() LandingWaypoint = LandingCoord:WaypointAirLanding( 60 ) HeliGroup:Route( { LandWaypoint }, 1 ) -- Start landing the helicopter in one second. -
- COORDINATE:WaypointAirTakeOffParking(AltType, Speed)
-
Build a Waypoint Air "Take Off Parking".
Parameters
-
#COORDINATE.WaypointAltType AltType: The altitude type. -
Dcs.DCSTypes#Speed Speed: Airspeed in km/h.
Return value
#table: The route point.
-
- COORDINATE:WaypointAirTakeOffParkingHot(AltType, Speed)
-
Build a Waypoint Air "Take Off Parking Hot".
Parameters
-
#COORDINATE.WaypointAltType AltType: The altitude type. -
Dcs.DCSTypes#Speed Speed: Airspeed in km/h.
Return value
#table: The route point.
-
- COORDINATE:WaypointAirTakeOffRunway(AltType, Speed)
-
Build a Waypoint Air "Take Off Runway".
Parameters
-
#COORDINATE.WaypointAltType AltType: The altitude type. -
Dcs.DCSTypes#Speed Speed: Airspeed in km/h.
Return value
#table: The route point.
-
- COORDINATE:WaypointAirTurningPoint(AltType, Speed)
-
Build a Waypoint Air "Turning Point".
Parameters
-
#COORDINATE.WaypointAltType AltType: The altitude type. -
Dcs.DCSTypes#Speed Speed: Airspeed in km/h.
Return value
#table: The route point.
-
- COORDINATE:WaypointGround(Speed, Formation)
-
Build an ground type route point.
Parameters
-
#number Speed: (optional) Speed in km/h. The default speed is 999 km/h. -
#string Formation: (optional) The route point Formation, which is a text string that specifies exactly the Text in the Type of the route point, like "Vee", "Echelon Right".
Return value
#table: The route point.
-
Type COORDINATE.WaypointAction
Type COORDINATE.WaypointAltType
Type COORDINATE.WaypointType
Type POINT_VEC2
Field(s)
- POINT_VEC2:AddAlt(Altitude)
-
Add to the current land height an altitude.
Parameter
-
#number Altitude: The Altitude to add. If nothing (nil) is given, then the current land altitude is set.
Return value
-
- POINT_VEC2:AddX(x)
-
Add to the x coordinate of the POINT_VEC2.
Parameter
-
#number x: The x coordinate.
Return value
-
- POINT_VEC2:AddY(y)
-
Add to the y coordinate of the POINT_VEC2.
Parameter
-
#number y: The y coordinate.
Return value
-
- POINT_VEC2:DistanceFromPointVec2(PointVec2Reference)
-
TODO: Check this to replace - Calculate the distance from a reference #POINT_VEC2. @param #POINTVEC2 self @param #POINTVEC2 PointVec2Reference The reference #POINT_VEC2. @return Dcs.DCSTypes#Distance The distance from the reference #POINT_VEC2 in meters.
Parameter
-
PointVec2Reference:
-
- POINT_VEC2:GetAlt()
-
Return the altitude (height) of the land at the POINT_VEC2.
Return value
#number: The land altitude.
- POINT_VEC2:GetLat()
-
Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x).
Return value
#number: The x coodinate.
- POINT_VEC2:GetLon()
-
Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z).
Return value
#number: The y coodinate.
- POINT_VEC2:GetRandomPointVec2InRadius(OuterRadius, InnerRadius)
-
Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC2.
Parameters
-
Dcs.DCSTypes#Distance OuterRadius: -
Dcs.DCSTypes#Distance InnerRadius:
Return value
-
- POINT_VEC2:GetX()
-
Return the x coordinate of the POINT_VEC2.
Return value
#number: The x coodinate.
- POINT_VEC2:GetY()
-
Return the y coordinate of the POINT_VEC2.
Return value
#number: The y coodinate.
- POINT_VEC2:New(x, y, LandHeightAdd)
-
POINT_VEC2 constructor.
Parameters
-
Dcs.DCSTypes#Distance x: The x coordinate of the Vec3 point, pointing to the North. -
Dcs.DCSTypes#Distance y: The y coordinate of the Vec3 point, pointing to the Right. -
Dcs.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_VEC2:NewFromVec2(Vec2, LandHeightAdd)
-
Create a new POINT_VEC2 object from Vec2 coordinates.
Parameters
-
Dcs.DCSTypes#Vec2 Vec2: The Vec2 point. -
LandHeightAdd:
Return value
Core.Point#POINT_VEC2: self
-
- POINT_VEC2:NewFromVec3(Vec3)
-
Create a new POINT_VEC2 object from Vec3 coordinates.
Parameter
-
Dcs.DCSTypes#Vec3 Vec3: The Vec3 point.
Return value
Core.Point#POINT_VEC2: self
-
- POINT_VEC2:SetAlt(Altitude)
-
Set the altitude of the POINT_VEC2.
Parameter
-
#number Altitude: The land altitude. If nothing (nil) is given, then the current land altitude is set.
Return value
-
- POINT_VEC2:SetLat(x)
-
Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x).
Parameter
-
#number x: The x coordinate.
Return value
-
- POINT_VEC2:SetLon(y, z)
-
Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z).
Parameters
-
#number y: The y coordinate. -
z:
Return value
-
- POINT_VEC2:SetX(x)
-
Set the x coordinate of the POINT_VEC2.
Parameter
-
#number x: The x coordinate.
Return value
-
- POINT_VEC2:SetY(y)
-
Set the y coordinate of the POINT_VEC2.
Parameter
-
#number y: The y coordinate.
Return value
-
- Dcs.DCSTypes#Distance POINT_VEC2.x
-
The x coordinate in meters.
- Dcs.DCSTypes#Distance POINT_VEC2.y
-
the y coordinate in meters.
Type POINT_VEC3
The POINT_VEC3 class
Field(s)
- POINT_VEC3:AddX(x)
-
Add to the x coordinate of the POINT_VEC3.
Parameter
-
#number x: The x coordinate value to add to the current x coodinate.
Return value
-
- POINT_VEC3:AddY(y)
-
Add to the y coordinate of the POINT_VEC3.
Parameter
-
#number y: The y coordinate value to add to the current y coodinate.
Return value
-
- POINT_VEC3:AddZ(z)
-
Add to the z coordinate of the POINT_VEC3.
Parameter
-
#number z: The z coordinate value to add to the current z coodinate.
Return value
-
- POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius)
-
Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.
Parameters
-
Dcs.DCSTypes#Distance OuterRadius: -
Dcs.DCSTypes#Distance InnerRadius:
Return value
-
- 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:New(x, y, z)
-
Create a new POINT_VEC3 object.
Parameters
-
Dcs.DCSTypes#Distance x: The x coordinate of the Vec3 point, pointing to the North. -
Dcs.DCSTypes#Distance y: The y coordinate of the Vec3 point, pointing Upwards. -
Dcs.DCSTypes#Distance z: The z coordinate of the Vec3 point, pointing to the Right.
Return value
-
- POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd)
-
Create a new POINT_VEC3 object from Vec2 coordinates.
Parameters
-
Dcs.DCSTypes#Vec2 Vec2: The Vec2 point. -
Dcs.DCSTypes#Distance LandHeightAdd: (optional) Add a landheight.
Return value
Core.Point#POINT_VEC3: self
-
- POINT_VEC3:NewFromVec3(Vec3)
-
Create a new POINT_VEC3 object from Vec3 coordinates.
Parameter
-
Dcs.DCSTypes#Vec3 Vec3: The Vec3 point.
Return value
Core.Point#POINT_VEC3: self
-
- POINT_VEC3:SetX(x)
-
Set the x coordinate of the POINT_VEC3.
Parameter
-
#number x: The x coordinate.
Return value
-
- POINT_VEC3:SetY(y)
-
Set the y coordinate of the POINT_VEC3.
Parameter
-
#number y: The y coordinate.
Return value
-
- POINT_VEC3:SetZ(z)
-
Set the z coordinate of the POINT_VEC3.
Parameter
-
#number z: The z coordinate.
Return value
-
- #number POINT_VEC3.x
-
The x coordinate in 3D space.
- #number POINT_VEC3.y
-
The y coordinate in 3D space.
- #number POINT_VEC3.z
-
The z coordiante in 3D space.
Type POINT_VEC3.RoutePointAction
RoutePoint Actions
Field(s)
- POINT_VEC3.RoutePointAction.FromParkingArea
-
"From Parking Area"
- POINT_VEC3.RoutePointAction.TurningPoint
-
"Turning Point"
Type POINT_VEC3.RoutePointAltType
RoutePoint AltTypes
Field(s)
Type POINT_VEC3.RoutePointType
RoutePoint Types
Field(s)
- POINT_VEC3.RoutePointType.TakeOffParking
-
"TakeOffParking"
- POINT_VEC3.RoutePointType.TurningPoint
-
"Turning Point"