diff --git a/Moose Development/Moose/Modules.lua b/Moose Development/Moose/Modules.lua index da8a13e96..22f23bb75 100644 --- a/Moose Development/Moose/Modules.lua +++ b/Moose Development/Moose/Modules.lua @@ -68,6 +68,7 @@ __Moose.Include( 'Scripts/Moose/Functional/Fox.lua' ) __Moose.Include( 'Scripts/Moose/Ops/Airboss.lua' ) __Moose.Include( 'Scripts/Moose/Ops/RecoveryTanker.lua' ) __Moose.Include( 'Scripts/Moose/Ops/RescueHelo.lua' ) +__Moose.Include( 'Scripts/Moose/Ops/ATIS.lua' ) __Moose.Include( 'Scripts/Moose/AI/AI_Balancer.lua' ) __Moose.Include( 'Scripts/Moose/AI/AI_Air.lua' ) diff --git a/Moose Development/Moose/Ops/ATIS.lua b/Moose Development/Moose/Ops/ATIS.lua index 564cfa8dc..b9da4738e 100644 --- a/Moose Development/Moose/Ops/ATIS.lua +++ b/Moose Development/Moose/Ops/ATIS.lua @@ -113,8 +113,10 @@ -- -- ## Active Runway -- --- By default, the currently active runway is determined automatically by analysing the wind direction. However, there are special cases, where this does not yield the correct result. --- Also, there are airports with more than one runway facing in the same direction (usually denoted left and right). In this case, there is obviously no *unique* result depending on the wind vector. +-- By default, the currently active runway is determined automatically by analysing the wind direction. Therefore, you should obviously set the wind speed to be greater zero in your mission. +-- +-- Note however, there are a few special cases, where automatic detection does not yield the correct or desired result. +-- For example, there are airports with more than one runway facing in the same direction (usually denoted left and right). In this case, there is obviously no *unique* result depending on the wind vector. -- -- If the automatic runway detection fails, the active runway can be specified manually in the script via the @{#ATIS.SetActiveRunway}(*runway*) function. -- The parameter *runway* is a string which can be used to specify the runway heading and, if applicable, whether the left or right runway is in use. diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 6da64bf10..832b94d76 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -1010,8 +1010,9 @@ end --- Get runways data. Only for airdromes! -- @param #AIRBASE self -- @param #number magvar (Optional) Magnetic variation in degrees. +-- @param #boolean mark (Optional) Place markers with runway data on F10 map. -- @return #table Runway data. -function AIRBASE:GetRunwayData(magvar) +function AIRBASE:GetRunwayData(magvar, mark) -- Runway table. local runways={} @@ -1074,7 +1075,9 @@ function AIRBASE:GetRunwayData(magvar) self:T(string.format("Airbase %s: Adding runway id=%s, heading=%03d, length=%d m", self:GetName(), runway.idx, runway.heading, runway.length)) -- Debug mark - runway.position:MarkToAll(string.format("Runway %s Heading=%03d", runway.idx, runway.heading)) + if mark then + runway.position:MarkToAll(string.format("Runway %s: true heading=%03d, length=%d m", runway.idx, runway.heading, runway.length)) + end -- Add runway. table.insert(runways, runway) @@ -1100,14 +1103,16 @@ function AIRBASE:GetRunwayData(magvar) self:T(string.format("Airbase %s: Adding runway id=%s, heading=%03d, length=%d m", self:GetName(), runway.idx, runway.heading, runway.length)) -- Debug mark - runway.position:MarkToAll(string.format("Runway %s Heading=%03d", runway.idx, runway.heading)) - + if mark then + runway.position:MarkToAll(string.format("Runway %s: true heading=%03d, length=%d m", runway.idx, runway.heading, runway.length)) + end + -- Add runway. table.insert(inverse, runway) end + -- Add inverse runway. for _,runway in pairs(inverse) do - -- Add runway. table.insert(runways, runway) end @@ -1165,7 +1170,7 @@ function AIRBASE:GetActiveRunway(magvar) local dot=UTILS.VecDot(Vwind, Vrunway) -- Debug. - env.info(string.format("runway=%03d° dot=%.3f", runway.heading, dot)) + --env.info(string.format("runway=%03d° dot=%.3f", runway.heading, dot)) -- New min? if dotmin==nil or dot