mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
COORDINATE - additions to BRAANATO
AWACS - make bogey dope use the priority queue to avoid collisions. Say "very low" and not "zero thousand", drop "vanished" if not tags is requested
This commit is contained in:
@@ -2804,6 +2804,10 @@ do -- COORDINATE
|
|||||||
alttext = string.format("Angels %d",alt)
|
alttext = string.format("Angels %d",alt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if alt < 1 then
|
||||||
|
alttext = "very low"
|
||||||
|
end
|
||||||
|
|
||||||
local track = UTILS.BearingToCardinal(bearing) or "North"
|
local track = UTILS.BearingToCardinal(bearing) or "North"
|
||||||
|
|
||||||
if rangeNM > 3 then
|
if rangeNM > 3 then
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ do
|
|||||||
-- testawacs.maxassigndistance = 100 -- Don't assign targets further out than this, in NM.
|
-- testawacs.maxassigndistance = 100 -- Don't assign targets further out than this, in NM.
|
||||||
-- testawacs.debug = false -- set to true to produce more log output.
|
-- testawacs.debug = false -- set to true to produce more log output.
|
||||||
-- testawacs.NoMissileCalls = true -- suppress missile callouts
|
-- testawacs.NoMissileCalls = true -- suppress missile callouts
|
||||||
-- testawacs.PlayerCapAssigment = true -- no task assignment for players
|
-- testawacs.PlayerCapAssigment = true -- no intercept task assignments for players
|
||||||
-- testawacs.invisible = false -- set AWACS to be invisible to hostiles
|
-- testawacs.invisible = false -- set AWACS to be invisible to hostiles
|
||||||
-- testawacs.immortal = false -- set AWACS to be immortal
|
-- testawacs.immortal = false -- set AWACS to be immortal
|
||||||
-- -- By default, the radio queue is checked every 10 secs. This is altered by the calculated length of the sentence to speak
|
-- -- By default, the radio queue is checked every 10 secs. This is altered by the calculated length of the sentence to speak
|
||||||
@@ -364,7 +364,7 @@ do
|
|||||||
-- @field #AWACS
|
-- @field #AWACS
|
||||||
AWACS = {
|
AWACS = {
|
||||||
ClassName = "AWACS", -- #string
|
ClassName = "AWACS", -- #string
|
||||||
version = "beta 0.1.29", -- #string
|
version = "beta 0.1.30", -- #string
|
||||||
lid = "", -- #string
|
lid = "", -- #string
|
||||||
coalition = coalition.side.BLUE, -- #number
|
coalition = coalition.side.BLUE, -- #number
|
||||||
coalitiontxt = "blue", -- #string
|
coalitiontxt = "blue", -- #string
|
||||||
@@ -706,7 +706,7 @@ AWACS.TaskStatus = {
|
|||||||
--@field #boolean FromAI
|
--@field #boolean FromAI
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO-List 0.1.29
|
-- TODO-List 0.1.30
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
-- DONE - WIP - Player tasking, VID
|
-- DONE - WIP - Player tasking, VID
|
||||||
@@ -1201,7 +1201,7 @@ function AWACS:SuppressScreenMessages(Switch)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- [User] Do not show messages on screen, no extra calls for player guidance, use short callsigns, no group tags.
|
--- [User] Do not show messages on screen, no extra calls for player guidance, use short callsigns etc.
|
||||||
-- @param #AWACS self
|
-- @param #AWACS self
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:ZipLip()
|
function AWACS:ZipLip()
|
||||||
@@ -1984,7 +1984,7 @@ function AWACS:_CleanUpContacts()
|
|||||||
|
|
||||||
--local aliveclusters = FIFO:New()
|
--local aliveclusters = FIFO:New()
|
||||||
-- announce VANISHED
|
-- announce VANISHED
|
||||||
if deadcontacts:Count() > 0 then
|
if deadcontacts:Count() > 0 and (not self.NoGroupTags) then
|
||||||
|
|
||||||
self:T("DEAD count="..deadcontacts:Count())
|
self:T("DEAD count="..deadcontacts:Count())
|
||||||
deadcontacts:ForEach(
|
deadcontacts:ForEach(
|
||||||
@@ -2505,7 +2505,7 @@ function AWACS:_BogeyDope(Group)
|
|||||||
if not self.intel then
|
if not self.intel then
|
||||||
-- no intel yet!
|
-- no intel yet!
|
||||||
text = string.format("%s. %s. Clean.",self:_GetCallSign(Group,GID) or "Ghost 1", self.callsigntxt)
|
text = string.format("%s. %s. Clean.",self:_GetCallSign(Group,GID) or "Ghost 1", self.callsigntxt)
|
||||||
self:_NewRadioEntry(text,text,0,false,true,true,false)
|
self:_NewRadioEntry(text,text,0,false,true,true,false,true)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@@ -2547,7 +2547,7 @@ function AWACS:_BogeyDope(Group)
|
|||||||
|
|
||||||
text = string.format("%s. %s. Clean.",self:_GetCallSign(Group,GID) or "Ghost 1", self.callsigntxt)
|
text = string.format("%s. %s. Clean.",self:_GetCallSign(Group,GID) or "Ghost 1", self.callsigntxt)
|
||||||
|
|
||||||
self:_NewRadioEntry(text,textScreen,GID,Outcome,Outcome,true,false)
|
self:_NewRadioEntry(text,textScreen,GID,Outcome,Outcome,true,false,true)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -2561,7 +2561,7 @@ function AWACS:_BogeyDope(Group)
|
|||||||
textScreen = textScreen .. contactsAO .. " groups.\n"
|
textScreen = textScreen .. contactsAO .. " groups.\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
self:_NewRadioEntry(text,textScreen,GID,Outcome,true,true,false)
|
self:_NewRadioEntry(text,textScreen,GID,Outcome,true,true,false,true)
|
||||||
|
|
||||||
self:_CreateBogeyDope(self:_GetCallSign(Group,GID) or "Ghost 1",GID)
|
self:_CreateBogeyDope(self:_GetCallSign(Group,GID) or "Ghost 1",GID)
|
||||||
end
|
end
|
||||||
@@ -3775,10 +3775,18 @@ function AWACS:_ToStringBRA(FromCoordinate,ToCoordinate,Altitude)
|
|||||||
local AngleDegTextTTS = string.gsub(AngleDegText,"0","zero")
|
local AngleDegTextTTS = string.gsub(AngleDegText,"0","zero")
|
||||||
local Distance = ToCoordinate:Get2DDistance( FromCoordinate ) --meters
|
local Distance = ToCoordinate:Get2DDistance( FromCoordinate ) --meters
|
||||||
local distancenm = UTILS.Round(UTILS.MetersToNM(Distance),0)
|
local distancenm = UTILS.Round(UTILS.MetersToNM(Distance),0)
|
||||||
BRText = string.format("%03d, %d miles, %d thousand",AngleDegrees,distancenm,altitude)
|
if altitude >= 1 then
|
||||||
BRTextTTS = string.format("%s, %d miles, %d thousand",AngleDegText,distancenm,altitude)
|
BRText = string.format("%03d, %d miles, %d thousand",AngleDegrees,distancenm,altitude)
|
||||||
if self.PathToGoogleKey then
|
BRTextTTS = string.format("%s, %d miles, %d thousand",AngleDegText,distancenm,altitude)
|
||||||
BRTextTTS = string.format("%s, %d miles, %d thousand",AngleDegTextTTS,distancenm,altitude)
|
if self.PathToGoogleKey then
|
||||||
|
BRTextTTS = string.format("%s, %d miles, %d thousand",AngleDegTextTTS,distancenm,altitude)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
BRText = string.format("%03d, %d miles, very low",AngleDegrees,distancenm)
|
||||||
|
BRTextTTS = string.format("%s, %d miles, very low",AngleDegText,distancenm)
|
||||||
|
if self.PathToGoogleKey then
|
||||||
|
BRTextTTS = string.format("%s, %d miles, very low",AngleDegTextTTS,distancenm)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
self:T(BRText,BRTextTTS)
|
self:T(BRText,BRTextTTS)
|
||||||
return BRText,BRTextTTS
|
return BRText,BRTextTTS
|
||||||
@@ -4620,8 +4628,8 @@ function AWACS:_AnnounceContact(Contact,IsNew,Group,IsBogeyDope,Tag,IsPopup,Repo
|
|||||||
string.gsub(BRAText,"BRA","brah")
|
string.gsub(BRAText,"BRA","brah")
|
||||||
|
|
||||||
--self:T(BRAText)
|
--self:T(BRAText)
|
||||||
|
local prio = IsNew or IsBogeyDope
|
||||||
self:_NewRadioEntry(BRAText,TextScreen,GID,isGroup,true,IsNew,false,IsNew)
|
self:_NewRadioEntry(BRAText,TextScreen,GID,isGroup,true,IsNew,false,prio)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user