BRAANato - make bearing a 3digit number

This commit is contained in:
Applevangelist
2022-04-22 13:32:34 +02:00
parent 83491f535a
commit 51d924c1b8
2 changed files with 7 additions and 3 deletions

View File

@@ -2436,7 +2436,11 @@ function UTILS.ToStringBRAANATO(FromGrp,ToGrp)
local alt = UTILS.Round(UTILS.MetersToFeet(grpLeadUnit:GetAltitude())/1000,0)--*1000
local track = UTILS.BearingToCardinal(hdg)
if rangeNM > 3 then
BRAANATO = string.format("%s, BRAA, %s, %d miles, Angels %d, %s, Track %s, Spades.",GroupWords,bearing, rangeNM, alt, aspect, track)
if aspect == "" then
BRAANATO = string.format("%s, BRA, %03d, %d miles, Angels %d, Track %s",GroupWords,bearing, rangeNM, alt, track)
else
BRAANATO = string.format("%s, BRAA, %03d, %d miles, Angels %d, %s, Track %s",GroupWords, bearing, rangeNM, alt, aspect, track)
end
end
return BRAANATO
end