publish the used wind data as well
This commit is contained in:
@@ -123,22 +123,35 @@ class Euroscope:
|
|||||||
|
|
||||||
self.Context = None
|
self.Context = None
|
||||||
|
|
||||||
def sendSequence(self, airport : str, inbounds):
|
def sendSequence(self, airport : str, inbounds, weather):
|
||||||
if None == self.NotificationSocket:
|
if None == self.NotificationSocket:
|
||||||
return
|
return
|
||||||
|
|
||||||
sequence = Communication_pb2.AircraftSequence()
|
sequence = Communication_pb2.AircraftSequence()
|
||||||
sequence.airport = airport
|
sequence.airport = airport
|
||||||
|
|
||||||
|
# convert the wind data
|
||||||
|
if None != weather.Altitudes:
|
||||||
|
for i in range(0, len(weather.Altitudes)):
|
||||||
|
entry = sequence.windData.add()
|
||||||
|
entry.altitude = weather.Altitudes[i]
|
||||||
|
entry.direction = weather.Directions[i]
|
||||||
|
entry.speed = weather.Windspeeds[i]
|
||||||
|
|
||||||
|
# convert the inbound sequence
|
||||||
for inbound in inbounds:
|
for inbound in inbounds:
|
||||||
entry = sequence.sequence.add()
|
entry = sequence.sequence.add()
|
||||||
entry.callsign = inbound.Callsign
|
entry.callsign = inbound.Callsign
|
||||||
|
entry.fixed = inbound.FixedSequence
|
||||||
entry.arrivalRoute = inbound.PlannedStar.Name
|
entry.arrivalRoute = inbound.PlannedStar.Name
|
||||||
entry.arrivalRunway = inbound.PlannedRunway.Name
|
entry.arrivalRunway = inbound.PlannedRunway.Name
|
||||||
|
|
||||||
for waypoint in inbound.PlannedArrivalRoute:
|
for waypoint in inbound.PlannedArrivalRoute:
|
||||||
wp = entry.waypoints.add()
|
wp = entry.waypoints.add()
|
||||||
wp.name = waypoint.Waypoint.Name
|
wp.name = waypoint.Waypoint.Name
|
||||||
|
wp.altitude = waypoint.Altitude
|
||||||
|
wp.indicatedAirspeed = waypoint.IndicatedAirspeed
|
||||||
|
wp.groundspeed = waypoint.GroundSpeed
|
||||||
|
|
||||||
pta = str(waypoint.PTA)
|
pta = str(waypoint.PTA)
|
||||||
delimiter = pta.find('.')
|
delimiter = pta.find('.')
|
||||||
|
|||||||
Reference in New Issue
Block a user