Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dcs/mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ def loaddict(fname: str, mizfile: zipfile.ZipFile, reserved_files: List[str]) ->
self.terrain = terrain_.MarianaIslands()
elif imp_mission["theatre"] == "Falklands":
self.terrain = terrain_.Falklands()
elif imp_mission["theatre"] == "GermanyCW":
self.terrain = terrain_.Germany()
elif imp_mission["theatre"] == "Kola":
self.terrain = terrain_.Kola()
else:
raise RuntimeError("Unknown theatre: '{theatre}'".format(theatre=imp_mission["theatre"]))

Expand Down
2 changes: 2 additions & 0 deletions dcs/terrain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from dcs.terrain.terrain import RunwayOccupiedError, NoParkingSlotError, Graph, Node, MapView
from dcs.terrain.caucasus.caucasus import Caucasus
from dcs.terrain.falklands import Falklands
from dcs.terrain.germany import Germany
from dcs.terrain.kola import Kola
from dcs.terrain.nevada import Nevada
from dcs.terrain.normandy import Normandy
from dcs.terrain.persiangulf import PersianGulf
Expand Down
1 change: 1 addition & 0 deletions dcs/terrain/germany/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .germany import Germany
24,145 changes: 24,145 additions & 0 deletions dcs/terrain/germany/airports.py

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions dcs/terrain/germany/germany.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import datetime

from dcs import mapping
from dcs.terrain import Terrain, MapView
from .airports import ALL_AIRPORTS
from .projection import PARAMETERS


class Germany(Terrain):

temperature = [
(-5, 5),
(-5, 5),
(0, 15),
(0, 15),
(0, 15),
(10, 30),
(10, 30),
(10, 30),
(0, 15),
(0, 15),
(0, 15),
(-5, 5)
]
assert len(temperature) == 12

def __init__(self):
bounds = mapping.Rectangle(200000, -600000, -1100000, -300000, self)
super().__init__(
"GermanyCW",
PARAMETERS,
bounds=bounds,
map_view_default=MapView(bounds.center(), self, 1000000),
utc_offset=datetime.zoneinfo(datetime.timedelta(hours=2))
)
self.bullseye_blue = {"x": bounds.center().x, "y": bounds.center().y}
self.bullseye_red = {"x": bounds.center().x, "y": bounds.center().y}

self.airports = {a.name: a(self) for a in ALL_AIRPORTS}
10 changes: 10 additions & 0 deletions dcs/terrain/germany/projection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DO NOT EDIT:
# This file is generated by tools/export_map_projection.py.
from dcs.terrain.projections import TransverseMercator

PARAMETERS = TransverseMercator(
central_meridian=21,
false_easting=35427.619999985734,
false_northing=-6061633.128000011,
scale_factor=0.9996,
)
1 change: 1 addition & 0 deletions dcs/terrain/kola/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .kola import Kola
4,052 changes: 4,052 additions & 0 deletions dcs/terrain/kola/airports.py

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions dcs/terrain/kola/kola.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import datetime

from dcs import mapping
from dcs.terrain import Terrain, MapView
from .airports import ALL_AIRPORTS
from .projection import PARAMETERS


class Kola(Terrain):

temperature = [
(-14, 7),
(-14, 7),
(-3, 15),
(-3, 15),
(-3, 15),
(10, 20),
(10, 20),
(10, 20),
(-3, 15),
(-3, 15),
(-3, 15),
(-14, 7),
]
assert len(temperature) == 12

def __init__(self):
bounds = mapping.Rectangle(900000, -900000, -315000, 855500, self)
super().__init__(
"Kola",
PARAMETERS,
bounds=bounds,
map_view_default=MapView(bounds.center(), self, 1000000),
utc_offset=datetime.zoneinfo(datetime.timedelta(hours=2))
)
self.bullseye_blue = {"x": bounds.center().x, "y": bounds.center().y}
self.bullseye_red = {"x": bounds.center().x, "y": bounds.center().y}

self.airports = {a.name: a(self) for a in ALL_AIRPORTS}
10 changes: 10 additions & 0 deletions dcs/terrain/kola/projection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DO NOT EDIT:
# This file is generated by tools/export_map_projection.py.
from dcs.terrain.projections import TransverseMercator

PARAMETERS = TransverseMercator(
central_meridian=21,
false_easting=-62702.00000000087,
false_northing=-7543624.999999979,
scale_factor=0.9996,
)
2 changes: 1 addition & 1 deletion dcs/terrain/marianaislands/marianaislands.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self):
PARAMETERS,
bounds=mapping.Rectangle(1000 * 10000, -1000 * 1000, -300 * 1000, 500 * 1000, self),
map_view_default=MapView(mapping.Point(76432, 48051, self), self, 1000000),
utc_offset=datetime.timezone(datetime.timedelta(hours=-10))
utc_offset=datetime.timezone(datetime.timedelta(hours=10))
)

self.airports = {a.name: a(self) for a in ALL_AIRPORTS}
4 changes: 4 additions & 0 deletions tools/export_map_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
from dcs.action import DoScriptFile
from dcs.terrain.caucasus import Caucasus
from dcs.terrain.falklands import Falklands
from dcs.terrain.germany import Germany
from dcs.terrain.kola import Kola
from dcs.terrain.nevada import Nevada
from dcs.terrain.normandy import Normandy
from dcs.terrain.persiangulf import PersianGulf
Expand Down Expand Up @@ -69,6 +71,8 @@
"sinai": Sinai(),
"syria": Syria(),
"marianaislands": MarianaIslands(),
"germany": Germany(),
"kola": Kola()
}


Expand Down
Loading