redefine the constructor to be more flexible with constraints, etc.
This commit is contained in:
@@ -37,7 +37,7 @@ class Inbound:
|
||||
|
||||
# find the nearest runway for an initial guess
|
||||
distance = 100000.0
|
||||
currentPosition = Waypoint('', self.Report.position.latitude, self.Report.position.longitude)
|
||||
currentPosition = Waypoint(latitude = self.Report.position.latitude, longitude = self.Report.position.longitude)
|
||||
for runway in sequencingConfig.ActiveArrivalRunways:
|
||||
candidateDistance = runway.Runway.Start.haversine(currentPosition)
|
||||
if distance > candidateDistance:
|
||||
@@ -70,7 +70,7 @@ class Inbound:
|
||||
|
||||
# calculate descend profile
|
||||
flightTimeSeconds = 0
|
||||
currentHeading = Waypoint('', self.Report.position.latitude, self.Report.position.longitude).bearing(self.PlannedStar.Route[0])
|
||||
currentHeading = Waypoint(latitude = self.Report.position.latitude, longitude = self.Report.position.longitude).bearing(self.PlannedStar.Route[0])
|
||||
distanceToWaypoint = self.Report.distanceToIAF
|
||||
nextWaypointIndex = 0
|
||||
currentPosition = [ self.Report.dynamics.altitude, self.Report.dynamics.groundSpeed ]
|
||||
|
||||
Reference in New Issue
Block a user