mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#UNIT #CTLD
* Stabilize that sometimes a unit coordinate cannot be found
This commit is contained in:
parent
878169f51c
commit
065c59f167
@ -21,6 +21,7 @@ __Moose.Include( 'Core\\Zone_Detection.lua' )
|
|||||||
__Moose.Include( 'Core\\Database.lua' )
|
__Moose.Include( 'Core\\Database.lua' )
|
||||||
__Moose.Include( 'Core\\Set.lua' )
|
__Moose.Include( 'Core\\Set.lua' )
|
||||||
__Moose.Include( 'Core\\Point.lua' )
|
__Moose.Include( 'Core\\Point.lua' )
|
||||||
|
__Moose.Include( 'Core\\Pathline.lua' )
|
||||||
__Moose.Include( 'Core\\Velocity.lua' )
|
__Moose.Include( 'Core\\Velocity.lua' )
|
||||||
__Moose.Include( 'Core\\Message.lua' )
|
__Moose.Include( 'Core\\Message.lua' )
|
||||||
__Moose.Include( 'Core\\Fsm.lua' )
|
__Moose.Include( 'Core\\Fsm.lua' )
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
-- @module Ops.CTLD
|
-- @module Ops.CTLD
|
||||||
-- @image OPS_CTLD.jpg
|
-- @image OPS_CTLD.jpg
|
||||||
|
|
||||||
-- Last Update Apr 2023
|
-- Last Update June 2023
|
||||||
|
|
||||||
do
|
do
|
||||||
|
|
||||||
@ -1221,7 +1221,7 @@ CTLD.UnitTypes = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="1.0.37"
|
CTLD.version="1.0.38"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -4308,6 +4308,9 @@ end
|
|||||||
local uspeed = Unit:GetVelocityMPS()
|
local uspeed = Unit:GetVelocityMPS()
|
||||||
local uheight = Unit:GetHeight()
|
local uheight = Unit:GetHeight()
|
||||||
local ucoord = Unit:GetCoordinate()
|
local ucoord = Unit:GetCoordinate()
|
||||||
|
if not ucoord then
|
||||||
|
return false
|
||||||
|
end
|
||||||
local gheight = ucoord:GetLandHeight()
|
local gheight = ucoord:GetLandHeight()
|
||||||
local aheight = uheight - gheight -- height above ground
|
local aheight = uheight - gheight -- height above ground
|
||||||
local maxh = self.maximumHoverHeight -- 15
|
local maxh = self.maximumHoverHeight -- 15
|
||||||
@ -4334,6 +4337,9 @@ end
|
|||||||
local uspeed = Unit:GetVelocityMPS()
|
local uspeed = Unit:GetVelocityMPS()
|
||||||
local uheight = Unit:GetHeight()
|
local uheight = Unit:GetHeight()
|
||||||
local ucoord = Unit:GetCoordinate()
|
local ucoord = Unit:GetCoordinate()
|
||||||
|
if not ucoord then
|
||||||
|
return false
|
||||||
|
end
|
||||||
local gheight = ucoord:GetLandHeight()
|
local gheight = ucoord:GetLandHeight()
|
||||||
local aheight = uheight - gheight -- height above ground
|
local aheight = uheight - gheight -- height above ground
|
||||||
local minh = self.HercMinAngels-- 1500m
|
local minh = self.HercMinAngels-- 1500m
|
||||||
@ -4419,6 +4425,9 @@ end
|
|||||||
end
|
end
|
||||||
local uheight = Unit:GetHeight()
|
local uheight = Unit:GetHeight()
|
||||||
local ucoord = Unit:GetCoordinate()
|
local ucoord = Unit:GetCoordinate()
|
||||||
|
if not ucoord then
|
||||||
|
return false
|
||||||
|
end
|
||||||
local gheight = ucoord:GetLandHeight()
|
local gheight = ucoord:GetLandHeight()
|
||||||
local aheight = uheight - gheight -- height above ground
|
local aheight = uheight - gheight -- height above ground
|
||||||
if aheight >= minheight then
|
if aheight >= minheight then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user