mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
ATIS v0.7.1
Fixed bug that windfrom < 0.
This commit is contained in:
@@ -531,7 +531,7 @@ _ATIS={}
|
|||||||
|
|
||||||
--- ATIS class version.
|
--- ATIS class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
ATIS.version="0.7.0"
|
ATIS.version="0.7.1"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
@@ -1230,13 +1230,22 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
if self.windtrue then
|
if self.windtrue then
|
||||||
magvar=0
|
magvar=0
|
||||||
end
|
end
|
||||||
|
windFrom=windFrom-magvar
|
||||||
|
|
||||||
|
-- Correct negative values.
|
||||||
|
if windFrom<0 then
|
||||||
|
windFrom=windFrom+360
|
||||||
|
end
|
||||||
|
|
||||||
local WINDFROM=string.format("%03d", windFrom-magvar)
|
local WINDFROM=string.format("%03d", windFrom)
|
||||||
local WINDSPEED=string.format("%d", UTILS.MpsToKnots(windSpeed))
|
local WINDSPEED=string.format("%d", UTILS.MpsToKnots(windSpeed))
|
||||||
|
|
||||||
|
-- Report North as 0.
|
||||||
if WINDFROM=="000" then
|
if WINDFROM=="000" then
|
||||||
WINDFROM="360"
|
WINDFROM="360"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
env.info(string.format("FF WINDFROM = %s", tostring(WINDFROM)))
|
||||||
|
|
||||||
if self.metric then
|
if self.metric then
|
||||||
WINDSPEED=string.format("%d", windSpeed)
|
WINDSPEED=string.format("%d", windSpeed)
|
||||||
|
|||||||
@@ -12002,7 +12002,7 @@ function AIRBOSS:_LSOgrade(playerData)
|
|||||||
-----------------
|
-----------------
|
||||||
grade="OWO"
|
grade="OWO"
|
||||||
points=2.0
|
points=2.0
|
||||||
if G=="Unicorn" then
|
if N==0 then
|
||||||
G="n/a"
|
G="n/a"
|
||||||
end
|
end
|
||||||
elseif playerData.waveoff then
|
elseif playerData.waveoff then
|
||||||
|
|||||||
Reference in New Issue
Block a user