allow unset weather provider

This commit is contained in:
Sven Czarnian
2021-11-22 16:19:46 +01:00
parent 18577ebe9a
commit f021baf4cc
4 changed files with 13 additions and 6 deletions

View File

@@ -98,6 +98,9 @@ class WeatherModel:
return ias * math.sqrt(1.225 / self.densityModel(altitude).item())
def updateWindModel(self):
if None == self.Weather or None == self.Weather.Provider:
return
if None == self.LastWeatherUpdate or self.LastWeatherUpdate != self.Weather.Provider.UpdateTime:
self.MinimumAltitude = 1000000
self.MaximumAltitude = -1