Add QNH and temperature to the kneeboard.

This commit is contained in:
Magnus Wolffelt
2021-07-16 00:34:58 +02:00
committed by GitHub
parent 62036a273e
commit 2b696144e3
3 changed files with 30 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ from typing import Optional
from dcs.mission import Mission
from game.weather import Clouds, Fog, Conditions, WindConditions, AtmosphericConditions
from .units import inches_hg_to_mm_hg
class EnvironmentGenerator:
@@ -11,8 +12,7 @@ class EnvironmentGenerator:
self.conditions = conditions
def set_atmospheric(self, atmospheric: AtmosphericConditions) -> None:
inch_to_mm = 25.400002776728
self.mission.weather.qnh = atmospheric.qnh_inches_mercury * inch_to_mm
self.mission.weather.qnh = inches_hg_to_mm_hg(atmospheric.qnh_inches_mercury)
self.mission.weather.season_temperature = atmospheric.temperature_celsius
def set_clouds(self, clouds: Optional[Clouds]) -> None: