Deano1973
Resource contributor
- Messages
- 384
- Country

Hi folks, a super-quick request for help with a bearing to station code. I have a station frequency, and I can obtain a bearing from it to me. I want to turn that into a bearing from me to the station. My code does work, but errs when I am to the east of the station;
I've had a hunt around but I can't think of a way to make sure that the bearing is correct no matter where I am in relation to the station. I'm guessing that an if / els is required based on the variables I already have? Any help much appreciated!
Code:
<Element>
<Position X="0" Y="140"/>
<Text X="120" Y="30" Bright="Yes" Length="10" Font="Tahoma" Color="Lime"
Adjust="Left" VerticalAdjust="Center">
<String>BRG %((L:CEX_nav1_TACAN_brg,degrees) 180 + )%!03d!</String>
</Text>
I've had a hunt around but I can't think of a way to make sure that the bearing is correct no matter where I am in relation to the station. I'm guessing that an if / els is required based on the variables I already have? Any help much appreciated!

