drPhibes Posted Saturday at 11:38 AM Posted Saturday at 11:38 AM (edited) DME not working for Y channels has been an issue for years (always?), and after some digging in the LUAs, I think I have identified why, and how to fix it. First, in order to avoid confusion (which I have seen a bit of when VOR, DME and TACAN is discussed in the forums), here is some technical info (feel free to skip this paragraph if you already know this): VOR: an omni-directional beacon operating in the VHF band between 108 and 118 MHz, that radiates 360 radials you can tune your receiver to intercept. It also gives you the direct bearing to the beacon. The "R" in name VOR can be a bit of a misnomer, since a VOR does not provide range info, but it is due to the term "radio range" being used as a colloquial term for radio naviagation aids back in the day. DME: provides the slant range between the aircraft and the beacon. Each beacon operates on two frequencies in the 960-1215 MHz range; the interrogation frequency (transmitted by the aircraft) and the reply frequency (transmitted by the beacon), which are separated by 64 MHz. The frequencies are never set manually, instead they are assigned fixed channel numbers and a mode (X/Y) for ease of use. The X and Y modes refer to different spacing between the pulses used when determining the range, allowing twice as many DMEs to operate within the same frequency band. VOR/DME (or VOR+DME): A VOR co-located with a DME, giving you both bearing and range info. The VOR frequency and DME channel is paired according to ICAOs Annex 10, and every DME channel except 60-69 has a paired VHF frequency (either localizer or VOR). TACAN: This is where it gets a bit more complicated. A TACAN is a DME where a rotating, slightly directional, antenna generates a rotating radiation pattern that aircraft equipped with TACAN can use to determine the bearing to the beacon (like a VOR). All aircraft with TACAN can get the range to a DME and all aircraft with DME can get the range to a TACAN, but only the combination TACAN/TACAN will give you range and bearing. VORTAC: A VOR co-located with a TACAN. Works just like a VOR/DME for aircraft without TACAN, and like a TACAN for aircraft with TACAN. Now, on to the bugs: Test info: Testet on the following map: Kola, with Evenes VOR/DME (117.35 MHz / 120Y) and Andøya VOR/DME (112.20 MHz / 59X). No unofficial mods installed (before testing my proposed fix for the bugs, which requires changes to BeaconSites.lua and BeaconTypes.lua). The frequency / channel pairing is according to ICAO Annex 10. The channels are not included in the beacons.lua entries for the airports, but this parameter only displays the channel number in the ME/F10 map. The actual channel use is set up based on the paired VHF freq. Plane: Mirage F1EE (TACAN for range to DME, VOR for bearing to the VOR) and F16 (TACAN for range to DME (no VOR in the 16..)) F1EE: Evenes: bearing, but no range. Andøya: both bearing and range. F16: Evenes: no range. Andøya: range OK. See \DCS World\Scripts\World\Radio\BeaconTypes.lua and BeaconSites.lua for context (variables, function names etc). Issue 1: The function "getPaired_DME_ChannelBy_VOR_Frequency(VOR_freq)" in BeaconTypes.lua returns channel numbers correctly for X channels, but the function return value (return channelX2 / 2 + chStartVal, channelMode) does not take into account that the variable channelX2 is an odd number for Y channels, and thus returns a non-integer channel value for Y. Two examples: #1: Channel 19X: VOR_freq = 108200000 (108.2 MHz) freqToSubtract = 108000000 chStartVal = 17 channelX2 = (VOR_freq - freqToSubtract) / 50000 with numbers filled in: channelX2 = (108200000 - 108000000) / 50000 = 4 Determine X or Y: channelX2 % 2 = 0 => channelMode = X return channelX2 / 2 + chStartVal, channelMode with numbers filled in: 4 / 2 + 17 = 19, X --------- #2: Channel 19Y: VOR_freq = 108250000 (108.25 MHz) freqToSubtract = 108000000 chStartVal = 17 channelX2 = (VOR_freq - freqToSubtract) / 50000 with numbers filled in: channelX2 = (108250000 - 108000000) / 50000 = 5 Determine X or Y: channelX2 % 2 = 1 => channelMode = Y return channelX2 / 2 + chStartVal, channelMode with numbers filled in: 5 / 2 + 17 = 19.5, Y (Non-integer channel number!) The return from getPaired_DME_ChannelBy_VOR_Frequency is used by the function getTACANFrequency, which returns the wrong reply frequency if the channel number you pass to it isn't an integer. Changing the return to "return (channelX2 - channelX2 % 2) / 2 + chStartVal, channelMode" fixes this problem in the tests I have performed. This will give you the DME IDENT tone in the plane (tested in the Mirage F1EE), but no DME distance. The distance problem is described below: Issue 2: The DME part of the "[SystemName.VORDME]" section in BeaconSites.lua only contains the following signals: signals = SIGNAL_VOICE_AM + SIGNAL_DME + SIGNAL_TACAN_X. Adding "+ SIGNAL_TACAN_Y" is required for Y channel DME range (which is the same signal as TACAN range, hence the name). So, TL;DR: these two changes fix the non-working Y-channel DME (actual changes highlighted in green): BeaconSites.lua, change line 403 to: signals = SIGNAL_VOICE_AM + SIGNAL_DME + SIGNAL_TACAN_X + SIGNAL_TACAN_Y, BeaconTypes.lua, change line 199 to: return (channelX2 - channelX2 % 2) / 2 + chStartVal, channelMode Screenshots from my tests: Mode X DME working (+VORin the F1EE): Mode Y DME NOT working before fix (VOR works in the F1EE): Mode Y DME working after fix: Edited Saturday at 12:05 PM by drPhibes typo 1
Recommended Posts