mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
FC
This commit is contained in:
@@ -4152,6 +4152,51 @@ function FLIGHTCONTROL:_CheckFlights()
|
||||
-- Current flight status.
|
||||
local flightstatus=self:GetFlightStatus(flight)
|
||||
|
||||
|
||||
|
||||
---
|
||||
-- Track flight
|
||||
---
|
||||
if true then
|
||||
|
||||
for _,_element in pairs(flight.elements) do
|
||||
local element=_element --Ops.OpsGroup#OPSGROUP.Element
|
||||
|
||||
local unit=element.unit
|
||||
|
||||
if unit and unit:IsAlive() then
|
||||
|
||||
local coord=unit:GetCoord()
|
||||
local vec3=coord:GetVec3()
|
||||
|
||||
if vec3 and element.pos then
|
||||
|
||||
local id=UTILS.GetMarkID()
|
||||
|
||||
trigger.action.lineToAll(-1, id, vec3, element.pos, {1,1,1,0.5}, 1)
|
||||
|
||||
end
|
||||
|
||||
if coord then
|
||||
local taxipath, dist, tpcoord, seg=self.airbase:GetClosestTaxiway(coord)
|
||||
|
||||
if taxipath then
|
||||
local text=string.format("Flight %s [%s/%s]: Unit %s close to taxiway %s. Dist=%.1f meters, Segment=%s-%s", flight:GetName(), flight:GetState(), self:GetFlightStatus(flight),
|
||||
element.name, taxipath:GetName(), dist, seg.p1.name, seg.p2.name)
|
||||
MESSAGE:New(text,10):ToAll():ToLog()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- Store last position.
|
||||
element.pos=vec3
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if not flight.isAI then
|
||||
|
||||
-- Check if speeding while taxiing.
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
-- @field #boolean jettisonWeapons Allow (true) or disallow (false) AI to jettison weapons if in danger.
|
||||
-- @field #table flightplans Flight plans for this group.
|
||||
-- @field Navigation.FlightPlan#FLIGHTPLAN flightplan Currently active flight plan.
|
||||
-- @field Core.Pathline#PATHLINE taxipath Assigned taxi pathline.
|
||||
--
|
||||
-- @extends Ops.OpsGroup#OPSGROUP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user