mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Clean up UTF-8 mess
This commit is contained in:
parent
20f28b3d2c
commit
c7ea45e5fd
@ -806,13 +806,13 @@ do -- COORDINATE
|
|||||||
--- Returns a text of the temperature according the measurement system @{Settings}.
|
--- Returns a text of the temperature according the measurement system @{Settings}.
|
||||||
-- The text will reflect the temperature like this:
|
-- The text will reflect the temperature like this:
|
||||||
--
|
--
|
||||||
-- - For Russian and European aircraft using the metric system - Degrees Celcius (°C)
|
-- - For Russian and European aircraft using the metric system - Degrees Celcius (°C)
|
||||||
-- - For Americain aircraft we link to the imperial system - Degrees Farenheit (°F)
|
-- - For Americain aircraft we link to the imperial system - Degrees Farenheit (°F)
|
||||||
--
|
--
|
||||||
-- A text containing a pressure will look like this:
|
-- A text containing a pressure will look like this:
|
||||||
--
|
--
|
||||||
-- - `Temperature: %n.d °C`
|
-- - `Temperature: %n.d °C`
|
||||||
-- - `Temperature: %n.d °F`
|
-- - `Temperature: %n.d °F`
|
||||||
--
|
--
|
||||||
-- @param #COORDINATE self
|
-- @param #COORDINATE self
|
||||||
-- @param height (Optional) parameter specifying the height ASL.
|
-- @param height (Optional) parameter specifying the height ASL.
|
||||||
@ -825,9 +825,9 @@ do -- COORDINATE
|
|||||||
|
|
||||||
if DegreesCelcius then
|
if DegreesCelcius then
|
||||||
if Settings:IsMetric() then
|
if Settings:IsMetric() then
|
||||||
return string.format( " %-2.2f °C", DegreesCelcius )
|
return string.format( " %-2.2f °C", DegreesCelcius )
|
||||||
else
|
else
|
||||||
return string.format( " %-2.2f °F", UTILS.CelciusToFarenheit( DegreesCelcius ) )
|
return string.format( " %-2.2f °F", UTILS.CelciusToFarenheit( DegreesCelcius ) )
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return " no temperature"
|
return " no temperature"
|
||||||
@ -945,13 +945,13 @@ do -- COORDINATE
|
|||||||
--- Returns a text documenting the wind direction (from) and strength according the measurement system @{Settings}.
|
--- Returns a text documenting the wind direction (from) and strength according the measurement system @{Settings}.
|
||||||
-- The text will reflect the wind like this:
|
-- The text will reflect the wind like this:
|
||||||
--
|
--
|
||||||
-- - For Russian and European aircraft using the metric system - Wind direction in degrees (°) and wind speed in meters per second (mps).
|
-- - For Russian and European aircraft using the metric system - Wind direction in degrees (°) and wind speed in meters per second (mps).
|
||||||
-- - For Americain aircraft we link to the imperial system - Wind direction in degrees (°) and wind speed in knots per second (kps).
|
-- - For Americain aircraft we link to the imperial system - Wind direction in degrees (°) and wind speed in knots per second (kps).
|
||||||
--
|
--
|
||||||
-- A text containing a pressure will look like this:
|
-- A text containing a pressure will look like this:
|
||||||
--
|
--
|
||||||
-- - `Wind: %n ° at n.d mps`
|
-- - `Wind: %n ° at n.d mps`
|
||||||
-- - `Wind: %n ° at n.d kps`
|
-- - `Wind: %n ° at n.d kps`
|
||||||
--
|
--
|
||||||
-- @param #COORDINATE self
|
-- @param #COORDINATE self
|
||||||
-- @param height (Optional) parameter specifying the height ASL. The minimum height will be always be the land height since the wind is zero below the ground.
|
-- @param height (Optional) parameter specifying the height ASL. The minimum height will be always be the land height since the wind is zero below the ground.
|
||||||
@ -964,9 +964,9 @@ do -- COORDINATE
|
|||||||
|
|
||||||
if Direction and Strength then
|
if Direction and Strength then
|
||||||
if Settings:IsMetric() then
|
if Settings:IsMetric() then
|
||||||
return string.format( " %d ° at %3.2f mps", Direction, UTILS.MpsToKmph( Strength ) )
|
return string.format( " %d ° at %3.2f mps", Direction, UTILS.MpsToKmph( Strength ) )
|
||||||
else
|
else
|
||||||
return string.format( " %d ° at %3.2f kps", Direction, UTILS.MpsToKnots( Strength ) )
|
return string.format( " %d ° at %3.2f kps", Direction, UTILS.MpsToKnots( Strength ) )
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return " no wind"
|
return " no wind"
|
||||||
@ -998,7 +998,7 @@ do -- COORDINATE
|
|||||||
|
|
||||||
local AngleDegrees = UTILS.Round( UTILS.ToDegree( AngleRadians ), Precision )
|
local AngleDegrees = UTILS.Round( UTILS.ToDegree( AngleRadians ), Precision )
|
||||||
|
|
||||||
local s = string.format( '%03d°', AngleDegrees )
|
local s = string.format( '%03d°', AngleDegrees )
|
||||||
|
|
||||||
return s
|
return s
|
||||||
end
|
end
|
||||||
@ -1085,7 +1085,7 @@ do -- COORDINATE
|
|||||||
function COORDINATE:GetHeadingText( Settings )
|
function COORDINATE:GetHeadingText( Settings )
|
||||||
local Heading = self:GetHeading()
|
local Heading = self:GetHeading()
|
||||||
if Heading then
|
if Heading then
|
||||||
return string.format( " bearing %3d°", Heading )
|
return string.format( " bearing %3d°", Heading )
|
||||||
else
|
else
|
||||||
return " bearing unknown"
|
return " bearing unknown"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -153,12 +153,12 @@ do -- DETECTION_BASE
|
|||||||
-- Upon a **visual** detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.
|
-- Upon a **visual** detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.
|
||||||
-- A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.
|
-- A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.
|
||||||
--
|
--
|
||||||
-- A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.
|
-- A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.
|
||||||
--
|
--
|
||||||
-- For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like:
|
-- For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like:
|
||||||
-- 0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%
|
-- 0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%
|
||||||
--
|
--
|
||||||
-- Use the method @{Functional.Detection#DETECTION_BASE.SetAlphaAngleProbability}() to set the probability factor if 0°.
|
-- Use the method @{Functional.Detection#DETECTION_BASE.SetAlphaAngleProbability}() to set the probability factor if 0°.
|
||||||
--
|
--
|
||||||
-- ### Cloudy Zones detection probability
|
-- ### Cloudy Zones detection probability
|
||||||
--
|
--
|
||||||
@ -1155,10 +1155,10 @@ do -- DETECTION_BASE
|
|||||||
--- Upon a **visual** detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.
|
--- Upon a **visual** detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.
|
||||||
-- A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.
|
-- A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.
|
||||||
--
|
--
|
||||||
-- A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.
|
-- A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.
|
||||||
--
|
--
|
||||||
-- For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like:
|
-- For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like:
|
||||||
-- 0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%
|
-- 0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%
|
||||||
-- @param #DETECTION_BASE self
|
-- @param #DETECTION_BASE self
|
||||||
-- @param AlphaAngleProbability The probability factor.
|
-- @param AlphaAngleProbability The probability factor.
|
||||||
-- @return #DETECTION_BASE self
|
-- @return #DETECTION_BASE self
|
||||||
|
|||||||
@ -791,7 +791,7 @@ function FOX:onafterMissileLaunch(From, Event, To, missile)
|
|||||||
if (missile.targetPlayer and player.unitname==missile.targetPlayer.unitname) or (distance<missile.missileRange) then
|
if (missile.targetPlayer and player.unitname==missile.targetPlayer.unitname) or (distance<missile.missileRange) then
|
||||||
|
|
||||||
-- Inform player.
|
-- Inform player.
|
||||||
local text=string.format("Missile launch detected! Distance %.1f NM, bearing %03d°.", UTILS.MetersToNM(distance), bearing)
|
local text=string.format("Missile launch detected! Distance %.1f NM, bearing %03d°.", UTILS.MetersToNM(distance), bearing)
|
||||||
|
|
||||||
-- Say notching headings.
|
-- Say notching headings.
|
||||||
BASE:ScheduleOnce(5, FOX._SayNotchingHeadings, self, player, missile.weapon)
|
BASE:ScheduleOnce(5, FOX._SayNotchingHeadings, self, player, missile.weapon)
|
||||||
@ -988,7 +988,7 @@ function FOX:onafterMissileLaunch(From, Event, To, missile)
|
|||||||
local eta=distance/missileVelocity
|
local eta=distance/missileVelocity
|
||||||
|
|
||||||
-- Debug distance check.
|
-- Debug distance check.
|
||||||
self:I(self.lid..string.format("Missile %s Target %s: Distance = %.1f m, v=%.1f m/s, bearing=%03d°, ETA=%.1f sec", missile.missileType, target:GetName(), distance, missileVelocity, bearing, eta))
|
self:I(self.lid..string.format("Missile %s Target %s: Distance = %.1f m, v=%.1f m/s, bearing=%03d°, ETA=%.1f sec", missile.missileType, target:GetName(), distance, missileVelocity, bearing, eta))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Distroy missile if it's getting too close.
|
-- Distroy missile if it's getting too close.
|
||||||
@ -1696,7 +1696,7 @@ function FOX:_SayNotchingHeadings(playerData, weapon)
|
|||||||
local nr, nl=self:_GetNotchingHeadings(weapon)
|
local nr, nl=self:_GetNotchingHeadings(weapon)
|
||||||
|
|
||||||
if nr and nl then
|
if nr and nl then
|
||||||
local text=string.format("Notching heading %03d° or %03d°", nr, nl)
|
local text=string.format("Notching heading %03d° or %03d°", nr, nl)
|
||||||
MESSAGE:New(text, 5, "FOX"):ToClient(playerData.client)
|
MESSAGE:New(text, 5, "FOX"):ToClient(playerData.client)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1707,8 +1707,8 @@ end
|
|||||||
--- Returns the unit of a player and the player name. If the unit does not belong to a player, nil is returned.
|
--- Returns the unit of a player and the player name. If the unit does not belong to a player, nil is returned.
|
||||||
-- @param #FOX self
|
-- @param #FOX self
|
||||||
-- @param DCS#Weapon weapon The weapon.
|
-- @param DCS#Weapon weapon The weapon.
|
||||||
-- @return #number Notching heading right, i.e. missile heading +90°.
|
-- @return #number Notching heading right, i.e. missile heading +90°.
|
||||||
-- @return #number Notching heading left, i.e. missile heading -90°.
|
-- @return #number Notching heading left, i.e. missile heading -90°.
|
||||||
function FOX:_GetNotchingHeadings(weapon)
|
function FOX:_GetNotchingHeadings(weapon)
|
||||||
|
|
||||||
if weapon then
|
if weapon then
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
-- ## Features:
|
-- ## Features:
|
||||||
--
|
--
|
||||||
-- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
|
-- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
|
||||||
-- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range <EFBFBD>
|
-- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range °
|
||||||
-- * Provide alerts when a missile would have killed your aircraft.
|
-- * Provide alerts when a missile would have killed your aircraft.
|
||||||
-- * Provide alerts when the missile self destructs.
|
-- * Provide alerts when the missile self destructs.
|
||||||
-- * Enable / Disable and Configure the Missile Trainer using the various menu options.
|
-- * Enable / Disable and Configure the Missile Trainer using the various menu options.
|
||||||
|
|||||||
@ -742,9 +742,9 @@ function PSEUDOATC:ReportWeather(GID, UID, position, location)
|
|||||||
local T=position:GetTemperature()
|
local T=position:GetTemperature()
|
||||||
|
|
||||||
-- Correct unit system.
|
-- Correct unit system.
|
||||||
local _T=string.format('%d°F', UTILS.CelciusToFarenheit(T))
|
local _T=string.format('%d°F', UTILS.CelciusToFarenheit(T))
|
||||||
if settings:IsMetric() then
|
if settings:IsMetric() then
|
||||||
_T=string.format('%d°C', T)
|
_T=string.format('%d°C', T)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Message text.
|
-- Message text.
|
||||||
@ -757,7 +757,7 @@ function PSEUDOATC:ReportWeather(GID, UID, position, location)
|
|||||||
local Bn,Bd=UTILS.BeaufortScale(Vel)
|
local Bn,Bd=UTILS.BeaufortScale(Vel)
|
||||||
|
|
||||||
-- Formatted wind direction.
|
-- Formatted wind direction.
|
||||||
local Ds = string.format('%03d°', Dir)
|
local Ds = string.format('%03d°', Dir)
|
||||||
|
|
||||||
-- Velocity in player units.
|
-- Velocity in player units.
|
||||||
local Vs=string.format("%.1f knots", UTILS.MpsToKnots(Vel))
|
local Vs=string.format("%.1f knots", UTILS.MpsToKnots(Vel))
|
||||||
@ -793,7 +793,7 @@ function PSEUDOATC:ReportBR(GID, UID, position, location)
|
|||||||
local range=coord:Get2DDistance(position)
|
local range=coord:Get2DDistance(position)
|
||||||
|
|
||||||
-- Bearing string.
|
-- Bearing string.
|
||||||
local Bs=string.format('%03d°', angle)
|
local Bs=string.format('%03d°', angle)
|
||||||
|
|
||||||
-- Settings.
|
-- Settings.
|
||||||
local settings=_DATABASE:GetPlayerSettings(self.group[GID].player[UID].playername) or _SETTINGS --Core.Settings#SETTINGS
|
local settings=_DATABASE:GetPlayerSettings(self.group[GID].player[UID].playername) or _SETTINGS --Core.Settings#SETTINGS
|
||||||
|
|||||||
@ -5371,7 +5371,7 @@ function RAT:_ModifySpawnTemplate(waypoints, livery, spawnplace, departure, take
|
|||||||
|
|
||||||
if spawnonground then
|
if spawnonground then
|
||||||
|
|
||||||
-- Sh<EFBFBD>ps and FARPS seem to have a build in queue.
|
-- Sh°ps and FARPS seem to have a build in queue.
|
||||||
if spawnonship or spawnonfarp or spawnonrunway or automatic then
|
if spawnonship or spawnonfarp or spawnonrunway or automatic then
|
||||||
self:T(RAT.id..string.format("RAT group %s spawning at farp, ship or runway %s.", self.alias, departure:GetName()))
|
self:T(RAT.id..string.format("RAT group %s spawning at farp, ship or runway %s.", self.alias, departure:GetName()))
|
||||||
|
|
||||||
|
|||||||
@ -2009,7 +2009,7 @@ function RANGE:onafterImpact(From, Event, To, result, player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Send message to player.
|
-- Send message to player.
|
||||||
local text=string.format("%s, impact %03d° for %d ft", player.playername, result.radial, UTILS.MetersToFeet(result.distance))
|
local text=string.format("%s, impact %03d° for %d ft", player.playername, result.radial, UTILS.MetersToFeet(result.distance))
|
||||||
if targetname then
|
if targetname then
|
||||||
text=text..string.format(" from bulls of target %s.")
|
text=text..string.format(" from bulls of target %s.")
|
||||||
else
|
else
|
||||||
@ -2364,11 +2364,11 @@ function RANGE:_DisplayMyBombingResults(_unitName)
|
|||||||
local result=_result --#RANGE.BombResult
|
local result=_result --#RANGE.BombResult
|
||||||
|
|
||||||
-- Message with name, weapon and distance.
|
-- Message with name, weapon and distance.
|
||||||
_message = _message.."\n"..string.format("[%d] %d m %03d° - %s - %s - %s hit", i, result.distance, result.radial, result.name, result.weapon, result.quality)
|
_message = _message.."\n"..string.format("[%d] %d m %03d° - %s - %s - %s hit", i, result.distance, result.radial, result.name, result.weapon, result.quality)
|
||||||
|
|
||||||
-- Store best/first result.
|
-- Store best/first result.
|
||||||
if _bestMsg == "" then
|
if _bestMsg == "" then
|
||||||
_bestMsg = string.format("%d m %03d° - %s - %s - %s hit", result.distance, result.radial, result.name, result.weapon, result.quality)
|
_bestMsg = string.format("%d m %03d° - %s - %s - %s hit", result.distance, result.radial, result.name, result.weapon, result.quality)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Best 10 runs only.
|
-- Best 10 runs only.
|
||||||
@ -2476,7 +2476,7 @@ function RANGE:_DisplayRangeInfo(_unitname)
|
|||||||
local range=coord:Get2DDistance(position)
|
local range=coord:Get2DDistance(position)
|
||||||
|
|
||||||
-- Bearing string.
|
-- Bearing string.
|
||||||
local Bs=string.format('%03d°', angle)
|
local Bs=string.format('%03d°', angle)
|
||||||
|
|
||||||
local texthit
|
local texthit
|
||||||
if self.PlayerSettings[playername].flaredirecthits then
|
if self.PlayerSettings[playername].flaredirecthits then
|
||||||
@ -2607,7 +2607,7 @@ function RANGE:_DisplayStrafePits(_unitname)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local mycoord=coord:ToStringA2G(_unit, _settings)
|
local mycoord=coord:ToStringA2G(_unit, _settings)
|
||||||
_text=_text..string.format("\n- %s: heading %03d°\n%s",_strafepit.name, heading, mycoord)
|
_text=_text..string.format("\n- %s: heading %03d°\n%s",_strafepit.name, heading, mycoord)
|
||||||
end
|
end
|
||||||
|
|
||||||
self:_DisplayMessageToGroup(_unit,_text, nil, true, true)
|
self:_DisplayMessageToGroup(_unit,_text, nil, true, true)
|
||||||
@ -2644,18 +2644,18 @@ function RANGE:_DisplayRangeWeather(_unitname)
|
|||||||
-- Get Beaufort wind scale.
|
-- Get Beaufort wind scale.
|
||||||
local Bn,Bd=UTILS.BeaufortScale(Ws)
|
local Bn,Bd=UTILS.BeaufortScale(Ws)
|
||||||
|
|
||||||
local WD=string.format('%03d°', Wd)
|
local WD=string.format('%03d°', Wd)
|
||||||
local Ts=string.format("%d°C",T)
|
local Ts=string.format("%d°C",T)
|
||||||
|
|
||||||
local hPa2inHg=0.0295299830714
|
local hPa2inHg=0.0295299830714
|
||||||
local hPa2mmHg=0.7500615613030
|
local hPa2mmHg=0.7500615613030
|
||||||
|
|
||||||
local settings=_DATABASE:GetPlayerSettings(playername) or _SETTINGS --Core.Settings#SETTINGS
|
local settings=_DATABASE:GetPlayerSettings(playername) or _SETTINGS --Core.Settings#SETTINGS
|
||||||
local tT=string.format("%d°C",T)
|
local tT=string.format("%d°C",T)
|
||||||
local tW=string.format("%.1f m/s", Ws)
|
local tW=string.format("%.1f m/s", Ws)
|
||||||
local tP=string.format("%.1f mmHg", P*hPa2mmHg)
|
local tP=string.format("%.1f mmHg", P*hPa2mmHg)
|
||||||
if settings:IsImperial() then
|
if settings:IsImperial() then
|
||||||
--tT=string.format("%d°F", UTILS.CelciusToFarenheit(T))
|
--tT=string.format("%d°F", UTILS.CelciusToFarenheit(T))
|
||||||
tW=string.format("%.1f knots", UTILS.MpsToKnots(Ws))
|
tW=string.format("%.1f knots", UTILS.MpsToKnots(Ws))
|
||||||
tP=string.format("%.2f inHg", P*hPa2inHg)
|
tP=string.format("%.2f inHg", P*hPa2inHg)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -383,13 +383,13 @@ ATIS.Alphabet = {
|
|||||||
|
|
||||||
--- Runway correction for converting true to magnetic heading.
|
--- Runway correction for converting true to magnetic heading.
|
||||||
-- @type ATIS.RunwayM2T
|
-- @type ATIS.RunwayM2T
|
||||||
-- @field #number Caucasus 0° (East).
|
-- @field #number Caucasus 0° (East).
|
||||||
-- @field #number Nevada +12° (East).
|
-- @field #number Nevada +12° (East).
|
||||||
-- @field #number Normandy -10° (West).
|
-- @field #number Normandy -10° (West).
|
||||||
-- @field #number PersianGulf +2° (East).
|
-- @field #number PersianGulf +2° (East).
|
||||||
-- @field #number TheChannel -10° (West).
|
-- @field #number TheChannel -10° (West).
|
||||||
-- @field #number Syria +5° (East).
|
-- @field #number Syria +5° (East).
|
||||||
-- @field #number MarianaIslands +2° (East).
|
-- @field #number MarianaIslands +2° (East).
|
||||||
ATIS.RunwayM2T={
|
ATIS.RunwayM2T={
|
||||||
Caucasus=0,
|
Caucasus=0,
|
||||||
Nevada=12,
|
Nevada=12,
|
||||||
@ -839,9 +839,9 @@ function ATIS:SetMapMarks(switch)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set magnetic runway headings as depicted on the runway, *e.g.* "13" for 130° or "25L" for the left runway with magnetic heading 250°.
|
--- Set magnetic runway headings as depicted on the runway, *e.g.* "13" for 130° or "25L" for the left runway with magnetic heading 250°.
|
||||||
-- @param #ATIS self
|
-- @param #ATIS self
|
||||||
-- @param #table headings Magnetic headings. Inverse (-180°) headings are added automatically. You only need to specify one heading per runway direction. "L"eft and "R" right can also be appended.
|
-- @param #table headings Magnetic headings. Inverse (-180°) headings are added automatically. You only need to specify one heading per runway direction. "L"eft and "R" right can also be appended.
|
||||||
-- @return #ATIS self
|
-- @return #ATIS self
|
||||||
function ATIS:SetRunwayHeadingsMagnetic(headings)
|
function ATIS:SetRunwayHeadingsMagnetic(headings)
|
||||||
|
|
||||||
@ -974,12 +974,12 @@ end
|
|||||||
--
|
--
|
||||||
-- To get *true* from *magnetic* heading one has to add easterly or substract westerly variation, e.g
|
-- To get *true* from *magnetic* heading one has to add easterly or substract westerly variation, e.g
|
||||||
--
|
--
|
||||||
-- A magnetic heading of 180° corresponds to a true heading of
|
-- A magnetic heading of 180° corresponds to a true heading of
|
||||||
--
|
--
|
||||||
-- * 186° on the Caucaus map
|
-- * 186° on the Caucaus map
|
||||||
-- * 192° on the Nevada map
|
-- * 192° on the Nevada map
|
||||||
-- * 170° on the Normany map
|
-- * 170° on the Normany map
|
||||||
-- * 182° on the Persian Gulf map
|
-- * 182° on the Persian Gulf map
|
||||||
--
|
--
|
||||||
-- Likewise, to convert *true* into *magnetic* heading, one has to substract easterly and add westerly variation.
|
-- Likewise, to convert *true* into *magnetic* heading, one has to substract easterly and add westerly variation.
|
||||||
--
|
--
|
||||||
@ -1314,7 +1314,7 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
local g= 9.80665 --[m/s^2]
|
local g= 9.80665 --[m/s^2]
|
||||||
local M= 0.0289644 --[kg/mol]
|
local M= 0.0289644 --[kg/mol]
|
||||||
local T0=coord:GetTemperature(0)+273.15 --[K] Temp at sea level.
|
local T0=coord:GetTemperature(0)+273.15 --[K] Temp at sea level.
|
||||||
local TS=288.15 -- Standard Temperature assumed by Altimeter is 15°C
|
local TS=288.15 -- Standard Temperature assumed by Altimeter is 15°C
|
||||||
local q=qnh*100
|
local q=qnh*100
|
||||||
|
|
||||||
-- Calculate Pressure.
|
-- Calculate Pressure.
|
||||||
@ -1451,13 +1451,13 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
--- Temperature and Dew Point ---
|
--- Temperature and Dew Point ---
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
-- Temperature in °C.
|
-- Temperature in °C.
|
||||||
local temperature=coord:GetTemperature(height+5)
|
local temperature=coord:GetTemperature(height+5)
|
||||||
|
|
||||||
-- Dew point in °C.
|
-- Dew point in °C.
|
||||||
local dewpoint=temperature-(100-self.relHumidity)/5
|
local dewpoint=temperature-(100-self.relHumidity)/5
|
||||||
|
|
||||||
-- Convert to °F.
|
-- Convert to °F.
|
||||||
if self.TDegF then
|
if self.TDegF then
|
||||||
temperature=UTILS.CelciusToFarenheit(temperature)
|
temperature=UTILS.CelciusToFarenheit(temperature)
|
||||||
dewpoint=UTILS.CelciusToFarenheit(dewpoint)
|
dewpoint=UTILS.CelciusToFarenheit(dewpoint)
|
||||||
@ -1901,15 +1901,15 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
-- Temperature
|
-- Temperature
|
||||||
if self.TDegF then
|
if self.TDegF then
|
||||||
if temperature<0 then
|
if temperature<0 then
|
||||||
subtitle=string.format("Temperature -%s °F", TEMPERATURE)
|
subtitle=string.format("Temperature -%s °F", TEMPERATURE)
|
||||||
else
|
else
|
||||||
subtitle=string.format("Temperature %s °F", TEMPERATURE)
|
subtitle=string.format("Temperature %s °F", TEMPERATURE)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if temperature<0 then
|
if temperature<0 then
|
||||||
subtitle=string.format("Temperature -%s °C", TEMPERATURE)
|
subtitle=string.format("Temperature -%s °C", TEMPERATURE)
|
||||||
else
|
else
|
||||||
subtitle=string.format("Temperature %s °C", TEMPERATURE)
|
subtitle=string.format("Temperature %s °C", TEMPERATURE)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local _TEMPERATURE=subtitle
|
local _TEMPERATURE=subtitle
|
||||||
@ -1930,15 +1930,15 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
-- Dew point
|
-- Dew point
|
||||||
if self.TDegF then
|
if self.TDegF then
|
||||||
if dewpoint<0 then
|
if dewpoint<0 then
|
||||||
subtitle=string.format("Dew point -%s °F", DEWPOINT)
|
subtitle=string.format("Dew point -%s °F", DEWPOINT)
|
||||||
else
|
else
|
||||||
subtitle=string.format("Dew point %s °F", DEWPOINT)
|
subtitle=string.format("Dew point %s °F", DEWPOINT)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if dewpoint<0 then
|
if dewpoint<0 then
|
||||||
subtitle=string.format("Dew point -%s °C", DEWPOINT)
|
subtitle=string.format("Dew point -%s °C", DEWPOINT)
|
||||||
else
|
else
|
||||||
subtitle=string.format("Dew point %s °C", DEWPOINT)
|
subtitle=string.format("Dew point %s °C", DEWPOINT)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local _DEWPOINT=subtitle
|
local _DEWPOINT=subtitle
|
||||||
@ -2276,8 +2276,8 @@ function ATIS:onafterReport(From, Event, To, Text)
|
|||||||
|
|
||||||
-- Replace other stuff.
|
-- Replace other stuff.
|
||||||
local text=string.gsub(text, "SM", "statute miles")
|
local text=string.gsub(text, "SM", "statute miles")
|
||||||
local text=string.gsub(text, "°C", "degrees Celsius")
|
local text=string.gsub(text, "°C", "degrees Celsius")
|
||||||
local text=string.gsub(text, "°F", "degrees Fahrenheit")
|
local text=string.gsub(text, "°F", "degrees Fahrenheit")
|
||||||
local text=string.gsub(text, "inHg", "inches of Mercury")
|
local text=string.gsub(text, "inHg", "inches of Mercury")
|
||||||
local text=string.gsub(text, "mmHg", "millimeters of Mercury")
|
local text=string.gsub(text, "mmHg", "millimeters of Mercury")
|
||||||
local text=string.gsub(text, "hPa", "hecto Pascals")
|
local text=string.gsub(text, "hPa", "hecto Pascals")
|
||||||
@ -2397,7 +2397,7 @@ end
|
|||||||
--- Get runway from user supplied magnetic heading.
|
--- Get runway from user supplied magnetic heading.
|
||||||
-- @param #ATIS self
|
-- @param #ATIS self
|
||||||
-- @param #number windfrom Wind direction (from) in degrees.
|
-- @param #number windfrom Wind direction (from) in degrees.
|
||||||
-- @return #string Runway magnetic heading divided by ten (and rounded). Eg, "13" for 130°.
|
-- @return #string Runway magnetic heading divided by ten (and rounded). Eg, "13" for 130°.
|
||||||
function ATIS:GetMagneticRunway(windfrom)
|
function ATIS:GetMagneticRunway(windfrom)
|
||||||
|
|
||||||
local diffmin=nil
|
local diffmin=nil
|
||||||
@ -2440,7 +2440,7 @@ function ATIS:GetNavPoint(navpoints, runway, left)
|
|||||||
local navL=self:GetRunwayLR(nav.runway)
|
local navL=self:GetRunwayLR(nav.runway)
|
||||||
local hdgD=UTILS.HdgDiff(navy,rwyy)
|
local hdgD=UTILS.HdgDiff(navy,rwyy)
|
||||||
|
|
||||||
if hdgD<=15 then --We allow an error of +-15° here.
|
if hdgD<=15 then --We allow an error of +-15° here.
|
||||||
if navL==nil or (navL==true and left==true) or (navL==false and left==false) then
|
if navL==nil or (navL==true and left==true) or (navL==false and left==false) then
|
||||||
return nav
|
return nav
|
||||||
end
|
end
|
||||||
|
|||||||
@ -725,7 +725,7 @@
|
|||||||
--
|
--
|
||||||
-- The same holds true after the recovery window closes. The carrier will head back to the place where he left its assigned route and resume the path to the next waypoint defined in the mission editor.
|
-- The same holds true after the recovery window closes. The carrier will head back to the place where he left its assigned route and resume the path to the next waypoint defined in the mission editor.
|
||||||
--
|
--
|
||||||
-- Note that the carrier will only head into the wind, if the wind direction is different by more than 5° from the current heading of the carrier (the angled runway, if any, fis taken into account here).
|
-- Note that the carrier will only head into the wind, if the wind direction is different by more than 5° from the current heading of the carrier (the angled runway, if any, fis taken into account here).
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
@ -864,10 +864,10 @@
|
|||||||
--
|
--
|
||||||
-- The graph displays the lineup error (LUE) as a function of the distance to the carrier.
|
-- The graph displays the lineup error (LUE) as a function of the distance to the carrier.
|
||||||
--
|
--
|
||||||
-- The pilot approaches the carrier from the port side, LUE>0°, at a distance of ~1 NM.
|
-- The pilot approaches the carrier from the port side, LUE>0°, at a distance of ~1 NM.
|
||||||
-- At the beginning of the groove (X), he significantly overshoots to the starboard side (LUE<5°).
|
-- At the beginning of the groove (X), he significantly overshoots to the starboard side (LUE<5°).
|
||||||
-- In the middle (IM), he performs good corrections and smoothly reduces the lineup error.
|
-- In the middle (IM), he performs good corrections and smoothly reduces the lineup error.
|
||||||
-- Finally, at a distance of ~0.3 NM (IC) he has corrected his lineup with the runway to a reasonable level, |LUE|<0.5°.
|
-- Finally, at a distance of ~0.3 NM (IC) he has corrected his lineup with the runway to a reasonable level, |LUE|<0.5°.
|
||||||
--
|
--
|
||||||
-- ## Glideslope Error
|
-- ## Glideslope Error
|
||||||
--
|
--
|
||||||
@ -876,7 +876,7 @@
|
|||||||
-- The graph displays the glideslope error (GSE) as a function of the distance to the carrier.
|
-- The graph displays the glideslope error (GSE) as a function of the distance to the carrier.
|
||||||
--
|
--
|
||||||
-- In this case the pilot already enters the groove (X) below the optimal glideslope. He is not able to correct his height in the IM part and
|
-- In this case the pilot already enters the groove (X) below the optimal glideslope. He is not able to correct his height in the IM part and
|
||||||
-- stays significantly too low. In close, he performs a harsh correction to gain altitude and ends up even slightly too high (GSE>0.5°).
|
-- stays significantly too low. In close, he performs a harsh correction to gain altitude and ends up even slightly too high (GSE>0.5°).
|
||||||
-- At his point further corrections are necessary.
|
-- At his point further corrections are necessary.
|
||||||
--
|
--
|
||||||
-- ## Angle of Attack
|
-- ## Angle of Attack
|
||||||
@ -2438,7 +2438,7 @@ end
|
|||||||
-- @param #number duration Default duration of the recovery in minutes. Default 30 min.
|
-- @param #number duration Default duration of the recovery in minutes. Default 30 min.
|
||||||
-- @param #number windondeck Default wind on deck in knots. Default 25 knots.
|
-- @param #number windondeck Default wind on deck in knots. Default 25 knots.
|
||||||
-- @param #boolean uturn U-turn after recovery window closes on=true or off=false/nil. Default off.
|
-- @param #boolean uturn U-turn after recovery window closes on=true or off=false/nil. Default off.
|
||||||
-- @param #number offset Relative Marshal radial in degrees for Case II/III recoveries. Default 30°.
|
-- @param #number offset Relative Marshal radial in degrees for Case II/III recoveries. Default 30°.
|
||||||
-- @return #AIRBOSS self
|
-- @return #AIRBOSS self
|
||||||
function AIRBOSS:SetMenuRecovery(duration, windondeck, uturn, offset)
|
function AIRBOSS:SetMenuRecovery(duration, windondeck, uturn, offset)
|
||||||
|
|
||||||
@ -3878,7 +3878,7 @@ function AIRBOSS:_CheckRecoveryTimes()
|
|||||||
-- Check if time is less than 5 minutes.
|
-- Check if time is less than 5 minutes.
|
||||||
if nextwindow.WIND and nextwindow.START-time<self.dTturn and not self.turnintowind then
|
if nextwindow.WIND and nextwindow.START-time<self.dTturn and not self.turnintowind then
|
||||||
|
|
||||||
-- Check that wind is blowing from a direction > 5° different from the current heading.
|
-- Check that wind is blowing from a direction > 5° different from the current heading.
|
||||||
local hdg=self:GetHeading()
|
local hdg=self:GetHeading()
|
||||||
local wind=self:GetHeadingIntoWind()
|
local wind=self:GetHeadingIntoWind()
|
||||||
local delta=self:_GetDeltaHeading(hdg, wind)
|
local delta=self:_GetDeltaHeading(hdg, wind)
|
||||||
@ -3896,7 +3896,7 @@ function AIRBOSS:_CheckRecoveryTimes()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Debug info
|
--Debug info
|
||||||
self:T(self.lid..string.format("Heading=%03d°, Wind=%03d° %.1f kts, Delta=%03d° ==> U-turn=%s", hdg, wind,UTILS.MpsToKnots(vwind), delta, tostring(uturn)))
|
self:T(self.lid..string.format("Heading=%03d°, Wind=%03d° %.1f kts, Delta=%03d° ==> U-turn=%s", hdg, wind,UTILS.MpsToKnots(vwind), delta, tostring(uturn)))
|
||||||
|
|
||||||
-- Time into the wind 1 day or if longer recovery time + the 5 min early.
|
-- Time into the wind 1 day or if longer recovery time + the 5 min early.
|
||||||
local t=math.max(nextwindow.STOP-nextwindow.START+self.dTturn, 60*60*24)
|
local t=math.max(nextwindow.STOP-nextwindow.START+self.dTturn, 60*60*24)
|
||||||
@ -6933,7 +6933,7 @@ function AIRBOSS:_AddMarshalGroup(flight, stack)
|
|||||||
-- For case 1 we want the BRC but above routine return FB.
|
-- For case 1 we want the BRC but above routine return FB.
|
||||||
radial=self:GetBRC()
|
radial=self:GetBRC()
|
||||||
end
|
end
|
||||||
local text=string.format("Select TACAN %03d°, channel %d%s (%s)", radial, self.TACANchannel,self.TACANmode, self.TACANmorse)
|
local text=string.format("Select TACAN %03d°, channel %d%s (%s)", radial, self.TACANchannel,self.TACANmode, self.TACANmorse)
|
||||||
self:MessageToPlayer(flight, text, nil, "")
|
self:MessageToPlayer(flight, text, nil, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -9346,7 +9346,7 @@ function AIRBOSS:_Initial(playerData)
|
|||||||
-- Hook down for students.
|
-- Hook down for students.
|
||||||
if playerData.difficulty==AIRBOSS.Difficulty.EASY and playerData.actype~=AIRBOSS.AircraftCarrier.AV8B then
|
if playerData.difficulty==AIRBOSS.Difficulty.EASY and playerData.actype~=AIRBOSS.AircraftCarrier.AV8B then
|
||||||
if playerData.actype==AIRBOSS.AircraftCarrier.F14A or playerData.actype==AIRBOSS.AircraftCarrier.F14B then
|
if playerData.actype==AIRBOSS.AircraftCarrier.F14A or playerData.actype==AIRBOSS.AircraftCarrier.F14B then
|
||||||
hint=hint.." - Hook down, SAS on, Wing Sweep 68°!"
|
hint=hint.." - Hook down, SAS on, Wing Sweep 68°!"
|
||||||
else
|
else
|
||||||
hint=hint.." - Hook down!"
|
hint=hint.." - Hook down!"
|
||||||
end
|
end
|
||||||
@ -11331,15 +11331,15 @@ function AIRBOSS:_AttitudeMonitor(playerData)
|
|||||||
|
|
||||||
-- Output
|
-- Output
|
||||||
local text=string.format("Pattern step: %s", step)
|
local text=string.format("Pattern step: %s", step)
|
||||||
text=text..string.format("\nAoA=%.1f° = %.1f Units | |V|=%.1f knots", aoa, self:_AoADeg2Units(playerData, aoa), UTILS.MpsToKnots(vabs))
|
text=text..string.format("\nAoA=%.1f° = %.1f Units | |V|=%.1f knots", aoa, self:_AoADeg2Units(playerData, aoa), UTILS.MpsToKnots(vabs))
|
||||||
if self.Debug then
|
if self.Debug then
|
||||||
-- Velocity vector.
|
-- Velocity vector.
|
||||||
text=text..string.format("\nVx=%.1f Vy=%.1f Vz=%.1f m/s", velo.x, velo.y, velo.z)
|
text=text..string.format("\nVx=%.1f Vy=%.1f Vz=%.1f m/s", velo.x, velo.y, velo.z)
|
||||||
--Wind vector.
|
--Wind vector.
|
||||||
text=text..string.format("\nWind Vx=%.1f Vy=%.1f Vz=%.1f m/s", wind.x, wind.y, wind.z)
|
text=text..string.format("\nWind Vx=%.1f Vy=%.1f Vz=%.1f m/s", wind.x, wind.y, wind.z)
|
||||||
end
|
end
|
||||||
text=text..string.format("\nPitch=%.1f° | Roll=%.1f° | Yaw=%.1f°", pitch, roll, yaw)
|
text=text..string.format("\nPitch=%.1f° | Roll=%.1f° | Yaw=%.1f°", pitch, roll, yaw)
|
||||||
text=text..string.format("\nClimb Angle=%.1f° | Rate=%d ft/min", unit:GetClimbAngle(), velo.y*196.85)
|
text=text..string.format("\nClimb Angle=%.1f° | Rate=%d ft/min", unit:GetClimbAngle(), velo.y*196.85)
|
||||||
local dist=self:_GetOptLandingCoordinate():Get3DDistance(playerData.unit)
|
local dist=self:_GetOptLandingCoordinate():Get3DDistance(playerData.unit)
|
||||||
-- Get player velocity in km/h.
|
-- Get player velocity in km/h.
|
||||||
local vplayer=playerData.unit:GetVelocityKMH()
|
local vplayer=playerData.unit:GetVelocityKMH()
|
||||||
@ -11360,14 +11360,14 @@ function AIRBOSS:_AttitudeMonitor(playerData)
|
|||||||
playerData.step==AIRBOSS.PatternStep.GROOVE_IW then
|
playerData.step==AIRBOSS.PatternStep.GROOVE_IW then
|
||||||
local lue=self:_Lineup(playerData.unit, true)
|
local lue=self:_Lineup(playerData.unit, true)
|
||||||
local gle=self:_Glideslope(playerData.unit)
|
local gle=self:_Glideslope(playerData.unit)
|
||||||
text=text..string.format("\nGamma=%.1f° | Rho=%.1f°", relhead, phi)
|
text=text..string.format("\nGamma=%.1f° | Rho=%.1f°", relhead, phi)
|
||||||
text=text..string.format("\nLineUp=%.2f° | GlideSlope=%.2f° | AoA=%.1f Units", lue, gle, self:_AoADeg2Units(playerData, aoa))
|
text=text..string.format("\nLineUp=%.2f° | GlideSlope=%.2f° | AoA=%.1f Units", lue, gle, self:_AoADeg2Units(playerData, aoa))
|
||||||
local grade, points, analysis=self:_LSOgrade(playerData)
|
local grade, points, analysis=self:_LSOgrade(playerData)
|
||||||
text=text..string.format("\nTgroove=%.1f sec", self:_GetTimeInGroove(playerData))
|
text=text..string.format("\nTgroove=%.1f sec", self:_GetTimeInGroove(playerData))
|
||||||
text=text..string.format("\nGrade: %s %.1f PT - %s", grade, points, analysis)
|
text=text..string.format("\nGrade: %s %.1f PT - %s", grade, points, analysis)
|
||||||
else
|
else
|
||||||
text=text..string.format("\nR=%.2f NM | X=%d Z=%d m", UTILS.MetersToNM(rho), dx, dz)
|
text=text..string.format("\nR=%.2f NM | X=%d Z=%d m", UTILS.MetersToNM(rho), dx, dz)
|
||||||
text=text..string.format("\nGamma=%.1f° | Rho=%.1f°", relhead, phi)
|
text=text..string.format("\nGamma=%.1f° | Rho=%.1f°", relhead, phi)
|
||||||
end
|
end
|
||||||
|
|
||||||
MESSAGE:New(text, 1, nil , true):ToClient(playerData.client)
|
MESSAGE:New(text, 1, nil , true):ToClient(playerData.client)
|
||||||
@ -12695,7 +12695,7 @@ function AIRBOSS:_PlayerHint(playerData, delay, soundoff)
|
|||||||
if self.holdingoffset<0 then
|
if self.holdingoffset<0 then
|
||||||
turn="left"
|
turn="left"
|
||||||
end
|
end
|
||||||
hint=hint..string.format("\nTurn %s and select TACAN %03d°.", turn, radial)
|
hint=hint..string.format("\nTurn %s and select TACAN %03d°.", turn, radial)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -12704,7 +12704,7 @@ function AIRBOSS:_PlayerHint(playerData, delay, soundoff)
|
|||||||
if playerData.step==AIRBOSS.PatternStep.DIRTYUP then
|
if playerData.step==AIRBOSS.PatternStep.DIRTYUP then
|
||||||
if playerData.difficulty==AIRBOSS.Difficulty.EASY then
|
if playerData.difficulty==AIRBOSS.Difficulty.EASY then
|
||||||
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
|
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
|
||||||
hint=hint.."\nFAF! Checks completed. Nozzles 50°."
|
hint=hint.."\nFAF! Checks completed. Nozzles 50°."
|
||||||
else
|
else
|
||||||
--TODO: Tomcat?
|
--TODO: Tomcat?
|
||||||
hint=hint.."\nDirty up! Hook, gear and flaps down."
|
hint=hint.."\nDirty up! Hook, gear and flaps down."
|
||||||
@ -12773,14 +12773,14 @@ function AIRBOSS:_StepHint(playerData, step)
|
|||||||
-- Late break.
|
-- Late break.
|
||||||
if step==AIRBOSS.PatternStep.LATEBREAK then
|
if step==AIRBOSS.PatternStep.LATEBREAK then
|
||||||
if playerData.actype==AIRBOSS.AircraftCarrier.F14A or playerData.actype==AIRBOSS.AircraftCarrier.F14B then
|
if playerData.actype==AIRBOSS.AircraftCarrier.F14A or playerData.actype==AIRBOSS.AircraftCarrier.F14B then
|
||||||
hint=hint.."\nWing Sweep 20°, Gear DOWN < 280 KIAS."
|
hint=hint.."\nWing Sweep 20°, Gear DOWN < 280 KIAS."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Abeam.
|
-- Abeam.
|
||||||
if step==AIRBOSS.PatternStep.ABEAM then
|
if step==AIRBOSS.PatternStep.ABEAM then
|
||||||
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
|
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
|
||||||
hint=hint.."\nNozzles 50°-60°. Antiskid OFF. Lights OFF."
|
hint=hint.."\nNozzles 50°-60°. Antiskid OFF. Lights OFF."
|
||||||
elseif playerData.actype==AIRBOSS.AircraftCarrier.F14A or playerData.actype==AIRBOSS.AircraftCarrier.F14B then
|
elseif playerData.actype==AIRBOSS.AircraftCarrier.F14A or playerData.actype==AIRBOSS.AircraftCarrier.F14B then
|
||||||
hint=hint.."\nSlats/Flaps EXTENDED < 225 KIAS. DLC SELECTED. Auto Throttle IF DESIRED."
|
hint=hint.."\nSlats/Flaps EXTENDED < 225 KIAS. DLC SELECTED. Auto Throttle IF DESIRED."
|
||||||
else
|
else
|
||||||
@ -13215,7 +13215,7 @@ function AIRBOSS:_Debrief(playerData)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Re-enter message.
|
-- Re-enter message.
|
||||||
local text=string.format("fly heading %03d° for %d NM to re-enter the pattern.", heading, UTILS.MetersToNM(distance))
|
local text=string.format("fly heading %03d° for %d NM to re-enter the pattern.", heading, UTILS.MetersToNM(distance))
|
||||||
self:MessageToPlayer(playerData, text, "LSO", nil, nil, false, 5)
|
self:MessageToPlayer(playerData, text, "LSO", nil, nil, false, 5)
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -13411,9 +13411,9 @@ function AIRBOSS:_CheckCollisionCoord(coordto, coordfrom)
|
|||||||
|
|
||||||
local text=""
|
local text=""
|
||||||
if clear then
|
if clear then
|
||||||
text=string.format("Path into direction %03d° is clear for the next %.1f NM.", direction, UTILS.MetersToNM(d))
|
text=string.format("Path into direction %03d° is clear for the next %.1f NM.", direction, UTILS.MetersToNM(d))
|
||||||
else
|
else
|
||||||
text=string.format("Detected obstacle at distance %.1f NM into direction %03d°.", UTILS.MetersToNM(d), direction)
|
text=string.format("Detected obstacle at distance %.1f NM into direction %03d°.", UTILS.MetersToNM(d), direction)
|
||||||
end
|
end
|
||||||
self:T2(self.lid..text)
|
self:T2(self.lid..text)
|
||||||
|
|
||||||
@ -13473,7 +13473,7 @@ function AIRBOSS:_Pathfinder()
|
|||||||
local collision=self:_CheckFreePathToNextWP(fromcoord)
|
local collision=self:_CheckFreePathToNextWP(fromcoord)
|
||||||
|
|
||||||
-- Debug info.
|
-- Debug info.
|
||||||
self:T2(self.lid..string.format("Pathfinder d=%.1f m, direction=%03d°, collision=%s", distance, direction, tostring(collision)))
|
self:T2(self.lid..string.format("Pathfinder d=%.1f m, direction=%03d°, collision=%s", distance, direction, tostring(collision)))
|
||||||
|
|
||||||
-- If path is clear, we start a little detour.
|
-- If path is clear, we start a little detour.
|
||||||
if not collision then
|
if not collision then
|
||||||
@ -13907,7 +13907,7 @@ function AIRBOSS:_CheckPatternUpdate()
|
|||||||
-- Update if carrier moves by more than 2.5 NM.
|
-- Update if carrier moves by more than 2.5 NM.
|
||||||
local Dupdate=UTILS.NMToMeters(2.5)
|
local Dupdate=UTILS.NMToMeters(2.5)
|
||||||
|
|
||||||
-- Update if carrier turned by more than 5°.
|
-- Update if carrier turned by more than 5°.
|
||||||
local Hupdate=5
|
local Hupdate=5
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
@ -13941,7 +13941,7 @@ function AIRBOSS:_CheckPatternUpdate()
|
|||||||
-- Check if orientation changed.
|
-- Check if orientation changed.
|
||||||
local Hchange=false
|
local Hchange=false
|
||||||
if math.abs(deltaHeading)>=Hupdate then
|
if math.abs(deltaHeading)>=Hupdate then
|
||||||
self:T(self.lid..string.format("Carrier heading changed by %d°.", deltaHeading))
|
self:T(self.lid..string.format("Carrier heading changed by %d°.", deltaHeading))
|
||||||
Hchange=true
|
Hchange=true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -15642,7 +15642,7 @@ end
|
|||||||
function AIRBOSS:_MarshalCallNewFinalBearing(FB)
|
function AIRBOSS:_MarshalCallNewFinalBearing(FB)
|
||||||
|
|
||||||
-- Subtitle.
|
-- Subtitle.
|
||||||
local text=string.format("new final bearing %03d°.", FB)
|
local text=string.format("new final bearing %03d°.", FB)
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I(self.lid..text)
|
self:I(self.lid..text)
|
||||||
@ -15665,7 +15665,7 @@ end
|
|||||||
function AIRBOSS:_MarshalCallCarrierTurnTo(hdg)
|
function AIRBOSS:_MarshalCallCarrierTurnTo(hdg)
|
||||||
|
|
||||||
-- Subtitle.
|
-- Subtitle.
|
||||||
local text=string.format("carrier is now starting turn to heading %03d°.", hdg)
|
local text=string.format("carrier is now starting turn to heading %03d°.", hdg)
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I(self.lid..text)
|
self:I(self.lid..text)
|
||||||
@ -15718,11 +15718,11 @@ function AIRBOSS:_MarshalCallRecoveryStart(case)
|
|||||||
-- Debug output.
|
-- Debug output.
|
||||||
local text=string.format("Starting aircraft recovery Case %d ops.", case)
|
local text=string.format("Starting aircraft recovery Case %d ops.", case)
|
||||||
if case==1 then
|
if case==1 then
|
||||||
text=text..string.format(" BRC %03d°.", self:GetBRC())
|
text=text..string.format(" BRC %03d°.", self:GetBRC())
|
||||||
elseif case==2 then
|
elseif case==2 then
|
||||||
text=text..string.format(" Marshal radial %03d°. BRC %03d°.", radial, self:GetBRC())
|
text=text..string.format(" Marshal radial %03d°. BRC %03d°.", radial, self:GetBRC())
|
||||||
elseif case==3 then
|
elseif case==3 then
|
||||||
text=text..string.format(" Marshal radial %03d°. Final heading %03d°.", radial, self:GetFinalBearing(false))
|
text=text..string.format(" Marshal radial %03d°. Final heading %03d°.", radial, self:GetFinalBearing(false))
|
||||||
end
|
end
|
||||||
self:T(self.lid..text)
|
self:T(self.lid..text)
|
||||||
|
|
||||||
@ -15767,7 +15767,7 @@ function AIRBOSS:_MarshalCallArrived(modex, case, brc, altitude, charlie, qfe)
|
|||||||
local CT=UTILS.Split(clock[1], ":")
|
local CT=UTILS.Split(clock[1], ":")
|
||||||
|
|
||||||
-- Subtitle text.
|
-- Subtitle text.
|
||||||
local text=string.format("Case %d, expected BRC %03d°, hold at angels %d. Expected Charlie Time %s. Altimeter %.2f. Report see me.", case, brc, angels, charlie, qfe)
|
local text=string.format("Case %d, expected BRC %03d°, hold at angels %d. Expected Charlie Time %s. Altimeter %.2f. Report see me.", case, brc, angels, charlie, qfe)
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I(self.lid..text)
|
self:I(self.lid..text)
|
||||||
@ -15944,11 +15944,11 @@ function AIRBOSS:_AddF10Commands(_unitName)
|
|||||||
missionCommands.addCommandForGroup(gid, "60 min", _menusetrtime, self._SkipperRecoveryTime, self, _unitName, 60)
|
missionCommands.addCommandForGroup(gid, "60 min", _menusetrtime, self._SkipperRecoveryTime, self, _unitName, 60)
|
||||||
missionCommands.addCommandForGroup(gid, "90 min", _menusetrtime, self._SkipperRecoveryTime, self, _unitName, 90)
|
missionCommands.addCommandForGroup(gid, "90 min", _menusetrtime, self._SkipperRecoveryTime, self, _unitName, 90)
|
||||||
local _menusetrtime=missionCommands.addSubMenuForGroup(gid, "Set Marshal Radial", _skipperPath)
|
local _menusetrtime=missionCommands.addSubMenuForGroup(gid, "Set Marshal Radial", _skipperPath)
|
||||||
missionCommands.addCommandForGroup(gid, "+30°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, 30)
|
missionCommands.addCommandForGroup(gid, "+30°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, 30)
|
||||||
missionCommands.addCommandForGroup(gid, "+15°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, 15)
|
missionCommands.addCommandForGroup(gid, "+15°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, 15)
|
||||||
missionCommands.addCommandForGroup(gid, "0°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, 0)
|
missionCommands.addCommandForGroup(gid, "0°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, 0)
|
||||||
missionCommands.addCommandForGroup(gid, "-15°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, -15)
|
missionCommands.addCommandForGroup(gid, "-15°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, -15)
|
||||||
missionCommands.addCommandForGroup(gid, "-30°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, -30)
|
missionCommands.addCommandForGroup(gid, "-30°", _menusetrtime, self._SkipperRecoveryOffset, self, _unitName, -30)
|
||||||
missionCommands.addCommandForGroup(gid, "U-turn On/Off", _skipperPath, self._SkipperRecoveryUturn, self, _unitName)
|
missionCommands.addCommandForGroup(gid, "U-turn On/Off", _skipperPath, self._SkipperRecoveryUturn, self, _unitName)
|
||||||
missionCommands.addCommandForGroup(gid, "Start CASE I", _skipperPath, self._SkipperStartRecovery, self, _unitName, 1)
|
missionCommands.addCommandForGroup(gid, "Start CASE I", _skipperPath, self._SkipperStartRecovery, self, _unitName, 1)
|
||||||
missionCommands.addCommandForGroup(gid, "Start CASE II", _skipperPath, self._SkipperStartRecovery, self, _unitName, 2)
|
missionCommands.addCommandForGroup(gid, "Start CASE II", _skipperPath, self._SkipperStartRecovery, self, _unitName, 2)
|
||||||
@ -16005,7 +16005,7 @@ function AIRBOSS:_SkipperStartRecovery(_unitName, case)
|
|||||||
-- Inform player.
|
-- Inform player.
|
||||||
local text=string.format("affirm, Case %d recovery will start in 5 min for %d min. Wind on deck %d knots. U-turn=%s.", case, self.skipperTime, self.skipperSpeed, tostring(self.skipperUturn))
|
local text=string.format("affirm, Case %d recovery will start in 5 min for %d min. Wind on deck %d knots. U-turn=%s.", case, self.skipperTime, self.skipperSpeed, tostring(self.skipperUturn))
|
||||||
if case>1 then
|
if case>1 then
|
||||||
text=text..string.format(" Marshal radial %d°.", self.skipperOffset)
|
text=text..string.format(" Marshal radial %d°.", self.skipperOffset)
|
||||||
end
|
end
|
||||||
if self:IsRecovering() then
|
if self:IsRecovering() then
|
||||||
text="negative, carrier is already recovering."
|
text="negative, carrier is already recovering."
|
||||||
@ -16071,7 +16071,7 @@ function AIRBOSS:_SkipperRecoveryOffset(_unitName, offset)
|
|||||||
if playerData then
|
if playerData then
|
||||||
|
|
||||||
-- Inform player.
|
-- Inform player.
|
||||||
local text=string.format("roger, relative CASE II/III Marshal radial set to %d°.", offset)
|
local text=string.format("roger, relative CASE II/III Marshal radial set to %d°.", offset)
|
||||||
self:MessageToPlayer(playerData, text, "AIRBOSS")
|
self:MessageToPlayer(playerData, text, "AIRBOSS")
|
||||||
|
|
||||||
self.skipperOffset=offset
|
self.skipperOffset=offset
|
||||||
@ -16534,7 +16534,7 @@ function AIRBOSS:_RequestCommence(_unitName)
|
|||||||
-- For case 1 we want the BRC but above routine return FB.
|
-- For case 1 we want the BRC but above routine return FB.
|
||||||
radial=self:GetBRC()
|
radial=self:GetBRC()
|
||||||
end
|
end
|
||||||
text=text..string.format("\nSelect TACAN %03d°, Channel %d%s (%s).\n", radial, self.TACANchannel,self.TACANmode, self.TACANmorse)
|
text=text..string.format("\nSelect TACAN %03d°, Channel %d%s (%s).\n", radial, self.TACANchannel,self.TACANmode, self.TACANmorse)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO: Inform section members.
|
-- TODO: Inform section members.
|
||||||
@ -17146,7 +17146,7 @@ function AIRBOSS:_DisplayCarrierInfo(_unitname)
|
|||||||
-- Only include current and future recovery windows.
|
-- Only include current and future recovery windows.
|
||||||
if Tabs<recovery.STOP then
|
if Tabs<recovery.STOP then
|
||||||
-- Output text.
|
-- Output text.
|
||||||
recoverytext=recoverytext..string.format("\n* %s - %s: Case %d (%d°)", UTILS.SecondsToClock(recovery.START), UTILS.SecondsToClock(recovery.STOP), recovery.CASE, recovery.OFFSET)
|
recoverytext=recoverytext..string.format("\n* %s - %s: Case %d (%d°)", UTILS.SecondsToClock(recovery.START), UTILS.SecondsToClock(recovery.STOP), recovery.CASE, recovery.OFFSET)
|
||||||
if recovery.WIND then
|
if recovery.WIND then
|
||||||
recoverytext=recoverytext..string.format(" @ %.1f kts wind", recovery.SPEED)
|
recoverytext=recoverytext..string.format(" @ %.1f kts wind", recovery.SPEED)
|
||||||
end
|
end
|
||||||
@ -17187,9 +17187,9 @@ function AIRBOSS:_DisplayCarrierInfo(_unitname)
|
|||||||
text=text..string.format("Case %d recovery ops\n", self.case)
|
text=text..string.format("Case %d recovery ops\n", self.case)
|
||||||
else
|
else
|
||||||
local radial=self:GetRadial(self.case, true, true, false)
|
local radial=self:GetRadial(self.case, true, true, false)
|
||||||
text=text..string.format("Case %d recovery ops\nMarshal radial %03d°\n", self.case, radial)
|
text=text..string.format("Case %d recovery ops\nMarshal radial %03d°\n", self.case, radial)
|
||||||
end
|
end
|
||||||
text=text..string.format("BRC %03d° - FB %03d°\n", self:GetBRC(), self:GetFinalBearing(true))
|
text=text..string.format("BRC %03d° - FB %03d°\n", self:GetBRC(), self:GetFinalBearing(true))
|
||||||
text=text..string.format("Speed %.1f kts - Wind on deck %.1f kts\n", carrierspeed, wind)
|
text=text..string.format("Speed %.1f kts - Wind on deck %.1f kts\n", carrierspeed, wind)
|
||||||
text=text..string.format("Tower frequency %.3f MHz\n", self.TowerFreq)
|
text=text..string.format("Tower frequency %.3f MHz\n", self.TowerFreq)
|
||||||
text=text..string.format("Marshal radio %.3f MHz\n", self.MarshalFreq)
|
text=text..string.format("Marshal radio %.3f MHz\n", self.MarshalFreq)
|
||||||
@ -17250,10 +17250,10 @@ function AIRBOSS:_DisplayCarrierWeather(_unitname)
|
|||||||
local WodPA=UTILS.MpsToKnots(WodPA)
|
local WodPA=UTILS.MpsToKnots(WodPA)
|
||||||
local WodPP=UTILS.MpsToKnots(WodPP)
|
local WodPP=UTILS.MpsToKnots(WodPP)
|
||||||
|
|
||||||
local WD=string.format('%03d°', Wd)
|
local WD=string.format('%03d°', Wd)
|
||||||
local Ts=string.format("%d°C",T)
|
local Ts=string.format("%d°C",T)
|
||||||
|
|
||||||
local tT=string.format("%d°C",T)
|
local tT=string.format("%d°C",T)
|
||||||
local tW=string.format("%.1f knots", UTILS.MpsToKnots(Ws))
|
local tW=string.format("%.1f knots", UTILS.MpsToKnots(Ws))
|
||||||
local tP=string.format("%.2f inHg", UTILS.hPa2inHg(P))
|
local tP=string.format("%.2f inHg", UTILS.hPa2inHg(P))
|
||||||
|
|
||||||
@ -17504,7 +17504,7 @@ function AIRBOSS:_DisplayPlayerStatus(_unitName)
|
|||||||
if playerData.step==AIRBOSS.PatternStep.HOLDING and playerData.case>1 then
|
if playerData.step==AIRBOSS.PatternStep.HOLDING and playerData.case>1 then
|
||||||
-- Get inverse magnetic radial potential offset.
|
-- Get inverse magnetic radial potential offset.
|
||||||
local radial=self:GetRadial(playerData.case, true, true, true)
|
local radial=self:GetRadial(playerData.case, true, true, true)
|
||||||
stacktext=stacktext..string.format("Select TACAN %03d°, %d DME\n", radial, angels+15)
|
stacktext=stacktext..string.format("Select TACAN %03d°, %d DME\n", radial, angels+15)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -17545,7 +17545,7 @@ function AIRBOSS:_DisplayPlayerStatus(_unitName)
|
|||||||
local brc=self:GetBRC()
|
local brc=self:GetBRC()
|
||||||
|
|
||||||
-- Help player to find its way to the initial zone.
|
-- Help player to find its way to the initial zone.
|
||||||
text=text..string.format("\nTo Initial: Fly heading %03d° for %.1f NM and turn to BRC %03d°", flyhdg, flydist, brc)
|
text=text..string.format("\nTo Initial: Fly heading %03d° for %.1f NM and turn to BRC %03d°", flyhdg, flydist, brc)
|
||||||
|
|
||||||
elseif playerData.step==AIRBOSS.PatternStep.PLATFORM then
|
elseif playerData.step==AIRBOSS.PatternStep.PLATFORM then
|
||||||
|
|
||||||
@ -17560,7 +17560,7 @@ function AIRBOSS:_DisplayPlayerStatus(_unitName)
|
|||||||
local hdg=self:GetRadial(playerData.case, true, true, true)
|
local hdg=self:GetRadial(playerData.case, true, true, true)
|
||||||
|
|
||||||
-- Help player to find its way to the initial zone.
|
-- Help player to find its way to the initial zone.
|
||||||
text=text..string.format("\nTo Platform: Fly heading %03d° for %.1f NM and turn to %03d°", flyhdg, flydist, hdg)
|
text=text..string.format("\nTo Platform: Fly heading %03d° for %.1f NM and turn to %03d°", flyhdg, flydist, hdg)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -162,33 +162,32 @@ RADIOSPEECH.Vocabulary.RU = {
|
|||||||
["8000"] = { "8000", 0.92 },
|
["8000"] = { "8000", 0.92 },
|
||||||
["9000"] = { "9000", 0.87 },
|
["9000"] = { "9000", 0.87 },
|
||||||
|
|
||||||
["Ñ<EFBFBD>тепени"] = { "degrees", 0.5 },
|
["градусы"] = { "degrees", 0.5 },
|
||||||
["километров"] = { "kilometers", 0.65 },
|
["километры"] = { "kilometers", 0.65 },
|
||||||
["km"] = { "kilometers", 0.65 },
|
["km"] = { "kilometers", 0.65 },
|
||||||
["миль"] = { "miles", 0.45 },
|
["мили"] = { "miles", 0.45 },
|
||||||
["mi"] = { "miles", 0.45 },
|
["mi"] = { "miles", 0.45 },
|
||||||
["метры"] = { "meters", 0.41 },
|
["метров"] = { "meters", 0.41 },
|
||||||
["m"] = { "meters", 0.41 },
|
["m"] = { "meters", 0.41 },
|
||||||
["ноги"] = { "feet", 0.37 },
|
["ноги"] = { "feet", 0.37 },
|
||||||
|
|
||||||
["br"] = { "br", 1.1 },
|
["br"] = { "br", 1.1 },
|
||||||
["bra"] = { "bra", 0.3 },
|
["bra"] = { "bra", 0.3 },
|
||||||
|
|
||||||
|
["возвращение на базу"] = { "returning_to_base", 1.40 },
|
||||||
|
["на пути к наземной цели"] = { "on_route_to_ground_target", 1.45 },
|
||||||
|
["перехват боги"] = { "intercepting_bogeys", 1.22 },
|
||||||
|
["поражение наземной цели"] = { "engaging_ground_target", 1.53 },
|
||||||
|
["привлечение болотных птиц"] = { "engaging_bogeys", 1.68 },
|
||||||
|
["колёса вверх..."] = { "wheels_up", 0.92 },
|
||||||
|
["посадка на базу"] = { "landing at base", 1.04 },
|
||||||
|
["патрулирование"] = { "patrolling", 0.96 },
|
||||||
|
|
||||||
["возвращаÑ<EFBFBD>Ñ<EFBFBD>ÑŒ на базу"] = { "returning_to_base", 1.40 },
|
["для"] = { "for", 0.27 },
|
||||||
["на пути к наземной цели"] = { "on_route_to_ground_target", 1.45 },
|
["и"] = { "and", 0.17 },
|
||||||
["перехват Ñ<>амолетов"] = { "intercepting_bogeys", 1.22 },
|
["на сайте"] = { "at", 0.19 },
|
||||||
["поражение наземной цели"] = { "engaging_ground_target", 1.53 },
|
["точка"] = { "dot", 0.51 },
|
||||||
["захватывающие Ñ<>амолеты"] = { "engaging_bogeys", 1.68 },
|
["защитник"] = { "defender", 0.45 },
|
||||||
["колеÑ<EFBFBD>а вверх"] = { "wheels_up", 0.92 },
|
|
||||||
["поÑ<EFBFBD>адка на базу"] = { "landing at base", 1.04 },
|
|
||||||
["патрулирующий"] = { "patrolling", 0.96 },
|
|
||||||
|
|
||||||
["за"] = { "for", 0.27 },
|
|
||||||
["и"] = { "and", 0.17 },
|
|
||||||
["в"] = { "at", 0.19 },
|
|
||||||
["dot"] = { "dot", 0.51 },
|
|
||||||
["defender"] = { "defender", 0.45 },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Create a new RADIOSPEECH object for a given radio frequency/modulation.
|
--- Create a new RADIOSPEECH object for a given radio frequency/modulation.
|
||||||
|
|||||||
@ -286,7 +286,7 @@ do -- DETECTION MANAGER
|
|||||||
self.CC:MessageToCoalition( Message )
|
self.CC:MessageToCoalition( Message )
|
||||||
end
|
end
|
||||||
|
|
||||||
Message = Message:gsub( "°", " degrees " )
|
Message = Message:gsub( "°", " degrees " )
|
||||||
Message = Message:gsub( "(%d)%.(%d)", "%1 dot %2" )
|
Message = Message:gsub( "(%d)%.(%d)", "%1 dot %2" )
|
||||||
|
|
||||||
-- Here we handle the transmission of the voice over.
|
-- Here we handle the transmission of the voice over.
|
||||||
|
|||||||
@ -574,7 +574,7 @@ do -- TASK_CARGO_DISPATCHER
|
|||||||
-- local Coordinate = PlaneUnit:GetPointVec2()
|
-- local Coordinate = PlaneUnit:GetPointVec2()
|
||||||
-- TaskA2ADispatcher:AddCSARTask( "CSAR Task", Coordinate )
|
-- TaskA2ADispatcher:AddCSARTask( "CSAR Task", Coordinate )
|
||||||
--
|
--
|
||||||
-- -- Add a CSAR task to rescue a downed pilot from within a coordinate of country RUSSIA, which is pointing to the west (270°).
|
-- -- Add a CSAR task to rescue a downed pilot from within a coordinate of country RUSSIA, which is pointing to the west (270°).
|
||||||
-- local Coordinate = PlaneUnit:GetPointVec2()
|
-- local Coordinate = PlaneUnit:GetPointVec2()
|
||||||
-- TaskA2ADispatcher:AddCSARTask( "CSAR Task", Coordinate, 270, Country.RUSSIA )
|
-- TaskA2ADispatcher:AddCSARTask( "CSAR Task", Coordinate, 270, Country.RUSSIA )
|
||||||
--
|
--
|
||||||
|
|||||||
@ -491,9 +491,9 @@ UTILS.tostringLL = function( lat, lon, acc, DMS)
|
|||||||
secFrmtStr = '%0' .. width .. '.' .. acc .. 'f'
|
secFrmtStr = '%0' .. width .. '.' .. acc .. 'f'
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 024� 23' 12"N or 024� 23' 12.03"N
|
-- 024° 23' 12"N or 024° 23' 12.03"N
|
||||||
return string.format('%03d°', latDeg)..string.format('%02d', latMin)..'\''..string.format(secFrmtStr, latSec)..'"'..latHemi..' '
|
return string.format('%03d°', latDeg)..string.format('%02d', latMin)..'\''..string.format(secFrmtStr, latSec)..'"'..latHemi..' '
|
||||||
.. string.format('%03d°', lonDeg)..string.format('%02d', lonMin)..'\''..string.format(secFrmtStr, lonSec)..'"'..lonHemi
|
.. string.format('%03d°', lonDeg)..string.format('%02d', lonMin)..'\''..string.format(secFrmtStr, lonSec)..'"'..lonHemi
|
||||||
|
|
||||||
else -- degrees, decimal minutes.
|
else -- degrees, decimal minutes.
|
||||||
latMin = UTILS.Round(latMin, acc)
|
latMin = UTILS.Round(latMin, acc)
|
||||||
@ -518,8 +518,8 @@ UTILS.tostringLL = function( lat, lon, acc, DMS)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- 024 23'N or 024 23.123'N
|
-- 024 23'N or 024 23.123'N
|
||||||
return string.format('%03d°', latDeg) .. ' ' .. string.format(minFrmtStr, latMin) .. '\'' .. latHemi .. ' '
|
return string.format('%03d°', latDeg) .. ' ' .. string.format(minFrmtStr, latMin) .. '\'' .. latHemi .. ' '
|
||||||
.. string.format('%03d°', lonDeg) .. ' ' .. string.format(minFrmtStr, lonMin) .. '\'' .. lonHemi
|
.. string.format('%03d°', lonDeg) .. ' ' .. string.format(minFrmtStr, lonMin) .. '\'' .. lonHemi
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -509,7 +509,7 @@ AIRBASE.TerminalType = {
|
|||||||
--- Runway data.
|
--- Runway data.
|
||||||
-- @type AIRBASE.Runway
|
-- @type AIRBASE.Runway
|
||||||
-- @field #number heading Heading of the runway in degrees.
|
-- @field #number heading Heading of the runway in degrees.
|
||||||
-- @field #string idx Runway ID: heading 070° ==> idx="07".
|
-- @field #string idx Runway ID: heading 070° ==> idx="07".
|
||||||
-- @field #number length Length of runway in meters.
|
-- @field #number length Length of runway in meters.
|
||||||
-- @field Core.Point#COORDINATE position Position of runway start.
|
-- @field Core.Point#COORDINATE position Position of runway start.
|
||||||
-- @field Core.Point#COORDINATE endpoint End point of runway.
|
-- @field Core.Point#COORDINATE endpoint End point of runway.
|
||||||
@ -1516,7 +1516,7 @@ function AIRBASE:GetRunwayData(magvar, mark)
|
|||||||
-- Heading of runway.
|
-- Heading of runway.
|
||||||
local hdg=c1:HeadingTo(c2)
|
local hdg=c1:HeadingTo(c2)
|
||||||
|
|
||||||
-- Runway ID: heading=070° ==> idx="07"
|
-- Runway ID: heading=070° ==> idx="07"
|
||||||
local idx=string.format("%02d", UTILS.Round((hdg-magvar)/10, 0))
|
local idx=string.format("%02d", UTILS.Round((hdg-magvar)/10, 0))
|
||||||
|
|
||||||
-- Runway table.
|
-- Runway table.
|
||||||
@ -1594,7 +1594,7 @@ function AIRBASE:GetActiveRunway(magvar)
|
|||||||
local dot=UTILS.VecDot(Vwind, Vrunway)
|
local dot=UTILS.VecDot(Vwind, Vrunway)
|
||||||
|
|
||||||
-- Debug.
|
-- 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?
|
-- New min?
|
||||||
if dotmin==nil or dot<dotmin then
|
if dotmin==nil or dot<dotmin then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user