mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Point - added option to add an SSML tag to ToStringBRAANATO
This commit is contained in:
parent
f6aea13fae
commit
e2b1276d7b
@ -2769,8 +2769,9 @@ do -- COORDINATE
|
|||||||
-- @param #COORDINATE FromCoordinate The coordinate to measure the distance and the bearing from.
|
-- @param #COORDINATE FromCoordinate The coordinate to measure the distance and the bearing from.
|
||||||
-- @param #boolean Bogey Add "Bogey" at the end if true (not yet declared hostile or friendly)
|
-- @param #boolean Bogey Add "Bogey" at the end if true (not yet declared hostile or friendly)
|
||||||
-- @param #boolean Spades Add "Spades" at the end if true (no IFF/VID ID yet known)
|
-- @param #boolean Spades Add "Spades" at the end if true (no IFF/VID ID yet known)
|
||||||
|
-- @param #boolean SSML Add SSML tags speaking aspect as 0 1 2 and "brah" instead of BRAA
|
||||||
-- @return #string The BRAA text.
|
-- @return #string The BRAA text.
|
||||||
function COORDINATE:ToStringBRAANATO(FromCoordinate,Bogey,Spades)
|
function COORDINATE:ToStringBRAANATO(FromCoordinate,Bogey,Spades,SSML)
|
||||||
|
|
||||||
-- Thanks to @Pikey
|
-- Thanks to @Pikey
|
||||||
local BRAANATO = "Merged."
|
local BRAANATO = "Merged."
|
||||||
@ -2791,10 +2792,11 @@ do -- COORDINATE
|
|||||||
local track = UTILS.BearingToCardinal(bearing) or "North"
|
local track = UTILS.BearingToCardinal(bearing) or "North"
|
||||||
|
|
||||||
if rangeNM > 3 then
|
if rangeNM > 3 then
|
||||||
|
if SSML then
|
||||||
if aspect == "" then
|
if aspect == "" then
|
||||||
BRAANATO = string.format("BRA, %03d, %d miles, Angels %d, Track %s",bearing, rangeNM, alt, track)
|
BRAANATO = string.format("brah <say-as interpret-as='characters'>%03d</say-as>, %d miles, Angels %d, Track %s",bearing, rangeNM, alt, track)
|
||||||
else
|
else
|
||||||
BRAANATO = string.format("BRAA, %03d, %d miles, Angels %d, %s, Track %s",bearing, rangeNM, alt, aspect, track)
|
BRAANATO = string.format("brah <say-as interpret-as='characters'>%03d</say-as>, %d miles, Angels %d, %s, Track %s",bearing, rangeNM, alt, aspect, track)
|
||||||
end
|
end
|
||||||
if Bogey and Spades then
|
if Bogey and Spades then
|
||||||
BRAANATO = BRAANATO..", Bogey, Spades."
|
BRAANATO = BRAANATO..", Bogey, Spades."
|
||||||
@ -2805,6 +2807,22 @@ do -- COORDINATE
|
|||||||
else
|
else
|
||||||
BRAANATO = BRAANATO.."."
|
BRAANATO = BRAANATO.."."
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
if aspect == "" then
|
||||||
|
BRAANATO = string.format("BRA %03d, %d miles, Angels %d, Track %s",bearing, rangeNM, alt, track)
|
||||||
|
else
|
||||||
|
BRAANATO = string.format("BRAA %03d, %d miles, Angels %d, %s, Track %s",bearing, rangeNM, alt, aspect, track)
|
||||||
|
end
|
||||||
|
if Bogey and Spades then
|
||||||
|
BRAANATO = BRAANATO..", Bogey, Spades."
|
||||||
|
elseif Bogey then
|
||||||
|
BRAANATO = BRAANATO..", Bogey."
|
||||||
|
elseif Spades then
|
||||||
|
BRAANATO = BRAANATO..", Spades."
|
||||||
|
else
|
||||||
|
BRAANATO = BRAANATO.."."
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return BRAANATO
|
return BRAANATO
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user