mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#ATIS
* Fix for airbases which have no runways, e.g. Naqoura Syria
This commit is contained in:
parent
d937ab2679
commit
f59326bf10
@ -1,3 +1,4 @@
|
|||||||
|
---@diagnostic disable: cast-local-type
|
||||||
--- **Ops** - Automatic Terminal Information Service (ATIS).
|
--- **Ops** - Automatic Terminal Information Service (ATIS).
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
@ -608,15 +609,16 @@ _ATIS = {}
|
|||||||
|
|
||||||
--- ATIS class version.
|
--- ATIS class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
ATIS.version = "0.9.14"
|
ATIS.version = "0.9.15"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- TODO: Add new Normandy airfields.
|
|
||||||
-- TODO: Zulu time --> Zulu in output.
|
|
||||||
-- TODO: Correct fog for elevation.
|
-- TODO: Correct fog for elevation.
|
||||||
|
-- DONE: Zulu time --> Zulu in output.
|
||||||
|
-- DONE: Fix for AB not having a runway - Helopost like Naqoura
|
||||||
|
-- DONE: Add new Normandy airfields.
|
||||||
-- DONE: Use new AIRBASE system to set start/landing runway
|
-- DONE: Use new AIRBASE system to set start/landing runway
|
||||||
-- DONE: SetILS doesn't work
|
-- DONE: SetILS doesn't work
|
||||||
-- DONE: Visibility reported twice over SRS
|
-- DONE: Visibility reported twice over SRS
|
||||||
@ -2139,16 +2141,20 @@ function ATIS:onafterBroadcast( From, Event, To )
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
alltext = alltext .. ";\n" .. subtitle
|
alltext = alltext .. ";\n" .. subtitle
|
||||||
|
|
||||||
|
local _RUNACT
|
||||||
|
|
||||||
if not self.ATISforFARPs then
|
if not self.ATISforFARPs then
|
||||||
-- Active runway.
|
-- Active runway.
|
||||||
local subtitle=string.format("Active runway %s", runwayLanding)
|
if runwayLanding then
|
||||||
if rwyLandingLeft==true then
|
local subtitle=string.format("Active runway %s", runwayLanding)
|
||||||
subtitle=subtitle.." Left"
|
if rwyLandingLeft==true then
|
||||||
elseif rwyLandingLeft==false then
|
subtitle=subtitle.." Left"
|
||||||
subtitle=subtitle.." Right"
|
elseif rwyLandingLeft==false then
|
||||||
|
subtitle=subtitle.." Right"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local _RUNACT = subtitle
|
_RUNACT = subtitle
|
||||||
if not self.useSRS then
|
if not self.useSRS then
|
||||||
self:Transmission(ATIS.Sound.ActiveRunway, 1.0, subtitle)
|
self:Transmission(ATIS.Sound.ActiveRunway, 1.0, subtitle)
|
||||||
self.radioqueue:Number2Transmission(runwayLanding)
|
self.radioqueue:Number2Transmission(runwayLanding)
|
||||||
@ -2509,8 +2515,11 @@ function ATIS:GetActiveRunway(Takeoff)
|
|||||||
else
|
else
|
||||||
runway=self.airbase:GetActiveRunwayLanding()
|
runway=self.airbase:GetActiveRunwayLanding()
|
||||||
end
|
end
|
||||||
|
if runway then -- some ABs have NO runways, e.g. Syria Naqoura
|
||||||
return runway.name, runway.isLeft
|
return runway.name, runway.isLeft
|
||||||
|
else
|
||||||
|
return nil, nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get runway from user supplied magnetic heading.
|
--- Get runway from user supplied magnetic heading.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user