From 1dfc625f79287fb1fe9b0588b325b3af8c3e8caf Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 18 Nov 2021 23:22:28 -0800 Subject: [PATCH] Clarify display of start times. --- game/ato/flightstate/uninitialized.py | 12 +++++++++++- game/ato/flightstate/waitingforstart.py | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/game/ato/flightstate/uninitialized.py b/game/ato/flightstate/uninitialized.py index a94dfdf5..51ecbcf1 100644 --- a/game/ato/flightstate/uninitialized.py +++ b/game/ato/flightstate/uninitialized.py @@ -21,4 +21,14 @@ class Uninitialized(FlightState): def description(self) -> str: estimator = TotEstimator(self.flight.package) delay = estimator.mission_start_time(self.flight) - return f"Starting in {delay}" + if self.flight.start_type is StartType.COLD: + action = "Starting up" + elif self.flight.start_type is StartType.WARM: + action = "Taxiing" + elif self.flight.start_type is StartType.RUNWAY: + action = "Taking off" + elif self.flight.start_type is StartType.IN_FLIGHT: + action = "In flight" + else: + raise ValueError(f"Unhandled StartType: {self.flight.start_type}") + return f"{action} in {delay}" diff --git a/game/ato/flightstate/waitingforstart.py b/game/ato/flightstate/waitingforstart.py index 4463a725..5f058baa 100644 --- a/game/ato/flightstate/waitingforstart.py +++ b/game/ato/flightstate/waitingforstart.py @@ -57,4 +57,14 @@ class WaitingForStart(FlightState): @property def description(self) -> str: - return f"Waiting for startup at {self.start_time:%H:%M:%S}" + if self.start_type is StartType.COLD: + start_type = "startup" + elif self.start_type is StartType.WARM: + start_type = "taxi" + elif self.start_type is StartType.RUNWAY: + start_type = "takeoff" + elif self.start_type is StartType.IN_FLIGHT: + start_type = "air start" + else: + raise ValueError(f"Unhandled StartType: {self.start_type}") + return f"Waiting for {start_type} at {self.start_time:%H:%M:%S}"