mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
xx
This commit is contained in:
parent
a1605f9a2d
commit
093a60050b
@ -2669,9 +2669,9 @@ do -- COORDINATE
|
|||||||
local date=UTILS.GetDCSMissionDate()
|
local date=UTILS.GetDCSMissionDate()
|
||||||
|
|
||||||
-- Debug output.
|
-- Debug output.
|
||||||
--self:I(string.format("Sun rise at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%d sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), sunrise, Tdiff))
|
self:I(string.format("Sun rise at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%d sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), sunrise, Tdiff))
|
||||||
|
|
||||||
if InSeconds then
|
if InSeconds or type(sunrise) == "string" then
|
||||||
return sunrise
|
return sunrise
|
||||||
else
|
else
|
||||||
return UTILS.SecondsToClock(sunrise, true)
|
return UTILS.SecondsToClock(sunrise, true)
|
||||||
@ -2837,9 +2837,9 @@ do -- COORDINATE
|
|||||||
local date=UTILS.GetDCSMissionDate()
|
local date=UTILS.GetDCSMissionDate()
|
||||||
|
|
||||||
-- Debug output.
|
-- Debug output.
|
||||||
--self:I(string.format("Sun set at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%d sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), sunrise, Tdiff))
|
self:I(string.format("Sun set at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%d sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), sunrise, Tdiff))
|
||||||
|
|
||||||
if InSeconds then
|
if InSeconds or type(sunrise) == "string" then
|
||||||
return sunrise
|
return sunrise
|
||||||
else
|
else
|
||||||
return UTILS.SecondsToClock(sunrise, true)
|
return UTILS.SecondsToClock(sunrise, true)
|
||||||
|
|||||||
@ -1975,18 +1975,24 @@ function ATIS:onafterBroadcast( From, Event, To )
|
|||||||
|
|
||||||
local hours = self.gettext:GetEntry("HOURS",self.locale)
|
local hours = self.gettext:GetEntry("HOURS",self.locale)
|
||||||
local sunrise = coord:GetSunrise()
|
local sunrise = coord:GetSunrise()
|
||||||
|
local SUNRISE = "no time"
|
||||||
|
if tostring(sunrise) ~= "N/R" then
|
||||||
sunrise = UTILS.Split( sunrise, ":" )
|
sunrise = UTILS.Split( sunrise, ":" )
|
||||||
local SUNRISE = string.format( "%s%s", sunrise[1], sunrise[2] )
|
SUNRISE = string.format( "%s%s", sunrise[1], sunrise[2] )
|
||||||
if self.useSRS then
|
if self.useSRS then
|
||||||
SUNRISE = string.format( "%s %s %s", sunrise[1], sunrise[2], hours )
|
SUNRISE = string.format( "%s %s %s", sunrise[1], sunrise[2], hours )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local sunset = coord:GetSunset()
|
local sunset = coord:GetSunset()
|
||||||
|
local SUNSET = "no time"
|
||||||
|
if tostring(sunset) ~= "N/S" then
|
||||||
sunset = UTILS.Split( sunset, ":" )
|
sunset = UTILS.Split( sunset, ":" )
|
||||||
local SUNSET = string.format( "%s%s", sunset[1], sunset[2] )
|
SUNSET = string.format( "%s%s", sunset[1], sunset[2] )
|
||||||
if self.useSRS then
|
if self.useSRS then
|
||||||
SUNSET = string.format( "%s %s %s", sunset[1], sunset[2], hours )
|
SUNSET = string.format( "%s %s %s", sunset[1], sunset[2], hours )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------
|
---------------------------------
|
||||||
--- Temperature and Dew Point ---
|
--- Temperature and Dew Point ---
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user