mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add wind, cloud base and BRC info to kneeboard
This commit is contained in:
parent
c45795434a
commit
80a7d7da2d
@ -43,7 +43,7 @@ from game.radio.radios import RadioFrequency
|
||||
from game.runways import RunwayData
|
||||
from game.theater import TheaterGroundObject, TheaterUnit
|
||||
from game.theater.bullseye import Bullseye
|
||||
from game.utils import Distance, UnitSystem, meters, mps, pounds
|
||||
from game.utils import Distance, UnitSystem, meters, mps, pounds, knots, feet
|
||||
from game.weather import Weather
|
||||
from .aircraft.flightdata import FlightData
|
||||
from .missiondata import AwacsInfo, TankerInfo
|
||||
@ -402,6 +402,19 @@ class BriefingPage(KneeboardPage):
|
||||
writer.text(
|
||||
f"Turbulence: {round(self.weather.atmospheric.turbulence_per_10cm)} per 10cm at ground level."
|
||||
)
|
||||
writer.text(
|
||||
f"Wind: {self.weather.wind.at_0m.direction}°"
|
||||
f" / {round(mps(self.weather.wind.at_0m.speed).knots)}kts (0ft)"
|
||||
f" ; {self.weather.wind.at_2000m.direction}°"
|
||||
f" / {round(mps(self.weather.wind.at_2000m.speed).knots)}kts (~6500ft)"
|
||||
f" ; {self.weather.wind.at_8000m.direction}°"
|
||||
f" / {round(mps(self.weather.wind.at_8000m.speed).knots)}kts (~26000ft)"
|
||||
)
|
||||
c = self.weather.clouds
|
||||
writer.text(
|
||||
f'Cloud base: {f"{int(round(meters(c.base).feet, -2))}ft" if c else "CAVOK"}'
|
||||
f'{f", {c.preset.ui_name[:-2]}" if c and c.preset else ""}'
|
||||
)
|
||||
|
||||
fl = self.flight
|
||||
|
||||
|
||||
@ -522,7 +522,6 @@ class GenericCarrierGenerator(GroundObjectGenerator):
|
||||
callsign: str,
|
||||
icls: Optional[int],
|
||||
) -> None:
|
||||
# TODO: Make unit name usable.
|
||||
# This relies on one control point mapping exactly
|
||||
# to one LHA, carrier, or other usable "runway".
|
||||
# This isn't wholly true, since the DD escorts of
|
||||
@ -533,7 +532,7 @@ class GenericCarrierGenerator(GroundObjectGenerator):
|
||||
self.runways[self.control_point.name] = RunwayData(
|
||||
self.control_point.name,
|
||||
brc,
|
||||
"N/A",
|
||||
f"{brc.degrees:03}",
|
||||
atc=atc,
|
||||
tacan=tacan,
|
||||
tacan_callsign=callsign,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user