Put back all the radio data.

This commit is contained in:
Dan Albert 2021-06-12 20:54:40 -07:00
parent 4aa905716b
commit ba3cf4d2bd
23 changed files with 233 additions and 29 deletions

View File

@ -16,6 +16,17 @@ from game.radio.channels import (
ChannelNamer,
RadioChannelAllocator,
CommonRadioChannelAllocator,
HueyChannelNamer,
SCR522ChannelNamer,
ViggenChannelNamer,
ViperChannelNamer,
TomcatChannelNamer,
MirageChannelNamer,
SingleRadioChannelNamer,
FarmerRadioChannelAllocator,
SCR522RadioChannelAllocator,
ViggenRadioChannelAllocator,
NoOpChannelAllocator,
)
from game.utils import Speed, kph
@ -55,11 +66,27 @@ class RadioConfig:
alloc_type = data["type"]
except KeyError:
return None
return {"common": CommonRadioChannelAllocator}[alloc_type].from_cfg(data)
allocator_type: Type[RadioChannelAllocator] = {
"SCR-522": SCR522RadioChannelAllocator,
"common": CommonRadioChannelAllocator,
"farmer": FarmerRadioChannelAllocator,
"noop": NoOpChannelAllocator,
"viggen": ViggenRadioChannelAllocator,
}[alloc_type]
return allocator_type.from_cfg(data)
@classmethod
def make_namer(cls, config: dict[str, Any]) -> Type[ChannelNamer]:
return {"default": ChannelNamer}[config.get("namer", "default")]
return {
"SCR-522": SCR522ChannelNamer,
"default": ChannelNamer,
"huey": HueyChannelNamer,
"mirage": MirageChannelNamer,
"single": SingleRadioChannelNamer,
"tomcat": TomcatChannelNamer,
"viggen": ViggenChannelNamer,
"viper": ViperChannelNamer,
}[config.get("namer", "default")]
@dataclass(frozen=True)

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: The A-10C Thunderbolt II, also known as the Warthog, is a 'flying gun'.
description:
The A-10C Thunderbolt II, also known as the Warthog, is a 'flying gun'.
The A-10C is a high-survivability and versatile aircraft, popular with pilots for
the 'get home' effectiveness.The mission of the aircraft is ground attack against
tanks, armored vehicles and installations, and close air support of ground forces.
@ -12,3 +13,8 @@ price: 22
role: Close Air Support/Attack
variants:
A-10C Thunderbolt II (Suite 3): {}
radios:
# VHF for intraflight is not accepted anymore by DCS
# (see https://forums.eagle.ru/showthread.php?p=4499738).
intra_flight: AN/ARC-164
inter_flight: AN/ARC-164

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: The A-10C Thunderbolt II, also known as the Warthog, is a 'flying gun'.
description:
The A-10C Thunderbolt II, also known as the Warthog, is a 'flying gun'.
The A-10C is a high-survivability and versatile aircraft, popular with pilots for
the 'get home' effectiveness.The mission of the aircraft is ground attack against
tanks, armored vehicles and installations, and close air support of ground forces.
@ -12,3 +13,8 @@ price: 24
role: Close Air Support/Attack
variants:
A-10C Thunderbolt II (Suite 7): {}
radios:
# VHF for intraflight is not accepted anymore by DCS
# (see https://forums.eagle.ru/showthread.php?p=4499738).
intra_flight: AN/ARC-164
inter_flight: AN/ARC-164

View File

@ -1,4 +1,5 @@
description: "The AJS-37 Viggen is a Swedish double-delta supersonic attack aircraft\
description:
"The AJS-37 Viggen is a Swedish double-delta supersonic attack aircraft\
\ from the late Cold War. It was the backbone of the Swedish Air Force during the\
\ Cold war, serving as the main attack and anti-ship platform. The AJS is the 90\u2019\
s upgrade of this 70's era aircraft, adding several advanced weapons and systems\
@ -18,3 +19,13 @@ price: 12
role: Attack/Reconnaissance
variants:
AJS-37 Viggen: {}
radios:
# The AJS37 has somewhat unique radio configuration. Two backup radio
# (FR 24) can only operate simultaneously with the main radio in guard
# mode. As such, we only use the main radio for both inter- and intra-
# flight communication.
intra_flight: FR 22
inter_flight: FR 22
channels:
type: viggen
namer: viggen

View File

@ -1,5 +1,6 @@
carrier_capable: true
description: 'The AV-8B project was born in the early 1970''s as an effort to address
description:
'The AV-8B project was born in the early 1970''s as an effort to address
the operational inadequacies of the AV-8A first generation Harrier, aimed to dramatically
improve the capabilities and performance of the early AV-8A''s. The AV-8B made its
maiden flight in November 1981 and entered service with the United States Marine
@ -28,3 +29,10 @@ price: 14
role: V/STOL Attack
variants:
AV-8B Harrier II Night Attack: {}
radios:
intra_flight: AN/ARC-210
inter_flight: AN/ARC-210
channels:
type: common
intra_flight_radio_index: 1
inter_flight_radio_index: 2

View File

@ -1,5 +1,6 @@
carrier_capable: true
description: "The Grumman F-14 Tomcat is a two-crew, variable wing-geometry, maritime\
description:
"The Grumman F-14 Tomcat is a two-crew, variable wing-geometry, maritime\
\ air superiority fighter that served with the US Navy for 32 years and continues\
\ to serve with the IRIAF in Iran. The F-14 was the US Navy's frontline fighter\
\ from the 1970s to the mid-2000s. Over the course of its long service it also became\
@ -22,3 +23,11 @@ price: 20
role: Carrier-based Air-Superiority Fighter/Fighter Bomber
variants:
F-14A Tomcat (Block 135-GR Late): {}
radios:
intra_flight: AN/ARC-182
inter_flight: AN/ARC-159
channels:
type: common
namer: tomcat
intra_flight_radio_index: 2
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
carrier_capable: true
description: "The Grumman F-14 Tomcat is a two-crew, variable wing-geometry, maritime\
description:
"The Grumman F-14 Tomcat is a two-crew, variable wing-geometry, maritime\
\ air superiority fighter that served with the US Navy for 32 years and continues\
\ to serve with the IRIAF in Iran. The F-14 was the US Navy's frontline fighter\
\ from the 1970s to the mid-2000s. Over the course of its long service it also became\
@ -22,3 +23,11 @@ price: 24
role: Carrier-based Air-Superiority Fighter/Fighter Bomber
variants:
F-14B Tomcat: {}
radios:
intra_flight: AN/ARC-182
inter_flight: AN/ARC-159
channels:
type: common
namer: tomcat
intra_flight_radio_index: 2
inter_flight_radio_index: 1

View File

@ -1,4 +1,5 @@
description: 'The F-16C is a single seat, single engine multirole fighter that was
description:
"The F-16C is a single seat, single engine multirole fighter that was
developed in the 1970s. More than 4,500 units were manufactured and are operated
today by 26 countries where the aircraft performs numerous missions that include
air superiority, close air support, precision bombing, air defense suppression,
@ -20,7 +21,7 @@ description: 'The F-16C is a single seat, single engine multirole fighter that w
The Viper is armed for air-to-air combat with Sidewinders, AMRAAMs, and an internal
20mm 6-barrel Gatling gun. It can also be loaded with a wide range of air-to-ground
weapons that include general purpose bombs, rockets, canister munition, Mavericks,
laser- and GPS-guided bombs, and more'
laser- and GPS-guided bombs, and more"
introduced: 1991
manufacturer: General Dynamics
origin: USA
@ -29,3 +30,13 @@ role: Multirole Fighter
variants:
F-16CM Fighting Falcon (Block 50): {}
F-2A: {}
radios:
intra_flight: AN/ARC-222
inter_flight: AN/ARC-164
channels:
type: common
namer: viper
# COM2 is the AN/ARC-222, which is the VHF radio we want to use for
# intra-flight communication to leave COM1 open for UHF inter-flight.
intra_flight_radio_index: 2
inter_flight_radio_index: 1

View File

@ -1,4 +1,5 @@
description: The F-22A is an American single-seat, twin-engine, all-weather stealth
description:
The F-22A is an American single-seat, twin-engine, all-weather stealth
tactical fighter aircraft developed exclusively for the United States Air Force
(USAF). The result of the USAF's Advanced Tactical Fighter (ATF) program, the aircraft
was designed primarily as an air superiority fighter, but also has ground attack,
@ -11,3 +12,8 @@ price: 40
role: Stealth Air-Superiority Fighter
variants:
F-22A Raptor: {}
radios:
# I seriously doubt this is using the Mustang's radio but this is what was
# here before.
intra_flight: SCR-522
inter_flight: SCR-522

View File

@ -1,4 +1,5 @@
description: The Saab JAS 39 Gripen is a light single-engine multirole fighter aircraft
description:
The Saab JAS 39 Gripen is a light single-engine multirole fighter aircraft
manufactured by the Swedish aerospace company Saab AB. The Gripen has a delta wing
and canard configuration with relaxed stability design and fly-by-wire flight controls.
Various versions have been built, grouped as A-, C- and E-series. This is the AA
@ -10,3 +11,6 @@ price: 26
role: Fighter
variants:
JAS 39 Gripen: {}
radios:
intra_flight: R&S Series 6000
inter_flight: R&S Series 6000

View File

@ -1,4 +1,5 @@
description: The Saab JAS 39 Gripen is a light single-engine multirole fighter aircraft
description:
The Saab JAS 39 Gripen is a light single-engine multirole fighter aircraft
manufactured by the Swedish aerospace company Saab AB. The Gripen has a delta wing
and canard configuration with relaxed stability design and fly-by-wire flight controls.
Various versions have been built, grouped as A-, C- and E-series. This is the AG
@ -10,3 +11,6 @@ price: 26
role: Attack
variants:
JAS 39 Gripen A/G: {}
radios:
intra_flight: R&S Series 6000
inter_flight: R&S Series 6000

View File

@ -1,4 +1,5 @@
description: "JF-17 is a single seat, single engine, multirole light fighter that\
description:
"JF-17 is a single seat, single engine, multirole light fighter that\
\ was joint developed by AVIC Chengdu and Pakistan Aeronautical Complex (PAC). The\
\ design phase of JF-17 \"Thunder\" finished at May 31st, 2002, and the maiden flight\
\ was made on August 25th, 2003. The first plane delivered to PAF (Pakistan Air\
@ -23,3 +24,12 @@ variants:
FC-1 Fierce Dragon:
introduced: null
JF-17 Thunder: {}
radios:
intra_flight: R&S M3AR VHF
inter_flight: R&S M3AR UHF
channels:
type: common
# Same naming pattern as the Viper, so just reuse that.
namer: viper
intra_flight_radio_index: 1
inter_flight_radio_index: 1

View File

@ -1,10 +1,11 @@
always_keeps_gun: true
carrier_capable: true
description: 'The Ka-50 Black Shark (NATO reporting name: Hokum) is a unique and deadly
description:
"The Ka-50 Black Shark (NATO reporting name: Hokum) is a unique and deadly
single-seat, Russian attack helicopter that has seen combat in the Northern Caucasus.
It combines a high performance dual rotor system with a deadly weapons payload of
guided missiles, rockets, bombs, and a 30mm cannon. The Ka-50 is also unique in
that it has an ejection seat.'
that it has an ejection seat."
introduced: 1995
lha_capable: true
manufacturer: Kamov
@ -13,3 +14,9 @@ price: 13
role: Attack
variants:
Ka-50 Hokum: {}
radios:
intra_flight: R-800L1
inter_flight: R-800L1
# The R-800L1 doesn't have preset channels, and the other radio is for
# communications with FAC and ground units, which don't currently have
# radios assigned, so no channels to configure.

View File

@ -1,4 +1,5 @@
description: The M-2000C is a multi-role, French-designed, 4th generation fighter.
description:
The M-2000C is a multi-role, French-designed, 4th generation fighter.
It was designed in the 1970s as a lightweight fighter and in excess of 600 M-2000C
aircraft have been built. The M2000C is a single-engine fighter will a low-set delta
wing with no horizontal tail. It has excellent maneuverability given its relaxed
@ -13,3 +14,11 @@ price: 16
role: Multirole Fighter
variants:
Mirage 2000C: {}
radios:
intra_flight: TRT ERA 7200 UHF
inter_flight: TRT ERA 7000 V/UHF
channels:
type: common
namer: mirage
intra_flight_radio_index: 2
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: Developed in the years immediately following World War II, the MiG-15bis
description:
Developed in the years immediately following World War II, the MiG-15bis
was a first-generation jet fighter designed by the Mikoyan-Gurevich design bureau
of the Soviet Union. The MiG-15bis is a single engine, swept-wing jet that saw over
15,000 copies produced. The MiG-15 gained fame in the skies over Korea where it
@ -16,3 +17,6 @@ price: 4
role: Fighter
variants:
MiG-15bis Fagot: {}
radios:
intra_flight: RSI-6K HF
inter_flight: RSI-6K HF

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: "The MiG-19P Farmer was designed by the legendary Mikoyan Design Bureau\
description:
"The MiG-19P Farmer was designed by the legendary Mikoyan Design Bureau\
\ in the Early 1950\u2019s. The MiG-19 fighter was the Soviet Union\u2019s first\
\ true supersonic Interceptor that could exceed Mach 1 in level flight.\n\nDesigned\
\ to take on enemy fighters and bombers at any time of day or night and in any weather\
@ -19,3 +20,9 @@ variants:
manufacturer: Shenyang
origin: China
MiG-19P Farmer-B: {}
radios:
intra_flight: RSIU-4V
inter_flight: RSIU-4V
channels:
type: farmer
namer: single

View File

@ -1,4 +1,5 @@
description: The MiG-21bis is a delta wing, supersonic, fighter-interceptor jet aircraft.
description:
The MiG-21bis is a delta wing, supersonic, fighter-interceptor jet aircraft.
Much like the AK-47 became the everyman's rifle, the MiG-21 has been operated by
more than 40 countries worldwide, and has enjoyed the longest production run of
any modern jet fighter to date. The MiG-21, in all of its variants, has fought in
@ -16,3 +17,11 @@ variants:
manufacturer: Chengdu
origin: China
MiG-21bis Fishbed-N: {}
radios:
intra_flight: RSIU-5V
inter_flight: RSIU-5V
channels:
type: common
namer: single
intra_flight_radio_index: 1
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: 'The P-47 Thunderbolt, nicknamed the Jug, served the United States Army
description:
"The P-47 Thunderbolt, nicknamed the Jug, served the United States Army
Air Forces (USAAF) in World War II with distinction. In total 15,636 were built
between 1941 and 1945. France, the United Kingdom, the Soviet Union, Mexico and
Brazil also operated the P-47. It was armed with an impressive eight .50-caliber
@ -12,7 +13,7 @@ description: 'The P-47 Thunderbolt, nicknamed the Jug, served the United States
exceptional power and durability. The Jug substantial weight gave it tremendous
dive speed acceleration but the aircraft suffered from quite low Mach limits and
hence the aircraft was equipped with dive flaps to avoid dangerous effects of compressibility.
The bubble canopy of the D version of the P-47 provided excellent all round visibility.'
The bubble canopy of the D version of the P-47 provided excellent all round visibility."
introduced: 1944
manufacturer: Republic
origin: USA
@ -21,3 +22,11 @@ role: Fighter-Bomber
variants:
P-47D-30 Thunderbolt (Late): {}
Thunderbolt Mk.II (Mid): {}
radios:
intra_flight: SCR522
inter_flight: SCR522
channels:
type: common
namer: SCR-522
intra_flight_radio_index: 1
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: 'The P-47 Thunderbolt, nicknamed the Jug, served the United States Army
description:
"The P-47 Thunderbolt, nicknamed the Jug, served the United States Army
Air Forces (USAAF) in World War II with distinction. In total 15,636 were built
between 1941 and 1945. France, the United Kingdom, the Soviet Union, Mexico and
Brazil also operated the P-47. It was armed with an impressive eight .50-caliber
@ -12,7 +13,7 @@ description: 'The P-47 Thunderbolt, nicknamed the Jug, served the United States
exceptional power and durability. The Jug substantial weight gave it tremendous
dive speed acceleration but the aircraft suffered from quite low Mach limits and
hence the aircraft was equipped with dive flaps to avoid dangerous effects of compressibility.
The bubble canopy of the D version of the P-47 provided excellent all round visibility.'
The bubble canopy of the D version of the P-47 provided excellent all round visibility."
introduced: 1944
manufacturer: Republic
origin: USA
@ -21,3 +22,11 @@ role: Fighter-Bomber
variants:
P-47D-30 Thunderbolt (Early): {}
Thunderbolt Mk.II (Early): {}
radios:
intra_flight: SCR522
inter_flight: SCR522
channels:
type: common
namer: SCR-522
intra_flight_radio_index: 1
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: 'The P-47 Thunderbolt, nicknamed the Jug, served the United States Army
description:
"The P-47 Thunderbolt, nicknamed the Jug, served the United States Army
Air Forces (USAAF) in World War II with distinction. In total 15,636 were built
between 1941 and 1945. France, the United Kingdom, the Soviet Union, Mexico and
Brazil also operated the P-47. It was armed with an impressive eight .50-caliber
@ -12,7 +13,7 @@ description: 'The P-47 Thunderbolt, nicknamed the Jug, served the United States
exceptional power and durability. The Jug substantial weight gave it tremendous
dive speed acceleration but the aircraft suffered from quite low Mach limits and
hence the aircraft was equipped with dive flaps to avoid dangerous effects of compressibility.
The bubble canopy of the D version of the P-47 provided excellent all round visibility.'
The bubble canopy of the D version of the P-47 provided excellent all round visibility."
introduced: 1944
manufacturer: Republic
origin: USA
@ -21,3 +22,11 @@ role: Fighter-Bomber
variants:
P-47D-40 Thunderbolt: {}
Thunderbolt Mk.II (Late): {}
radios:
intra_flight: SCR522
inter_flight: SCR522
channels:
type: common
namer: SCR-522
intra_flight_radio_index: 1
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: The North American Aviation P-51 Mustang is an American long-range, single-seat
description:
The North American Aviation P-51 Mustang is an American long-range, single-seat
fighter and fighter-bomber used during World War II and the Korean War, among other
conflicts. From late 1943, P-51Bs and P-51Cs (supplemented by P-51Ds from mid-1944)
were used by the USAAF's Eighth Air Force to escort bombers in raids over Germany,
@ -22,3 +23,11 @@ role: Fighter
variants:
Mustang Mk.IV (Late): {}
P-51D-30-NA Mustang: {}
radios:
intra_flight: SCR522
inter_flight: SCR522
channels:
type: common
namer: SCR-522
intra_flight_radio_index: 1
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
always_keeps_gun: true
description: The North American Aviation P-51 Mustang is an American long-range, single-seat
description:
The North American Aviation P-51 Mustang is an American long-range, single-seat
fighter and fighter-bomber used during World War II and the Korean War, among other
conflicts. From late 1943, P-51Bs and P-51Cs (supplemented by P-51Ds from mid-1944)
were used by the USAAF's Eighth Air Force to escort bombers in raids over Germany,
@ -22,3 +23,11 @@ role: Fighter
variants:
Mustang Mk.IV (Early): {}
P-51D-25-NA Mustang: {}
radios:
intra_flight: SCR522
inter_flight: SCR522
channels:
type: common
namer: SCR-522
intra_flight_radio_index: 1
inter_flight_radio_index: 1

View File

@ -1,5 +1,6 @@
carrier_capable: true
description: The UH-1 Iroquois, better known as the Huey, is one of the most iconic
description:
The UH-1 Iroquois, better known as the Huey, is one of the most iconic
helicopters in the world. Indispensable in the Vietnam War, the Huey continues to
serve in both military and civilian roles around the globe today.
introduced: 1967
@ -11,3 +12,14 @@ role: Transport/Light Attack
variants:
UH-1D Iroquois: {}
UH-1H Iroquois: {}
radios:
# Ideally this would use the AN/ARC-131 because that radio is supposed
# to be used for flight comms, but DCS won't allow it as the flight's
# frequency, nor will it allow the AN/ARC-134.
intra_flight: AN/ARC-51BX
inter_flight: AN/ARC-51BX
channels:
type: common
namer: huey
intra_flight_radio_index: 1
inter_flight_radio_index: 1