mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Do not report visibilities > 10 NM or 9999 m
This commit is contained in:
parent
25b8cff442
commit
0c6aae45c1
@ -1388,12 +1388,23 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Visibility in NM.
|
local VISIBILITY=""
|
||||||
local VISIBILITY=string.format("%d", UTILS.Round(UTILS.MetersToNM(visibilitymin)))
|
|
||||||
|
|
||||||
-- Visibility in km.
|
|
||||||
if self.metric then
|
if self.metric then
|
||||||
VISIBILITY=string.format("%d", UTILS.Round(visibilitymin/1000))
|
-- Visibility in km.
|
||||||
|
local reportedviz=UTILS.Round(visibilitymin/1000)
|
||||||
|
-- max reported visibility 9999 m
|
||||||
|
if reportedviz > 10 then
|
||||||
|
reportedviz=10
|
||||||
|
end
|
||||||
|
VISIBILITY=string.format("%d", reportedviz)
|
||||||
|
else
|
||||||
|
-- max reported visibility 10 NM
|
||||||
|
local reportedviz=UTILS.Round(UTILS.MetersToNM(visibilitymin))
|
||||||
|
if reportedviz > 10 then
|
||||||
|
reportedviz=10
|
||||||
|
end
|
||||||
|
VISIBILITY=string.format("%d", reportedviz)
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user