From 1aaa51c4be629145aa7c044a61c3e98ca1b9e75b Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 29 Apr 2022 12:19:06 +0200 Subject: [PATCH] COORDINATE - added bogey option to COORDINATE:ToStringBRAANATO(FromCoordinate,Bogey,Spades) --- Moose Development/Moose/Core/Point.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 053c86560..86bbb2cd3 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -2768,9 +2768,10 @@ do -- COORDINATE --- Create a BRAA NATO call string to this COORDINATE from the FromCOORDINATE. Note - BRA delivered if no aspect can be obtained and "Merged" if range < 3nm -- @param #COORDINATE self -- @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 Spades Add "Spades" at the end if true (no IFF/VID ID yet known) -- @return #string The BRAA text. - function COORDINATE:ToStringBRAANATO(FromCoordinate,Spades) + function COORDINATE:ToStringBRAANATO(FromCoordinate,Bogey,Spades) -- Thanks to @Pikey local BRAANATO = "Merged." @@ -2796,8 +2797,12 @@ do -- COORDINATE else BRAANATO = string.format("BRAA, %03d, %d miles, Angels %d, %s, Track %s",bearing, rangeNM, alt, aspect, track) end - if Spades then - BRAANATO = BRAANATO..", Spades." + if Bogey and Spades then + BRAANATO = BRAANATO..", Bogey, Spades." + elseif Bogey and (not Spades) then + BRAANATO = BRAANATO..", Bogey." + elseif (not Bogey) and Spades then + BRAANATO = BRAANATO..", Spades." else BRAANATO = BRAANATO.."." end