Skip to content

Algorithms and Overrides

When an operator changes the frequency of a radio to one outside the current range of the selected antenna (usually by changing bands) the server attempts to select a suitable antenna. The algorithm tries to be intuitive and to select the antenna which is most likely the one desired. This turns out to be a bit complicated.

flowchart TD
    A[Frequency changes] --> B{Same band operation allowed?}
    B -- No --> C[Use no antennas and inhibit transmit]
    B -- Yes --> D{Current antenna still valid and contiguous?}
    D -- Yes --> E[Keep current antenna]
    D -- No --> F{History has suitable antenna?}
    F -- Yes --> G[Use historical antenna]
    F -- No --> H{Available antenna covers frequency?}
    H -- Yes --> I[Use first available matching antenna]
    H -- No --> J{TX-only + RX-only pair available?}
    J -- Yes --> K[Use TX-only and RX-only pair]
    J -- No --> L[Select closest-range antenna and inhibit transmit]
  1. If there is another station on the band and the same band operation is not allowed use no antennas and inhibit transmit.

  2. If the current antenna covers a frequency range which includes the current frequency and is contiguous to the range that was being used, continue to use the current antenna. This takes care of the cases where an antenna needs to switch an inductor or capacitor for part of the frequency range. It also takes care of the case where an operator has tuned beyond the band edge and then tunes back into the band.

  3. The server keeps a history of what antennas were used on what frequencies. Check the history to see if an antenna was previously used for this frequency range. If an antenna is found and available use it. This means that if an operator changes from 20 to 15 and back to 20 he’ll get the antenna he was using when he left 20. This works well for stations with one station per band but does not have much effect if there are multiple stations on the same band.

  4. Starting with the lowest numbered antenna in the configuration, check each to see if it covers the frequency and is available. If so, use it. This check ignores antennas which are transmit-only or receive-only. The configuration file author can control which antennas are likely to be chosen by giving them lower numbers. The numbering doesn’t affect anything else important.

  5. Starting with the lowest numbered antenna in the configuration, check each to see if it is transmit-only. If so, and if it covers the frequency and is available, check each receive-only antenna starting with the lowest numbered to see if it covers the frequency and is available. If so use them.

  6. No antenna which covers the frequency range is available. Find the antenna which has a range closest to the radio’s frequency. Start this check using the current antenna. Inhibit transmit for this radio. Starting with the current antenna means that if an operator tunes from 14000 to 13999 the antenna won’t change.

  7. If no antenna at all can be found, don’t connect the radio to any antenna. Inhibit transmit for this radio.

There’s a bit more complexity.

If, in step 3, the history shows that different transmit and receive antennas were used it will try to use them again. If one or the other is not available it will try to use the remaining antenna if it is suitable.

The history for sub receivers and alternate antennas is separate from the history for the main radios.

When a frequency change affects the main radio and sub receiver, the main radio transmitter and receiver are assigned antennas first. Then the sub receiver is assigned an antenna. Alternate antennas are assigned after main radio and sub receiver antennas.

If the selected antenna does not cover the radio’s frequency, then if another radio changes frequency and the antenna is the best choice for it, the antenna will be selected by the other radio and a different antenna will be chosen for the radio that originally had the antenna.

Whenever a radio changes antennas, a check is made for radios that have antennas that do not cover their frequency or that have no antenna. If one is found, the antenna selection is restarted for that radio in case a suitable antenna is now available. If no suitable antenna is available the antenna will not be changed. If a selected antenna becomes unavailable because of a scenario change, a check is made to see if an alternate path for that antenna is available. If so, the alternate path is selected.

So far this seems to do the right thing. However, if situations are found where it does not, the server algorithms may be changed.

As described previously, relative antennas have an antenna list which is separate from those used for button layouts. Next and previous antenna selection treat the list as circular. If the current antenna is the last antenna on the list, requesting the next antenna will select the first antenna on the list.

For relative antenna selection the receive antenna is always the same as the transmit antenna.

There are two ways to select a relative antenna – by absolute number or by requesting the next or previous antenna.

Selection by absolute number is simple: the antenna in the appropriate place in the list is used if it exists and use is possible.

Selecting the next or previous antenna is more complicated because the antenna currently selected may have been selected as an additive or exclusive antenna.

  1. Scan the list of relative antennas until the currently selected antenna is found. Start the scan with the last selected relative antenna. Scan forward if this is for the next relative antenna and backwards if this is for the previous antenna. If the antenna is found, set it as the current relative antenna.

    This takes care of cases where the antenna has been selected by some means other than relative antennas.

    This works correctly even if the currently selected antenna is in the relative antennas list several times. For example, the list could be Antenna 1, 2, 1, 3. If the selected antenna is not in the relative antennas list, then the current relative antenna will not be changed.

  2. Select the antenna after the currently selected relative antenna if the next relative antenna was requested or the antenna before the currently selected antenna if the previous relative antenna was selected. If this antenna is unavailable, continue through the list until an available antenna is found.

    If there was no current relative antenna, start at the beginning of the list. There is no previous relative antenna if this is the first relative antenna command since the server started or since the radio changed frequency range. For example if the radio switches from 7 MHz to 14 MHz there will be no current relative antenna.

It may be that it would be better to clear the current relative antenna than to leave it alone if the current antenna is not in the relative list. User input will determine if this should be changed.

The override capability is intended primarily for single-operator use. Antennas with override may be shown as available but the antenna selector does not show that using them would take them away from another radio.

Override is expected to be compatible with alternate paths, additive and exclusive antenna systems, scenarios, and most other capabilities. Using it with shared transmit antennas may produce unexpected results. The override qualifier is only considered when an antenna is explicitly selected. It is not considered during operations such as a band change, scenario change, or antenna swap. It is considered in the recall function.

When an antenna with override is selected the MOAS server first tries to select it without using override. This is because the antenna may have alternate paths and selection with override could cause another radio to change antennas unnecessarily. If the server is unable to select the antenna without override it will try using override. This check is done for the transmit and the receive antennas.

If an override is successful, new antennas will be selected for the radios that had antennas which conflict with the selected antenna. The process is similar to that for selecting an antenna when a station changes bands:

  1. If the selected antenna is a combination of antennas, that is it has an InUse parameter, all combinations of antennas will be tried, starting with those that contain the most antennas. If one of these is usable it will be selected. In practice, if one antenna is taken, the newly selected antenna will be all of the antennas except for that one.

  2. The antenna previously selected by the radio is tried. If it is a combination of antennas they are also tried. If one of these is usable it will be selected. This uses a per-radio history which is separate from the history used when changing bands. This may be the antenna which was selected before the antenna which is being taken was selected. In that case it will restore what was being used.

  3. Apply the antenna selection algorithm used when changing bands.

  • There is no support for controlling the RX Antenna switch in a radio.
  • There is no way to set a radio as “off” so it will not use an antenna. This is a significant limitation if the radio is part of the selection criteria for a scenario.