mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #547 from FlightControl-Master/546-Fix-Coordinates
Fixed error as reported in #546
This commit is contained in:
commit
10b49b4a15
@ -54,227 +54,114 @@
|
||||
-- @module Point
|
||||
|
||||
|
||||
--- @type COORDINATE
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
--- # COORDINATE class, extends @{Base#BASE}
|
||||
--
|
||||
-- The COORDINATE class defines a 2D coordinate in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.
|
||||
-- A COORDINATE can be expressed in LL or in MGRS.
|
||||
--
|
||||
-- ## COORDINATE constructor
|
||||
--
|
||||
-- A new COORDINATE instance can be created with:
|
||||
--
|
||||
-- * @{Point#COORDINATE.New}(): a 2D point, taking an additional height parameter.
|
||||
-- * @{Point#COORDINATE.NewFromVec2}(): a 2D point created from a @{DCSTypes#Vec2}.
|
||||
--
|
||||
-- ## Manupulate the X, Altitude, Y coordinates of the 2D point
|
||||
--
|
||||
-- A COORDINATE 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 @{#COORDINATE.GetX}(), @{#COORDINATE.GetAlt}(), @{#COORDINATE.GetY}() respectively.
|
||||
-- The methods @{#COORDINATE.SetX}(), @{#COORDINATE.SetAlt}(), @{#COORDINATE.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 @{#COORDINATE.GetLat}(), @{#COORDINATE.GetAlt}(), @{#COORDINATE.GetLon}() respectively.
|
||||
-- The current axis values can be changed by using the methods @{#COORDINATE.AddX}(), @{#COORDINATE.AddAlt}(), @{#COORDINATE.AddY}()
|
||||
-- to add or substract a value from the current respective axis value.
|
||||
-- Note that the Set and Add methods return the current COORDINATE object, so these manipulation methods can be chained... For example:
|
||||
--
|
||||
-- local Vec2 = PointVec2:AddX( 100 ):AddY( 2000 ):GetVec2()
|
||||
--
|
||||
-- @field #COORDINATE
|
||||
COORDINATE = {
|
||||
ClassName = "COORDINATE",
|
||||
}
|
||||
|
||||
--- The POINT_VEC3 class
|
||||
-- @type POINT_VEC3
|
||||
-- @field #number x The x coordinate in 3D space.
|
||||
-- @field #number y The y coordinate in 3D space.
|
||||
-- @field #number z The z coordiante in 3D space.
|
||||
-- @field Utilities.Utils#SMOKECOLOR SmokeColor
|
||||
-- @field Utilities.Utils#FLARECOLOR FlareColor
|
||||
-- @field #POINT_VEC3.RoutePointAltType RoutePointAltType
|
||||
-- @field #POINT_VEC3.RoutePointType RoutePointType
|
||||
-- @field #POINT_VEC3.RoutePointAction RoutePointAction
|
||||
-- @extends Core.Point#COORDINATE
|
||||
|
||||
|
||||
--- # 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()
|
||||
--
|
||||
--
|
||||
-- ## Create waypoints for routes
|
||||
--
|
||||
-- A POINT_VEC3 can prepare waypoints for Ground and Air groups to be embedded into a Route.
|
||||
--
|
||||
-- * @{#POINT_VEC3.RoutePointAir}(): Build an air route point.
|
||||
-- * @{#POINT_VEC3.RoutePointGround}(): 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
|
||||
--
|
||||
-- * @{#POINT_VEC3.Smoke}(): To smoke the point in a certain color.
|
||||
-- * @{#POINT_VEC3.SmokeBlue}(): To smoke the point in blue.
|
||||
-- * @{#POINT_VEC3.SmokeRed}(): To smoke the point in red.
|
||||
-- * @{#POINT_VEC3.SmokeOrange}(): To smoke the point in orange.
|
||||
-- * @{#POINT_VEC3.SmokeWhite}(): To smoke the point in white.
|
||||
-- * @{#POINT_VEC3.SmokeGreen}(): To smoke the point in green.
|
||||
--
|
||||
-- ### Flare
|
||||
--
|
||||
-- * @{#POINT_VEC3.Flare}(): To flare the point in a certain color.
|
||||
-- * @{#POINT_VEC3.FlareRed}(): To flare the point in red.
|
||||
-- * @{#POINT_VEC3.FlareYellow}(): To flare the point in yellow.
|
||||
-- * @{#POINT_VEC3.FlareWhite}(): To flare the point in white.
|
||||
-- * @{#POINT_VEC3.FlareGreen}(): To flare the point in green.
|
||||
--
|
||||
-- ### Explode
|
||||
--
|
||||
-- * @{#POINT_VEC3.Explosion}(): To explode the point with a certain intensity.
|
||||
--
|
||||
-- ### Illuminate
|
||||
--
|
||||
-- * @{#POINT_VEC3.IlluminationBomb}(): To illuminate the point.
|
||||
--
|
||||
--
|
||||
-- ## 3D calculation methods
|
||||
--
|
||||
-- Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:
|
||||
--
|
||||
-- ### Distance
|
||||
--
|
||||
-- * @{#POINT_VEC3.Get3DDistance}(): Obtain the distance from the current 3D point to the provided 3D point in 3D space.
|
||||
-- * @{#POINT_VEC3.Get2DDistance}(): Obtain the distance from the current 3D point to the provided 3D point in 2D space.
|
||||
--
|
||||
-- ### Angle
|
||||
--
|
||||
-- * @{#POINT_VEC3.GetAngleDegrees}(): Obtain the angle in degrees from the current 3D point with the provided 3D direction vector.
|
||||
-- * @{#POINT_VEC3.GetAngleRadians}(): Obtain the angle in radians from the current 3D point with the provided 3D direction vector.
|
||||
-- * @{#POINT_VEC3.GetDirectionVec3}(): Obtain the 3D direction vector from the current 3D point to the provided 3D point.
|
||||
--
|
||||
-- ### Translation
|
||||
--
|
||||
-- * @{#POINT_VEC3.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
|
||||
--
|
||||
-- * @{#POINT_VEC3.GetNorthCorrection}(): Obtains the north correction at the current 3D point.
|
||||
--
|
||||
--
|
||||
-- ## Point Randomization
|
||||
--
|
||||
-- Various methods exist to calculate random locations around a given 3D point.
|
||||
--
|
||||
-- * @{#POINT_VEC3.GetRandomPointVec2InRadius}(): Provides a random 2D point around the current 3D point, in the given inner to outer band.
|
||||
-- * @{#POINT_VEC3.GetRandomPointVec3InRadius}(): Provides a random 3D point around the current 3D point, in the given inner to outer band.
|
||||
-- * @{#POINT_VEC3.GetRandomVec2InRadius}(): Provides a random 2D vector around the current 3D point, in the given inner to outer band.
|
||||
-- * @{#POINT_VEC3.GetRandomVec3InRadius}(): Provides a random 3D vector around the current 3D point, in the given inner to outer band.
|
||||
--
|
||||
--
|
||||
-- ## Metric system
|
||||
--
|
||||
-- * @{#POINT_VEC3.IsMetric}(): Returns if the 3D point is Metric or Nautical Miles.
|
||||
-- * @{#POINT_VEC3.SetMetric}(): Sets the 3D point to Metric or Nautical Miles.
|
||||
--
|
||||
--
|
||||
-- ## Coorinate text generation
|
||||
--
|
||||
-- * @{#POINT_VEC3.ToStringBR}(): Generates a Bearing & Range text in the format of DDD for DI where DDD is degrees and DI is distance.
|
||||
-- * @{#POINT_VEC3.ToStringLL}(): Generates a Latutude & Longutude text.
|
||||
--
|
||||
-- @field #POINT_VEC3
|
||||
POINT_VEC3 = {
|
||||
ClassName = "POINT_VEC3",
|
||||
Metric = true,
|
||||
RoutePointAltType = {
|
||||
BARO = "BARO",
|
||||
},
|
||||
RoutePointType = {
|
||||
TakeOffParking = "TakeOffParking",
|
||||
TurningPoint = "Turning Point",
|
||||
},
|
||||
RoutePointAction = {
|
||||
FromParkingArea = "From Parking Area",
|
||||
TurningPoint = "Turning Point",
|
||||
},
|
||||
}
|
||||
|
||||
--- @type POINT_VEC2
|
||||
-- @field Dcs.DCSTypes#Distance x The x coordinate in meters.
|
||||
-- @field Dcs.DCSTypes#Distance y the y coordinate in meters.
|
||||
-- @extends Core.Point#COORDINATE
|
||||
|
||||
|
||||
|
||||
--- # 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()
|
||||
--
|
||||
-- @field #POINT_VEC2
|
||||
POINT_VEC2 = {
|
||||
ClassName = "POINT_VEC2",
|
||||
}
|
||||
|
||||
|
||||
do -- COORDINATE
|
||||
|
||||
--- @type COORDINATE
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
--- # 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.RoutePointAir}(): Build an air route point.
|
||||
-- * @{#COORDINATE.RoutePointGround}(): 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.
|
||||
--
|
||||
--
|
||||
-- ## 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.
|
||||
--
|
||||
-- @field #COORDINATE
|
||||
COORDINATE = {
|
||||
ClassName = "COORDINATE",
|
||||
}
|
||||
|
||||
--- COORDINATE constructor.
|
||||
-- @param #COORDINATE self
|
||||
-- @param Dcs.DCSTypes#Distance x The x coordinate of the Vec3 point, pointing to the North.
|
||||
@ -342,7 +229,83 @@ do -- COORDINATE
|
||||
function COORDINATE:GetVec2()
|
||||
return { x = self.x, y = self.z }
|
||||
end
|
||||
|
||||
|
||||
--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.
|
||||
function COORDINATE:DistanceFromVec2( Vec2Reference )
|
||||
self:F2( Vec2Reference )
|
||||
|
||||
local Distance = ( ( Vec2Reference.x - self.x ) ^ 2 + ( Vec2Reference.y - self.z ) ^2 ) ^0.5
|
||||
|
||||
self:T2( Distance )
|
||||
return Distance
|
||||
end
|
||||
|
||||
|
||||
--- Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE.
|
||||
-- @param #COORDINATE self
|
||||
-- @param Dcs.DCSTypes#Distance Distance The Distance to be added in meters.
|
||||
-- @param Dcs.DCSTypes#Angle Angle The Angle in degrees.
|
||||
-- @return #COORDINATE The new calculated COORDINATE.
|
||||
function COORDINATE:Translate( Distance, Angle )
|
||||
local SX = self.x
|
||||
local SY = self.z
|
||||
local Radians = Angle / 180 * math.pi
|
||||
local TX = Distance * math.cos( Radians ) + SX
|
||||
local TY = Distance * math.sin( Radians ) + SY
|
||||
|
||||
return COORDINATE:NewFromVec2( { x = TX, y = TY } )
|
||||
end
|
||||
|
||||
--- Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.
|
||||
-- @param #COORDINATE self
|
||||
-- @param Dcs.DCSTypes#Distance OuterRadius
|
||||
-- @param Dcs.DCSTypes#Distance InnerRadius
|
||||
-- @return Dcs.DCSTypes#Vec2 Vec2
|
||||
function COORDINATE:GetRandomVec2InRadius( OuterRadius, InnerRadius )
|
||||
self:F2( { OuterRadius, InnerRadius } )
|
||||
|
||||
local Theta = 2 * math.pi * math.random()
|
||||
local Radials = math.random() + math.random()
|
||||
if Radials > 1 then
|
||||
Radials = 2 - Radials
|
||||
end
|
||||
|
||||
local RadialMultiplier
|
||||
if InnerRadius and InnerRadius <= OuterRadius then
|
||||
RadialMultiplier = ( OuterRadius - InnerRadius ) * Radials + InnerRadius
|
||||
else
|
||||
RadialMultiplier = OuterRadius * Radials
|
||||
end
|
||||
|
||||
local RandomVec2
|
||||
if OuterRadius > 0 then
|
||||
RandomVec2 = { x = math.cos( Theta ) * RadialMultiplier + self.x, y = math.sin( Theta ) * RadialMultiplier + self.z }
|
||||
else
|
||||
RandomVec2 = { x = self.x, y = self.z }
|
||||
end
|
||||
|
||||
return RandomVec2
|
||||
end
|
||||
|
||||
|
||||
--- Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.
|
||||
-- @param #COORDINATE self
|
||||
-- @param Dcs.DCSTypes#Distance OuterRadius
|
||||
-- @param Dcs.DCSTypes#Distance InnerRadius
|
||||
-- @return Dcs.DCSTypes#Vec3 Vec3
|
||||
function COORDINATE:GetRandomVec3InRadius( OuterRadius, InnerRadius )
|
||||
|
||||
local RandomVec2 = self:GetRandomVec2InRadius( OuterRadius, InnerRadius )
|
||||
local y = self.y + math.random( InnerRadius, OuterRadius )
|
||||
local RandomVec3 = { x = RandomVec2.x, y = y, z = RandomVec2.y }
|
||||
|
||||
return RandomVec3
|
||||
end
|
||||
|
||||
|
||||
function COORDINATE:SetHeading( Heading )
|
||||
self.Heading = Heading
|
||||
@ -706,7 +669,7 @@ do -- COORDINATE
|
||||
self:Flare( FLARECOLOR.Red, Azimuth )
|
||||
end
|
||||
|
||||
--- Returns if a Coordinate has Line of Sight (LOS) with the ToPointVec3.
|
||||
--- Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.
|
||||
-- @param #COORDINATE self
|
||||
-- @param #COORDINATE ToCoordinate
|
||||
-- @return #boolean true If the ToCoordinate has LOS with the Coordinate, otherwise false.
|
||||
@ -890,6 +853,80 @@ end
|
||||
|
||||
do -- POINT_VEC3
|
||||
|
||||
--- The POINT_VEC3 class
|
||||
-- @type POINT_VEC3
|
||||
-- @field #number x The x coordinate in 3D space.
|
||||
-- @field #number y The y coordinate in 3D space.
|
||||
-- @field #number z The z coordiante in 3D space.
|
||||
-- @field Utilities.Utils#SMOKECOLOR SmokeColor
|
||||
-- @field Utilities.Utils#FLARECOLOR FlareColor
|
||||
-- @field #POINT_VEC3.RoutePointAltType RoutePointAltType
|
||||
-- @field #POINT_VEC3.RoutePointType RoutePointType
|
||||
-- @field #POINT_VEC3.RoutePointAction RoutePointAction
|
||||
-- @extends Core.Point#COORDINATE
|
||||
|
||||
|
||||
--- # 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.
|
||||
--
|
||||
--
|
||||
-- @field #POINT_VEC3
|
||||
POINT_VEC3 = {
|
||||
ClassName = "POINT_VEC3",
|
||||
Metric = true,
|
||||
RoutePointAltType = {
|
||||
BARO = "BARO",
|
||||
},
|
||||
RoutePointType = {
|
||||
TakeOffParking = "TakeOffParking",
|
||||
TurningPoint = "Turning Point",
|
||||
},
|
||||
RoutePointAction = {
|
||||
FromParkingArea = "From Parking Area",
|
||||
TurningPoint = "Turning Point",
|
||||
},
|
||||
}
|
||||
|
||||
--- RoutePoint AltTypes
|
||||
-- @type POINT_VEC3.RoutePointAltType
|
||||
-- @field BARO "BARO"
|
||||
@ -916,7 +953,7 @@ do -- POINT_VEC3
|
||||
|
||||
local self = BASE:Inherit( self, COORDINATE:New( x, y, z ) ) -- Core.Point#POINT_VEC3
|
||||
self:F2( self )
|
||||
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@ -1023,20 +1060,6 @@ do -- POINT_VEC3
|
||||
return self
|
||||
end
|
||||
|
||||
--- Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.
|
||||
-- @param #POINT_VEC3 self
|
||||
-- @param Dcs.DCSTypes#Distance OuterRadius
|
||||
-- @param Dcs.DCSTypes#Distance InnerRadius
|
||||
-- @return Dcs.DCSTypes#Vec3 Vec3
|
||||
function POINT_VEC3:GetRandomVec3InRadius( OuterRadius, InnerRadius )
|
||||
|
||||
local RandomVec2 = self:GetRandomVec2InRadius( OuterRadius, InnerRadius )
|
||||
local y = self:GetY() + math.random( InnerRadius, OuterRadius )
|
||||
local RandomVec3 = { x = RandomVec2.x, y = y, z = RandomVec2.y }
|
||||
|
||||
return RandomVec3
|
||||
end
|
||||
|
||||
--- Return a random POINT_VEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.
|
||||
-- @param #POINT_VEC3 self
|
||||
-- @param Dcs.DCSTypes#Distance OuterRadius
|
||||
@ -1051,6 +1074,41 @@ end
|
||||
|
||||
do -- POINT_VEC2
|
||||
|
||||
--- @type POINT_VEC2
|
||||
-- @field Dcs.DCSTypes#Distance x The x coordinate in meters.
|
||||
-- @field Dcs.DCSTypes#Distance y the y coordinate in meters.
|
||||
-- @extends Core.Point#COORDINATE
|
||||
|
||||
--- # 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()
|
||||
--
|
||||
-- @field #POINT_VEC2
|
||||
POINT_VEC2 = {
|
||||
ClassName = "POINT_VEC2",
|
||||
}
|
||||
|
||||
|
||||
|
||||
--- POINT_VEC2 constructor.
|
||||
@ -1210,36 +1268,6 @@ do -- POINT_VEC2
|
||||
return self
|
||||
end
|
||||
|
||||
--- Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC2.
|
||||
-- @param #POINT_VEC2 self
|
||||
-- @param Dcs.DCSTypes#Distance OuterRadius
|
||||
-- @param Dcs.DCSTypes#Distance InnerRadius
|
||||
-- @return Dcs.DCSTypes#Vec2 Vec2
|
||||
function POINT_VEC2:GetRandomVec2InRadius( OuterRadius, InnerRadius )
|
||||
self:F2( { OuterRadius, InnerRadius } )
|
||||
|
||||
local Theta = 2 * math.pi * math.random()
|
||||
local Radials = math.random() + math.random()
|
||||
if Radials > 1 then
|
||||
Radials = 2 - Radials
|
||||
end
|
||||
|
||||
local RadialMultiplier
|
||||
if InnerRadius and InnerRadius <= OuterRadius then
|
||||
RadialMultiplier = ( OuterRadius - InnerRadius ) * Radials + InnerRadius
|
||||
else
|
||||
RadialMultiplier = OuterRadius * Radials
|
||||
end
|
||||
|
||||
local RandomVec2
|
||||
if OuterRadius > 0 then
|
||||
RandomVec2 = { x = math.cos( Theta ) * RadialMultiplier + self:GetX(), y = math.sin( Theta ) * RadialMultiplier + self:GetZ() }
|
||||
else
|
||||
RandomVec2 = { x = self:GetX(), y = self:GetZ() }
|
||||
end
|
||||
|
||||
return RandomVec2
|
||||
end
|
||||
|
||||
--- Return a random POINT_VEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC2.
|
||||
-- @param #POINT_VEC2 self
|
||||
@ -1252,8 +1280,7 @@ do -- POINT_VEC2
|
||||
return POINT_VEC2:NewFromVec2( self:GetRandomVec2InRadius( OuterRadius, InnerRadius ) )
|
||||
end
|
||||
|
||||
|
||||
-- TODO: Check this to replace
|
||||
-- TODO: Check this to replace
|
||||
--- Calculate the distance from a reference @{#POINT_VEC2}.
|
||||
-- @param #POINT_VEC2 self
|
||||
-- @param #POINT_VEC2 PointVec2Reference The reference @{#POINT_VEC2}.
|
||||
@ -1261,43 +1288,12 @@ do -- POINT_VEC2
|
||||
function POINT_VEC2:DistanceFromPointVec2( PointVec2Reference )
|
||||
self:F2( PointVec2Reference )
|
||||
|
||||
local Distance = ( ( PointVec2Reference:GetX() - self:GetX() ) ^ 2 + ( PointVec2Reference:GetY() - self:GetY() ) ^2 ) ^0.5
|
||||
local Distance = ( ( PointVec2Reference.x - self.x ) ^ 2 + ( PointVec2Reference.z - self.z ) ^2 ) ^ 0.5
|
||||
|
||||
self:T2( Distance )
|
||||
return Distance
|
||||
end
|
||||
|
||||
--TODO: check this to replace
|
||||
|
||||
--- Calculate the distance from a reference @{DCSTypes#Vec2}.
|
||||
-- @param #POINT_VEC2 self
|
||||
-- @param Dcs.DCSTypes#Vec2 Vec2Reference The reference @{DCSTypes#Vec2}.
|
||||
-- @return Dcs.DCSTypes#Distance The distance from the reference @{DCSTypes#Vec2} in meters.
|
||||
function POINT_VEC2:DistanceFromVec2( Vec2Reference )
|
||||
self:F2( Vec2Reference )
|
||||
|
||||
local Distance = ( ( Vec2Reference.x - self:GetX() ) ^ 2 + ( Vec2Reference.y - self:GetY() ) ^2 ) ^0.5
|
||||
|
||||
self:T2( Distance )
|
||||
return Distance
|
||||
end
|
||||
|
||||
|
||||
--- Add a Distance in meters from the POINT_VEC2 orthonormal plane, with the given angle, and calculate the new POINT_VEC2.
|
||||
-- @param #POINT_VEC2 self
|
||||
-- @param Dcs.DCSTypes#Distance Distance The Distance to be added in meters.
|
||||
-- @param Dcs.DCSTypes#Angle Angle The Angle in degrees.
|
||||
-- @return #POINT_VEC2 The new calculated POINT_VEC2.
|
||||
function POINT_VEC2:Translate( Distance, Angle )
|
||||
local SX = self:GetX()
|
||||
local SY = self:GetY()
|
||||
local Radians = Angle / 180 * math.pi
|
||||
local TX = Distance * math.cos( Radians ) + SX
|
||||
local TY = Distance * math.sin( Radians ) + SY
|
||||
|
||||
return POINT_VEC2:New( TX, TY )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -2526,7 +2526,7 @@ The index of the DetectedItem.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectionInterval" >
|
||||
<strong>DETECTION_BASE.DetectionInterval</strong>
|
||||
</a>
|
||||
|
||||
@ -1627,7 +1627,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#string</em>
|
||||
<a id="#(FSM)._StartState" >
|
||||
<strong>FSM._StartState</strong>
|
||||
</a>
|
||||
@ -1926,7 +1926,6 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM).current" >
|
||||
<strong>FSM.current</strong>
|
||||
</a>
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
<td class="summary">
|
||||
<h1>COORDINATE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>The COORDINATE class defines a 2D coordinate in the simulator.</p>
|
||||
<p>COORDINATE defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -190,6 +190,12 @@
|
||||
<h2><a id="#(COORDINATE)">Type <code>COORDINATE</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).DistanceFromVec2">COORDINATE:DistanceFromVec2(Vec2Reference)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).Explosion">COORDINATE:Explosion(ExplosionIntensity)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates an explosion at the point of a certain intensity.</p>
|
||||
@ -289,6 +295,18 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).GetNorthCorrectionRadians">COORDINATE:GetNorthCorrectionRadians()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get a correction in radians of the real magnetic north of the COORDINATE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).GetRandomVec2InRadius">COORDINATE:GetRandomVec2InRadius(OuterRadius, InnerRadius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).GetRandomVec3InRadius">COORDINATE:GetRandomVec3InRadius(OuterRadius, InnerRadius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -312,7 +330,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).IsLOS">COORDINATE:IsLOS(ToCoordinate)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a Coordinate has Line of Sight (LOS) with the ToPointVec3.</p>
|
||||
<p>Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -463,7 +481,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).Translate">COORDINATE:Translate(Distance, Angle)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add a Distance in meters from the COORDINATE horizontal plane, with the given angle, and calculate the new COORDINATE.</p>
|
||||
<p>Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -510,12 +528,6 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC2).DistanceFromPointVec2">POINT_VEC2:DistanceFromPointVec2(PointVec2Reference)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC2).DistanceFromVec2">POINT_VEC2:DistanceFromVec2(Vec2Reference)</a></td>
|
||||
<td class="summary">
|
||||
<p>Calculate the distance from a reference <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -540,12 +552,6 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC2).GetRandomPointVec2InRadius">POINT_VEC2:GetRandomPointVec2InRadius(OuterRadius, InnerRadius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Return a random POINT<em>VEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT</em>VEC2.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC2).GetRandomVec2InRadius">POINT_VEC2:GetRandomVec2InRadius(OuterRadius, InnerRadius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC2.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -606,12 +612,6 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC2).SetY">POINT_VEC2:SetY(y)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set the y coordinate of the POINT_VEC2.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC2).Translate">POINT_VEC2:Translate(Distance, Angle)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add a Distance in meters from the POINT<em>VEC2 orthonormal plane, with the given angle, and calculate the new POINT</em>VEC2.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -664,12 +664,6 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).GetRandomPointVec3InRadius">POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Return a random POINT<em>VEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT</em>VEC3.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).GetRandomVec3InRadius">POINT_VEC3:GetRandomVec3InRadius(OuterRadius, InnerRadius)</a></td>
|
||||
<td class="summary">
|
||||
<p>Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -825,35 +819,126 @@
|
||||
|
||||
<h1>COORDINATE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>The COORDINATE class defines a 2D coordinate in the simulator.</p>
|
||||
<p>COORDINATE defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.</p>
|
||||
|
||||
|
||||
<p>The height coordinate (if needed) will be the land height + an optional added height specified.
|
||||
A COORDINATE can be expressed in LL or in MGRS.</p>
|
||||
|
||||
<h2>COORDINATE constructor</h2>
|
||||
|
||||
<p>A new COORDINATE instance can be created with:</p>
|
||||
<p>A new COORDINATE object can be created with:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="Point.html##(COORDINATE).New">Point#COORDINATE.New</a>(): a 2D point, taking an additional height parameter.</li>
|
||||
<li><a href="Point.html##(COORDINATE).NewFromVec2">Point#COORDINATE.NewFromVec2</a>(): a 2D point created from a <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>.</li>
|
||||
<li><a href="##(COORDINATE).New">COORDINATE.New</a>(): a 3D point.</li>
|
||||
<li><a href="##(COORDINATE).NewFromVec2">COORDINATE.NewFromVec2</a>(): a 2D point created from a <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>.</li>
|
||||
<li><a href="##(COORDINATE).NewFromVec3">COORDINATE.NewFromVec3</a>(): a 3D point created from a <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Manupulate the X, Altitude, Y coordinates of the 2D point</h2>
|
||||
<h2>Create waypoints for routes</h2>
|
||||
|
||||
<p>A COORDINATE class works in 2D space, with an altitude setting. It contains internally an X, Altitude, Y coordinate.
|
||||
Methods exist to manupulate these coordinates.</p>
|
||||
<p>A COORDINATE can prepare waypoints for Ground and Air groups to be embedded into a Route.</p>
|
||||
|
||||
<p>The current X, Altitude, Y axis can be retrieved with the methods <a href="##(COORDINATE).GetX">COORDINATE.GetX</a>(), <a href="##(COORDINATE).GetAlt">COORDINATE.GetAlt</a>(), <a href="##(COORDINATE).GetY">COORDINATE.GetY</a>() respectively.
|
||||
The methods <a href="##(COORDINATE).SetX">COORDINATE.SetX</a>(), <a href="##(COORDINATE).SetAlt">COORDINATE.SetAlt</a>(), <a href="##(COORDINATE).SetY">COORDINATE.SetY</a>() change the respective axis with a new value.
|
||||
The current Lat(itude), Alt(itude), Lon(gitude) values can also be retrieved with the methods <a href="##(COORDINATE).GetLat">COORDINATE.GetLat</a>(), <a href="##(COORDINATE).GetAlt">COORDINATE.GetAlt</a>(), <a href="##(COORDINATE).GetLon">COORDINATE.GetLon</a>() respectively.
|
||||
The current axis values can be changed by using the methods <a href="##(COORDINATE).AddX">COORDINATE.AddX</a>(), <a href="##(COORDINATE).AddAlt">COORDINATE.AddAlt</a>(), <a href="##(COORDINATE).AddY">COORDINATE.AddY</a>()
|
||||
to add or substract a value from the current respective axis value.
|
||||
Note that the Set and Add methods return the current COORDINATE object, so these manipulation methods can be chained... For example:</p>
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).RoutePointAir">COORDINATE.RoutePointAir</a>(): Build an air route point.</li>
|
||||
<li><a href="##(COORDINATE).RoutePointGround">COORDINATE.RoutePointGround</a>(): Build a ground route point.</li>
|
||||
</ul>
|
||||
|
||||
<pre><code> local Vec2 = PointVec2:AddX( 100 ):AddY( 2000 ):GetVec2()
|
||||
</code></pre>
|
||||
<p>Route points can be used in the Route methods of the <a href="Group.html##(GROUP)">Group#GROUP</a> class.</p>
|
||||
|
||||
|
||||
<h2>Smoke, flare, explode, illuminate</h2>
|
||||
|
||||
<p>At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:</p>
|
||||
|
||||
<h3>Smoke</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).Smoke">COORDINATE.Smoke</a>(): To smoke the point in a certain color.</li>
|
||||
<li><a href="##(COORDINATE).SmokeBlue">COORDINATE.SmokeBlue</a>(): To smoke the point in blue.</li>
|
||||
<li><a href="##(COORDINATE).SmokeRed">COORDINATE.SmokeRed</a>(): To smoke the point in red.</li>
|
||||
<li><a href="##(COORDINATE).SmokeOrange">COORDINATE.SmokeOrange</a>(): To smoke the point in orange.</li>
|
||||
<li><a href="##(COORDINATE).SmokeWhite">COORDINATE.SmokeWhite</a>(): To smoke the point in white.</li>
|
||||
<li><a href="##(COORDINATE).SmokeGreen">COORDINATE.SmokeGreen</a>(): To smoke the point in green.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Flare</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).Flare">COORDINATE.Flare</a>(): To flare the point in a certain color.</li>
|
||||
<li><a href="##(COORDINATE).FlareRed">COORDINATE.FlareRed</a>(): To flare the point in red.</li>
|
||||
<li><a href="##(COORDINATE).FlareYellow">COORDINATE.FlareYellow</a>(): To flare the point in yellow.</li>
|
||||
<li><a href="##(COORDINATE).FlareWhite">COORDINATE.FlareWhite</a>(): To flare the point in white.</li>
|
||||
<li><a href="##(COORDINATE).FlareGreen">COORDINATE.FlareGreen</a>(): To flare the point in green.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Explode</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).Explosion">COORDINATE.Explosion</a>(): To explode the point with a certain intensity.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Illuminate</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).IlluminationBomb">COORDINATE.IlluminationBomb</a>(): To illuminate the point.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>3D calculation methods</h2>
|
||||
|
||||
<p>Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:</p>
|
||||
|
||||
<h3>Distance</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).Get3DDistance">COORDINATE.Get3DDistance</a>(): Obtain the distance from the current 3D point to the provided 3D point in 3D space.</li>
|
||||
<li><a href="##(COORDINATE).Get2DDistance">COORDINATE.Get2DDistance</a>(): Obtain the distance from the current 3D point to the provided 3D point in 2D space.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Angle</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).GetAngleDegrees">COORDINATE.GetAngleDegrees</a>(): Obtain the angle in degrees from the current 3D point with the provided 3D direction vector.</li>
|
||||
<li><a href="##(COORDINATE).GetAngleRadians">COORDINATE.GetAngleRadians</a>(): Obtain the angle in radians from the current 3D point with the provided 3D direction vector.</li>
|
||||
<li><a href="##(COORDINATE).GetDirectionVec3">COORDINATE.GetDirectionVec3</a>(): Obtain the 3D direction vector from the current 3D point to the provided 3D point.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Translation</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).Translate">COORDINATE.Translate</a>(): Translate the current 3D point towards an other 3D point using the given Distance and Angle.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Get the North correction of the current location</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).GetNorthCorrection">COORDINATE.GetNorthCorrection</a>(): Obtains the north correction at the current 3D point.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Point Randomization</h2>
|
||||
|
||||
<p>Various methods exist to calculate random locations around a given 3D point.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).GetRandomVec2InRadius">COORDINATE.GetRandomVec2InRadius</a>(): Provides a random 2D vector around the current 3D point, in the given inner to outer band.</li>
|
||||
<li><a href="##(COORDINATE).GetRandomVec3InRadius">COORDINATE.GetRandomVec3InRadius</a>(): Provides a random 3D vector around the current 3D point, in the given inner to outer band.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Metric system</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).IsMetric">COORDINATE.IsMetric</a>(): Returns if the 3D point is Metric or Nautical Miles.</li>
|
||||
<li><a href="##(COORDINATE).SetMetric">COORDINATE.SetMetric</a>(): Sets the 3D point to Metric or Nautical Miles.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Coorinate text generation</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(COORDINATE).ToStringBR">COORDINATE.ToStringBR</a>(): Generates a Bearing & Range text in the format of DDD for DI where DDD is degrees and DI is distance.</li>
|
||||
<li><a href="##(COORDINATE).ToStringLL">COORDINATE.ToStringLL</a>(): Generates a Latutude & Longutude text.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -949,115 +1034,20 @@ Note that the Set and Add methods return the current POINT_VEC3 object, so these
|
||||
</code></pre>
|
||||
|
||||
|
||||
<h2>Create waypoints for routes</h2>
|
||||
|
||||
<p>A POINT_VEC3 can prepare waypoints for Ground and Air groups to be embedded into a Route.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).RoutePointAir">POINT_VEC3.RoutePointAir</a>(): Build an air route point.</li>
|
||||
<li><a href="##(POINT_VEC3).RoutePointGround">POINT_VEC3.RoutePointGround</a>(): Build a ground route point.</li>
|
||||
</ul>
|
||||
|
||||
<p>Route points can be used in the Route methods of the <a href="Group.html##(GROUP)">Group#GROUP</a> class.</p>
|
||||
|
||||
|
||||
<h2>Smoke, flare, explode, illuminate</h2>
|
||||
|
||||
<p>At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:</p>
|
||||
|
||||
<h3>Smoke</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).Smoke">POINT_VEC3.Smoke</a>(): To smoke the point in a certain color.</li>
|
||||
<li><a href="##(POINT_VEC3).SmokeBlue">POINT_VEC3.SmokeBlue</a>(): To smoke the point in blue.</li>
|
||||
<li><a href="##(POINT_VEC3).SmokeRed">POINT_VEC3.SmokeRed</a>(): To smoke the point in red.</li>
|
||||
<li><a href="##(POINT_VEC3).SmokeOrange">POINT_VEC3.SmokeOrange</a>(): To smoke the point in orange.</li>
|
||||
<li><a href="##(POINT_VEC3).SmokeWhite">POINT_VEC3.SmokeWhite</a>(): To smoke the point in white.</li>
|
||||
<li><a href="##(POINT_VEC3).SmokeGreen">POINT_VEC3.SmokeGreen</a>(): To smoke the point in green.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Flare</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).Flare">POINT_VEC3.Flare</a>(): To flare the point in a certain color.</li>
|
||||
<li><a href="##(POINT_VEC3).FlareRed">POINT_VEC3.FlareRed</a>(): To flare the point in red.</li>
|
||||
<li><a href="##(POINT_VEC3).FlareYellow">POINT_VEC3.FlareYellow</a>(): To flare the point in yellow.</li>
|
||||
<li><a href="##(POINT_VEC3).FlareWhite">POINT_VEC3.FlareWhite</a>(): To flare the point in white.</li>
|
||||
<li><a href="##(POINT_VEC3).FlareGreen">POINT_VEC3.FlareGreen</a>(): To flare the point in green.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Explode</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).Explosion">POINT_VEC3.Explosion</a>(): To explode the point with a certain intensity.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Illuminate</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).IlluminationBomb">POINT_VEC3.IlluminationBomb</a>(): To illuminate the point.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>3D calculation methods</h2>
|
||||
|
||||
<p>Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:</p>
|
||||
|
||||
<h3>Distance</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).Get3DDistance">POINT_VEC3.Get3DDistance</a>(): Obtain the distance from the current 3D point to the provided 3D point in 3D space.</li>
|
||||
<li><a href="##(POINT_VEC3).Get2DDistance">POINT_VEC3.Get2DDistance</a>(): Obtain the distance from the current 3D point to the provided 3D point in 2D space.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Angle</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).GetAngleDegrees">POINT_VEC3.GetAngleDegrees</a>(): Obtain the angle in degrees from the current 3D point with the provided 3D direction vector.</li>
|
||||
<li><a href="##(POINT_VEC3).GetAngleRadians">POINT_VEC3.GetAngleRadians</a>(): Obtain the angle in radians from the current 3D point with the provided 3D direction vector.</li>
|
||||
<li><a href="##(POINT_VEC3).GetDirectionVec3">POINT_VEC3.GetDirectionVec3</a>(): Obtain the 3D direction vector from the current 3D point to the provided 3D point.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Translation</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).Translate">POINT_VEC3.Translate</a>(): Translate the current 3D point towards an other 3D point using the given Distance and Angle.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Get the North correction of the current location</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).GetNorthCorrection">POINT_VEC3.GetNorthCorrection</a>(): Obtains the north correction at the current 3D point.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Point Randomization</h2>
|
||||
|
||||
<p>Various methods exist to calculate random locations around a given 3D point.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).GetRandomPointVec2InRadius">POINT_VEC3.GetRandomPointVec2InRadius</a>(): Provides a random 2D point around the current 3D point, in the given inner to outer band.</li>
|
||||
<li><a href="##(POINT_VEC3).GetRandomPointVec3InRadius">POINT_VEC3.GetRandomPointVec3InRadius</a>(): Provides a random 3D point around the current 3D point, in the given inner to outer band.</li>
|
||||
<li><a href="##(POINT_VEC3).GetRandomVec2InRadius">POINT_VEC3.GetRandomVec2InRadius</a>(): Provides a random 2D vector around the current 3D point, in the given inner to outer band.</li>
|
||||
<li><a href="##(POINT_VEC3).GetRandomVec3InRadius">POINT_VEC3.GetRandomVec3InRadius</a>(): Provides a random 3D vector around the current 3D point, in the given inner to outer band.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Metric system</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).IsMetric">POINT_VEC3.IsMetric</a>(): Returns if the 3D point is Metric or Nautical Miles.</li>
|
||||
<li><a href="##(POINT_VEC3).SetMetric">POINT_VEC3.SetMetric</a>(): Sets the 3D point to Metric or Nautical Miles.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Coorinate text generation</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(POINT_VEC3).ToStringBR">POINT_VEC3.ToStringBR</a>(): Generates a Bearing & Range text in the format of DDD for DI where DDD is degrees and DI is distance.</li>
|
||||
<li><a href="##(POINT_VEC3).ToStringLL">POINT_VEC3.ToStringLL</a>(): Generates a Latutude & Longutude text.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1068,6 +1058,34 @@ Note that the Set and Add methods return the current POINT_VEC3 object, so these
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(COORDINATE).DistanceFromVec2" >
|
||||
<strong>COORDINATE:DistanceFromVec2(Vec2Reference)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>TODO: check this to replace
|
||||
- Calculate the distance from a reference <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>.
|
||||
@param #COORDINATE self
|
||||
@param Dcs.DCSTypes#Vec2 Vec2Reference The reference <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>.
|
||||
@return Dcs.DCSTypes#Distance The distance from the reference <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> in meters.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Vec2Reference </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(COORDINATE).Explosion" >
|
||||
<strong>COORDINATE:Explosion(ExplosionIntensity)</strong>
|
||||
</a>
|
||||
@ -1548,6 +1566,68 @@ CorrectionRadians The correction in radians.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(COORDINATE).GetRandomVec2InRadius" >
|
||||
<strong>COORDINATE:GetRandomVec2InRadius(OuterRadius, InnerRadius)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> OuterRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> InnerRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Vec2)">Dcs.DCSTypes#Vec2</a>:</em>
|
||||
Vec2</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(COORDINATE).GetRandomVec3InRadius" >
|
||||
<strong>COORDINATE:GetRandomVec3InRadius(OuterRadius, InnerRadius)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> OuterRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> InnerRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Vec3)">Dcs.DCSTypes#Vec3</a>:</em>
|
||||
Vec3</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(COORDINATE).GetVec2" >
|
||||
<strong>COORDINATE:GetVec2()</strong>
|
||||
</a>
|
||||
@ -1603,7 +1683,7 @@ The Vec3 format coordinate.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a Coordinate has Line of Sight (LOS) with the ToPointVec3.</p>
|
||||
<p>Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -2229,7 +2309,7 @@ The MGRS Text</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add a Distance in meters from the COORDINATE horizontal plane, with the given angle, and calculate the new COORDINATE.</p>
|
||||
<p>Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
@ -2416,33 +2496,6 @@ The y coordinate.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POINT_VEC2).DistanceFromVec2" >
|
||||
<strong>POINT_VEC2:DistanceFromVec2(Vec2Reference)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Calculate the distance from a reference <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Vec2)">Dcs.DCSTypes#Vec2</a> Vec2Reference </em></code>:
|
||||
The reference <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a>.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a>:</em>
|
||||
The distance from the reference <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> in meters.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POINT_VEC2).GetAlt" >
|
||||
<strong>POINT_VEC2:GetAlt()</strong>
|
||||
</a>
|
||||
@ -2523,37 +2576,6 @@ The y coodinate.</p>
|
||||
<p><em><a href="##(POINT_VEC2)">#POINT_VEC2</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POINT_VEC2).GetRandomVec2InRadius" >
|
||||
<strong>POINT_VEC2:GetRandomVec2InRadius(OuterRadius, InnerRadius)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC2.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> OuterRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> InnerRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Vec2)">Dcs.DCSTypes#Vec2</a>:</em>
|
||||
Vec2</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2828,39 +2850,6 @@ The y coordinate.</p>
|
||||
<p><em><a href="##(POINT_VEC2)">#POINT_VEC2</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POINT_VEC2).Translate" >
|
||||
<strong>POINT_VEC2:Translate(Distance, Angle)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add a Distance in meters from the POINT<em>VEC2 orthonormal plane, with the given angle, and calculate the new POINT</em>VEC2.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> Distance </em></code>:
|
||||
The Distance to be added in meters.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Angle)">Dcs.DCSTypes#Angle</a> Angle </em></code>:
|
||||
The Angle in degrees.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(POINT_VEC2)">#POINT_VEC2</a>:</em>
|
||||
The new calculated POINT_VEC2.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2894,7 +2883,6 @@ The new calculated POINT_VEC2.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(POINT_VEC2).z" >
|
||||
<strong>POINT_VEC2.z</strong>
|
||||
</a>
|
||||
@ -3035,37 +3023,6 @@ The z coordinate value to add to the current z coodinate.</p>
|
||||
<p><em><a href="##(POINT_VEC3)">#POINT_VEC3</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(POINT_VEC3).GetRandomVec3InRadius" >
|
||||
<strong>POINT_VEC3:GetRandomVec3InRadius(OuterRadius, InnerRadius)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> OuterRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Distance)">Dcs.DCSTypes#Distance</a> InnerRadius </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Vec3)">Dcs.DCSTypes#Vec3</a>:</em>
|
||||
Vec3</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -1071,7 +1071,7 @@ true if metric.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#boolean</em>
|
||||
<a id="#(SETTINGS).Metric" >
|
||||
<strong>SETTINGS.Metric</strong>
|
||||
</a>
|
||||
|
||||
@ -2532,6 +2532,9 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Overwrite unit names by default with group name.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2950,7 +2953,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -185,7 +185,7 @@ Find a summary below describing for which situation a task type is created:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_A2A_DISPATCHER).EvaluateRemoveTask">TASK_A2A_DISPATCHER:EvaluateRemoveTask(Mission, Task, Detection, DetectedItemID, DetectedItemChange, DetectedItem, DetectedItemChanged)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_A2A_DISPATCHER).EvaluateRemoveTask">TASK_A2A_DISPATCHER:EvaluateRemoveTask(Mission, Task, Detection, DetectedItemID, DetectedItemChange, DetectedItem, DetectedItemIndex, DetectedItemChanged)</a></td>
|
||||
<td class="summary">
|
||||
<p>Evaluates the removal of the Task from the Mission.</p>
|
||||
</td>
|
||||
@ -366,7 +366,7 @@ If there are no targets to be set.</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_A2A_DISPATCHER).EvaluateRemoveTask" >
|
||||
<strong>TASK_A2A_DISPATCHER:EvaluateRemoveTask(Mission, Task, Detection, DetectedItemID, DetectedItemChange, DetectedItem, DetectedItemChanged)</strong>
|
||||
<strong>TASK_A2A_DISPATCHER:EvaluateRemoveTask(Mission, Task, Detection, DetectedItemID, DetectedItemChange, DetectedItem, DetectedItemIndex, DetectedItemChanged)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -411,6 +411,11 @@ The detection created by the <a href="Detection.html##(DETECTION_BASE)">Detectio
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DetectedItemIndex </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DetectedItemChanged </em></code>: </p>
|
||||
|
||||
</li>
|
||||
|
||||
@ -187,7 +187,7 @@ Find a summary below describing for which situation a task type is created:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_A2G_DISPATCHER).EvaluateRemoveTask">TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, DetectedItemChanged)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_A2G_DISPATCHER).EvaluateRemoveTask">TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, TaskIndex, DetectedItemChanged)</a></td>
|
||||
<td class="summary">
|
||||
<p>Evaluates the removal of the Task from the Mission.</p>
|
||||
</td>
|
||||
@ -347,7 +347,7 @@ Find a summary below describing for which situation a task type is created:</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_A2G_DISPATCHER).EvaluateRemoveTask" >
|
||||
<strong>TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, DetectedItemChanged)</strong>
|
||||
<strong>TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, TaskIndex, DetectedItemChanged)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -381,6 +381,11 @@ Find a summary below describing for which situation a task type is created:</p>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> TaskIndex </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DetectedItemChanged </em></code>: </p>
|
||||
|
||||
</li>
|
||||
|
||||
@ -506,7 +506,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Core.Cargo.html##(CARGO)">Core.Cargo#CARGO</a></em>
|
||||
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
|
||||
<a id="#(FSM_PROCESS).Cargo" >
|
||||
<strong>FSM_PROCESS.Cargo</strong>
|
||||
</a>
|
||||
@ -520,6 +520,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM_PROCESS).DeployZone" >
|
||||
<strong>FSM_PROCESS.DeployZone</strong>
|
||||
</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user