mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Update Utils.lua
- Added parameters time zone and magvar for Sinai map
This commit is contained in:
parent
e9adcb0dd5
commit
f1fc9f0b27
@ -43,7 +43,7 @@ BIGSMOKEPRESET = {
|
||||
HugeSmoke=8,
|
||||
}
|
||||
|
||||
--- DCS map as returned by env.mission.theatre.
|
||||
--- DCS map as returned by `env.mission.theatre`.
|
||||
-- @type DCSMAP
|
||||
-- @field #string Caucasus Caucasus map.
|
||||
-- @field #string Normandy Normandy map.
|
||||
@ -53,6 +53,7 @@ BIGSMOKEPRESET = {
|
||||
-- @field #string Syria Syria map.
|
||||
-- @field #string MarianaIslands Mariana Islands map.
|
||||
-- @field #string Falklands South Atlantic map.
|
||||
-- @field #string Sinai Sinai map.
|
||||
DCSMAP = {
|
||||
Caucasus="Caucasus",
|
||||
NTTR="Nevada",
|
||||
@ -62,6 +63,7 @@ DCSMAP = {
|
||||
Syria="Syria",
|
||||
MarianaIslands="MarianaIslands",
|
||||
Falklands="Falklands",
|
||||
Sinai="SinaiMap"
|
||||
}
|
||||
|
||||
|
||||
@ -1390,7 +1392,7 @@ function UTILS.TACANToFrequency(TACANChannel, TACANMode)
|
||||
end
|
||||
|
||||
|
||||
--- Returns the DCS map/theatre as optained by env.mission.theatre
|
||||
--- Returns the DCS map/theatre as optained by `env.mission.theatre`.
|
||||
-- @return #string DCS map name.
|
||||
function UTILS.GetDCSMap()
|
||||
return env.mission.theatre
|
||||
@ -1446,6 +1448,7 @@ end
|
||||
-- * Syria +5 (East)
|
||||
-- * Mariana Islands +2 (East)
|
||||
-- * Falklands +12 (East) - note there's a LOT of deviation across the map, as we're closer to the South Pole
|
||||
-- * Sinai +4.8 (East)
|
||||
-- @param #string map (Optional) Map for which the declination is returned. Default is from env.mission.theatre
|
||||
-- @return #number Declination in degrees.
|
||||
function UTILS.GetMagneticDeclination(map)
|
||||
@ -1470,6 +1473,8 @@ function UTILS.GetMagneticDeclination(map)
|
||||
declination=2
|
||||
elseif map==DCSMAP.Falklands then
|
||||
declination=12
|
||||
elseif map==DCSMAP.Sinai then
|
||||
declination=4.8
|
||||
else
|
||||
declination=0
|
||||
end
|
||||
@ -1685,6 +1690,8 @@ function UTILS.GMTToLocalTimeDifference()
|
||||
return 10 -- Guam is UTC+10 hours.
|
||||
elseif theatre==DCSMAP.Falklands then
|
||||
return -3 -- Fireland is UTC-3 hours.
|
||||
elseif theatre==DCSMAP.Sinai then
|
||||
return 2 -- Currently map is +2 but should be +3 (DCS bug?)
|
||||
else
|
||||
BASE:E(string.format("ERROR: Unknown Map %s in UTILS.GMTToLocal function. Returning 0", tostring(theatre)))
|
||||
return 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user