mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-21 11:53:30 +00:00
Merge branch 'FF/Develop' into FF/Fox2
This commit is contained in:
@@ -553,12 +553,15 @@ function AIRBASE:GetParkingSpotsTable(termtype)
|
||||
local spots={}
|
||||
for _,_spot in pairs(parkingdata) do
|
||||
if AIRBASE._CheckTerminalType(_spot.Term_Type, termtype) then
|
||||
self:I({_spot=_spot})
|
||||
local _free=_isfree(_spot)
|
||||
local _coord=COORDINATE:NewFromVec3(_spot.vTerminalPos)
|
||||
table.insert(spots, {Coordinate=_coord, TerminalID=_spot.Term_Index, TerminalType=_spot.Term_Type, TOAC=_spot.TO_AC, Free=_free, TerminalID0=_spot.Term_Index_0, DistToRwy=_spot.fDistToRW})
|
||||
end
|
||||
end
|
||||
|
||||
self:I({ spots = spots } )
|
||||
|
||||
return spots
|
||||
end
|
||||
|
||||
@@ -708,6 +711,8 @@ function AIRBASE:FindFreeParkingSpotForAircraft(group, terminaltype, scanradius,
|
||||
local _spot=parkingspot.Coordinate -- Core.Point#COORDINATE
|
||||
local _termid=parkingspot.TerminalID
|
||||
|
||||
self:I({_termid=_termid})
|
||||
|
||||
if AIRBASE._CheckTerminalType(parkingspot.TerminalType, terminaltype) then
|
||||
|
||||
-- Very safe uses the DCS getParking() info to check if a spot is free. Unfortunately, the function returns free=false until the aircraft has actually taken-off.
|
||||
@@ -787,7 +792,7 @@ function AIRBASE:FindFreeParkingSpotForAircraft(group, terminaltype, scanradius,
|
||||
|
||||
--_spot:MarkToAll(string.format("Parking spot %d free=%s", parkingspot.TerminalID, tostring(not occupied)))
|
||||
if occupied then
|
||||
self:T(string.format("%s: Parking spot id %d occupied.", airport, _termid))
|
||||
self:I(string.format("%s: Parking spot id %d occupied.", airport, _termid))
|
||||
else
|
||||
self:I(string.format("%s: Parking spot id %d free.", airport, _termid))
|
||||
if nvalid<_nspots then
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1184,6 +1184,24 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) --R2.1
|
||||
|
||||
end
|
||||
|
||||
--- Start Lasing a COORDINATE.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param Core.Point#COORDIUNATE Coordinate The coordinate where the lase is pointing at.
|
||||
-- @param #number LaserCode Laser code or random number in [1000, 9999].
|
||||
-- @param #number Duration Duration of lasing in seconds.
|
||||
-- @return Core.Spot#SPOT
|
||||
function POSITIONABLE:LaseCoordinate(Coordinate, LaserCode, Duration)
|
||||
self:F2()
|
||||
|
||||
LaserCode = LaserCode or math.random(1000, 9999)
|
||||
|
||||
self.Spot = SPOT:New(self) -- Core.Spot#SPOT
|
||||
self.Spot:LaseOnCoordinate(Coordinate, LaserCode, Duration)
|
||||
self.LaserCode = LaserCode
|
||||
|
||||
return self.Spot
|
||||
end
|
||||
|
||||
--- Stop Lasing a POSITIONABLE
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return #POSITIONABLE
|
||||
|
||||
Reference in New Issue
Block a user