From e208df16b2ed9ea50e93b16d2eb8b8f4ffb22e82 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 25 Nov 2022 13:33:04 -0800 Subject: [PATCH] Add radios for the MB-339A. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2511. --- game/radio/radios.py | 46 +++++++++++++++++++++++++++ resources/units/aircraft/MB-339A.yaml | 14 ++++++++ 2 files changed, 60 insertions(+) diff --git a/game/radio/radios.py b/game/radio/radios.py index 3523398f..4e91e31f 100644 --- a/game/radio/radios.py +++ b/game/radio/radios.py @@ -6,6 +6,7 @@ import logging import re from dataclasses import dataclass from typing import Dict, FrozenSet, Iterator, List, Set, Tuple + from dcs.task import Modulation @@ -246,6 +247,51 @@ RADIOS: List[Radio] = [ ), ), Radio("UHF TRAP 137B", (RadioRange(MHz(225), MHz(400), kHz(25), Modulation.AM),)), + Radio( + "AN/ARC-150(V) 2", + ( + RadioRange( + MHz(225), + MHz(400), + MHz(1), + Modulation.AM, + frozenset((MHz(243),)), + ), + ), + ), + Radio( + "SRT-651/N", + ( + RadioRange( + MHz(30), + MHz(88), + MHz(1), + Modulation.FM, + frozenset((MHz(40, 500),)), + ), + RadioRange( + MHz(108), + MHz(156), + MHz(1), + Modulation.AM, + frozenset((MHz(121, 500),)), + ), + RadioRange( + MHz(156), + MHz(174), + MHz(1), + Modulation.FM, + frozenset((MHz(156, 800),)), + ), + RadioRange( + MHz(225), + MHz(400), + MHz(1), + Modulation.AM, # Actually AM/FM, but we can't represent that. + frozenset((MHz(243),)), + ), + ), + ), ] diff --git a/resources/units/aircraft/MB-339A.yaml b/resources/units/aircraft/MB-339A.yaml index 4d53cb90..d151d7f8 100644 --- a/resources/units/aircraft/MB-339A.yaml +++ b/resources/units/aircraft/MB-339A.yaml @@ -6,3 +6,17 @@ role: Light Attack max_range: 200 variants: MB-339A: {} +radios: + intra_flight: SRT-651/N + inter_flight: AN/ARC-150(V) 2 + channels: + # The common allocator is sufficient for Liberation's purposes. There are + # more than 20 channels available on COMM2 (manual says 100, ME says 30, + # presumably only 30 can be truly *pre* set, and the other 70 can be set in + # the cockpit). We never need that many though, so no sense customizing + # further. + type: common + # COMM1 us UHF only. COMM2 is V/UHF. We prefer allocating intra-flight on + # VHF because it's less contested, so intra-flight goes to COMM2. + intra_flight_radio_index: 2 + inter_flight_radio_index: 1