From 43eb041bb8f33bf70e02aa7ac8ae4fe8f156fbbc Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 5 Nov 2020 14:27:14 -0800 Subject: [PATCH] Fix escort planning for racetracks. --- gen/ato.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen/ato.py b/gen/ato.py index 69e868df..d814e5ee 100644 --- a/gen/ato.py +++ b/gen/ato.py @@ -104,10 +104,13 @@ class Package: if waypoint is None: continue tot = flight.flight_plan.tot_for_waypoint(waypoint) + if tot is None: + tot = flight.flight_plan.depart_time_for_waypoint(waypoint) if tot is None: logging.error( f"{flight} dismissed escort at {waypoint} but that " - "waypoint has no TOT. It may not be escorted.") + "waypoint has no TOT or departure time. It may not be " + "escorted.") continue times.append(tot) if times: