mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Improve speed estimations.
Reasonable ground speed depends a lot on altitude, so plumb that information through to the speed estimator. Also adds calculations for ground speed based on desired mach. I don't know if DCS is using the same formulas, but we should at least be pretty close.
This commit is contained in:
@@ -122,6 +122,8 @@ class QTopPanel(QFrame):
|
||||
def negative_start_packages(self) -> List[Package]:
|
||||
packages = []
|
||||
for package in self.game_model.ato_model.ato.packages:
|
||||
if not package.flights:
|
||||
continue
|
||||
estimator = TotEstimator(package)
|
||||
for flight in package.flights:
|
||||
if estimator.mission_start_time(flight) < 0:
|
||||
|
||||
@@ -136,8 +136,11 @@ class QPackageDialog(QDialog):
|
||||
self.package_model.update_tot(seconds)
|
||||
|
||||
def reset_tot(self) -> None:
|
||||
self.package_model.update_tot(
|
||||
TotEstimator(self.package_model.package).earliest_tot())
|
||||
if not list(self.package_model.flights):
|
||||
self.package_model.update_tot(0)
|
||||
else:
|
||||
self.package_model.update_tot(
|
||||
TotEstimator(self.package_model.package).earliest_tot())
|
||||
self.tot_spinner.setTime(self.tot_qtime())
|
||||
|
||||
def on_selection_changed(self, selected: QItemSelection,
|
||||
|
||||
Reference in New Issue
Block a user