Adds Marianas Islands support (#1406)

* Implements #1399

* Reverting accidental change in generate_landmap.py

* Changelog update

* Import beacon data for Marianas.

Co-authored-by: Dan Albert <dan@gingerhq.net>
This commit is contained in:
bgreman 2021-07-03 14:51:26 -04:00 committed by GitHub
parent 727facfb90
commit aa328d3ef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 229 additions and 5 deletions

View File

@ -13,6 +13,7 @@ Saves from 4.0.0 are compatible with 4.1.0.
## Features/Improvements
* **[Campaign]** Air defense sites now generate a fixed number of launchers per type.
* **[Campaign]** Added support for Mariana Islands map.
* **[Mission Generation]** Improvements for better support of the Skynet Plugin and long range SAMs are now acting as EWR
* **[Plugins]** Increased time JTAC Autolase messages stay visible on the UI.
* **[UI]** Added ability to take notes and have those notes appear as a kneeboard page.

View File

@ -29,6 +29,7 @@ from dcs.terrain import (
persiangulf,
syria,
thechannel,
marianaislands,
)
from dcs.terrain.terrain import Airport, Terrain
from dcs.unitgroup import (
@ -856,3 +857,22 @@ class SyriaTheater(ConflictTheater):
from .syria import PARAMETERS
return PARAMETERS
class MarianaIslandsTheater(ConflictTheater):
terrain = marianaislands.MarianaIslands()
overview_image = "marianaislands.gif"
landmap = load_landmap("resources\\marianaislandslandmap.p")
daytime_map = {
"dawn": (6, 8),
"day": (8, 16),
"dusk": (16, 18),
"night": (0, 5),
}
@property
def projection_parameters(self) -> TransverseMercator:
from .marianaislands import PARAMETERS
return PARAMETERS

View File

@ -0,0 +1,8 @@
from game.theater.projections import TransverseMercator
PARAMETERS = TransverseMercator(
central_meridian=147,
false_easting=238417.99999989968,
false_northing=-1491840.000000048,
scale_factor=0.9996,
)

View File

@ -96,4 +96,7 @@ VERSION = _build_version_string()
#: mission using map buildings as strike targets must check and potentially recreate
#: all those objectives. This definitely affects all Syria campaigns, other maps are
#: not yet verified.
CAMPAIGN_FORMAT_VERSION = (7, 0)
#:
#: Version 7.1
#: * Support for Mariana Islands terrain
CAMPAIGN_FORMAT_VERSION = (7, 1)

View File

@ -1521,4 +1521,47 @@ AIRFIELD_DATA = {
runway_length=3953,
atc=AtcData(MHz(3, 850), MHz(118, 200), MHz(38, 600), MHz(250, 200)),
),
"Antonio B. Won Pat Intl": AirfieldData(
theater="MarianaIslands",
icao="PGUM",
elevation=255,
runway_length=9359,
atc=AtcData(MHz(3, 825), MHz(118, 100), MHz(38, 550), MHz(340, 200)),
ils={
"06": ("IGUM", MHz(110, 30)),
},
),
"Andersen AFB": AirfieldData(
theater="MarianaIslands",
icao="PGUA",
elevation=545,
runway_length=10490,
tacan=TacanChannel(54, TacanBand.X),
tacan_callsign="UAM",
atc=AtcData(MHz(3, 850), MHz(126, 200), MHz(38, 600), MHz(250, 100)),
),
"Rota Intl": AirfieldData(
theater="MarianaIslands",
icao="PGRO",
elevation=568,
runway_length=6105,
atc=AtcData(MHz(3, 750), MHz(123, 600), MHz(38, 400), MHz(250, 0)),
),
"Tinian Intl": AirfieldData(
theater="MarianaIslands",
icao="PGWT",
elevation=240,
runway_length=7777,
atc=AtcData(MHz(3, 800), MHz(123, 650), MHz(38, 500), MHz(250, 50)),
),
"Saipan Intl": AirfieldData(
theater="MarianaIslands",
icao="PGSN",
elevation=213,
runway_length=7790,
atc=AtcData(MHz(3, 775), MHz(125, 700), MHz(38, 450), MHz(256, 900)),
ils={
"07": ("IGSN", MHz(109, 90)),
},
),
}

View File

@ -68,6 +68,7 @@ def load_icons():
ICONS["Terrain_Normandy"] = QPixmap("./resources/ui/terrain_normandy.gif")
ICONS["Terrain_TheChannel"] = QPixmap("./resources/ui/terrain_channel.gif")
ICONS["Terrain_Syria"] = QPixmap("./resources/ui/terrain_syria.gif")
ICONS["Terrain_Mariana"] = QPixmap("./resources/ui/terrain_mariana.gif")
ICONS["Dawn"] = QPixmap("./resources/ui/conditions/timeofday/dawn.png")
ICONS["Day"] = QPixmap("./resources/ui/conditions/timeofday/day.png")

View File

@ -19,7 +19,7 @@ pathspec==0.8.1
pefile==2019.4.18
Pillow==8.2.0
pre-commit==2.10.1
-e git://github.com/pydcs/dcs@7dea4f516d943c1f48454a46043b5f38d42a35f0#egg=pydcs
-e git://github.com/pydcs/dcs@75a8dd35331e8fd337ba05fe950732077433f378#egg=pydcs
pyinstaller==4.3
pyinstaller-hooks-contrib==2021.1
pyparsing==2.4.7

View File

@ -0,0 +1,135 @@
[
{
"name": "MTMACAJNA",
"callsign": "AJA",
"beacon_type": 9,
"hertz": 385000,
"channel": null
},
{
"name": "Nimitz",
"callsign": "UNZ",
"beacon_type": 6,
"hertz": 115800000,
"channel": 105
},
{
"name": "SAIPAN",
"callsign": "SN",
"beacon_type": 9,
"hertz": 312000,
"channel": null
},
{
"name": "ANDERSEN",
"callsign": "UAM",
"beacon_type": 5,
"hertz": null,
"channel": 54
},
{
"name": "",
"callsign": "IPMY",
"beacon_type": 15,
"hertz": 110150000,
"channel": null
},
{
"name": "",
"callsign": "IUAM",
"beacon_type": 15,
"hertz": 110100000,
"channel": null
},
{
"name": "",
"callsign": "IYIG",
"beacon_type": 15,
"hertz": 109350000,
"channel": null
},
{
"name": "",
"callsign": "IAND",
"beacon_type": 15,
"hertz": 109300000,
"channel": null
},
{
"name": "",
"callsign": "IUAM",
"beacon_type": 14,
"hertz": 110100000,
"channel": null
},
{
"name": "",
"callsign": "IAND",
"beacon_type": 14,
"hertz": 109300000,
"channel": null
},
{
"name": "",
"callsign": "IYIG",
"beacon_type": 14,
"hertz": 109350000,
"channel": null
},
{
"name": "",
"callsign": "IPMY",
"beacon_type": 14,
"hertz": 110150000,
"channel": null
},
{
"name": "",
"callsign": "IGUM",
"beacon_type": 14,
"hertz": 110300000,
"channel": null
},
{
"name": "",
"callsign": "PGUM",
"beacon_type": 15,
"hertz": 110300000,
"channel": null
},
{
"name": "",
"callsign": "IAWD",
"beacon_type": 14,
"hertz": 110900000,
"channel": null
},
{
"name": "",
"callsign": "PGUM",
"beacon_type": 15,
"hertz": 110900000,
"channel": null
},
{
"name": "ROTA",
"callsign": "GRO",
"beacon_type": 9,
"hertz": 332000,
"channel": null
},
{
"name": "",
"callsign": "IGSN",
"beacon_type": 14,
"hertz": 109900000,
"channel": null
},
{
"name": "",
"callsign": "PGSN",
"beacon_type": 15,
"hertz": 109900000,
"channel": null
}
]

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -39,6 +39,7 @@ from dcs.terrain.persiangulf import PersianGulf
from dcs.terrain.syria import Syria
from dcs.terrain.terrain import Terrain
from dcs.terrain.thechannel import TheChannel
from dcs.terrain.marianaislands import MarianaIslands
from dcs.triggers import TriggerStart
from pyproj import CRS, Transformer
@ -59,6 +60,7 @@ ARG_TO_TERRAIN_MAP = {
"persiangulf": PersianGulf(),
"thechannel": TheChannel(),
"syria": Syria(),
"marianaislands": MarianaIslands(),
}
# https://gisgeography.com/central-meridian/
@ -71,6 +73,7 @@ CENTRAL_MERIDIANS = {
"persiangulf": 57,
"thechannel": 3,
"syria": 39,
"marianaislands": 147,
}

View File

@ -5,10 +5,20 @@ import argparse
from pathlib import Path
from typing import List, Tuple, Union, Dict
from dcs.terrain import Caucasus, PersianGulf, Syria, Nevada, Normandy, TheChannel
from dcs.terrain import (
Caucasus,
PersianGulf,
Syria,
Nevada,
Normandy,
TheChannel,
MarianaIslands,
)
from dcs import Mission
Terrain = Union[Caucasus, PersianGulf, Syria, Nevada, Normandy, TheChannel]
Terrain = Union[
Caucasus, PersianGulf, Syria, Nevada, Normandy, TheChannel, MarianaIslands
]
SAVE_PATH = Path("resources/frontlines")

View File

@ -32,7 +32,7 @@ def _geometry_collection_to_multipoly(obj: GeometryCollection) -> MultiPolygon:
raise RuntimeError(f"Not sure how to convert collection to multipoly: {obj.wkt}")
for terrain in ["cau", "nev", "syria", "channel", "normandy", "gulf"]:
for terrain in ["cau", "nev", "syria", "channel", "normandy", "gulf", "marianaislands"]:
print("Terrain " + terrain)
m = Mission()
m.load_file("./{}_terrain.miz".format(terrain))

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB