Fix escort planning for racetracks.

This commit is contained in:
Dan Albert 2020-11-05 14:27:14 -08:00
parent 0b8ac8fc47
commit 43eb041bb8

View File

@ -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: