- Added new TIMER class.
This commit is contained in:
Frank
2020-08-29 20:26:20 +02:00
parent caef309547
commit 2d6092c114
13 changed files with 397 additions and 66 deletions

View File

@@ -560,6 +560,7 @@ do -- COORDINATE
self.z=z
return self
else
--env.info("FF translate with NEW coordinate T="..timer.getTime())
return COORDINATE:New(x, y, z)
end
@@ -1136,23 +1137,6 @@ do -- COORDINATE
return self
end
--- Add a Distance in meters from the COORDINATE horizontal plane, with the given angle, and calculate the new COORDINATE.
-- @param #COORDINATE self
-- @param DCS#Distance Distance The Distance to be added in meters.
-- @param DCS#Angle Angle The Angle in degrees.
-- @return #COORDINATE The new calculated COORDINATE.
function COORDINATE:Translate( Distance, Angle )
local SX = self.x
local SZ = self.z
local Radians = Angle / 180 * math.pi
local TX = Distance * math.cos( Radians ) + SX
local TZ = Distance * math.sin( Radians ) + SZ
return COORDINATE:New( TX, self.y, TZ )
end
--- Build an air type route point.
-- @param #COORDINATE self
-- @param #COORDINATE.WaypointAltType AltType The altitude type.