From 39dcd03458e9e85703c556c5f397e251cff47c98 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Sat, 13 Nov 2021 09:57:23 +0100 Subject: [PATCH] publish the used wind data as well --- aman/com/Euroscope.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/aman/com/Euroscope.py b/aman/com/Euroscope.py index 0fceb4c..1c97a38 100644 --- a/aman/com/Euroscope.py +++ b/aman/com/Euroscope.py @@ -123,22 +123,35 @@ class Euroscope: self.Context = None - def sendSequence(self, airport : str, inbounds): + def sendSequence(self, airport : str, inbounds, weather): if None == self.NotificationSocket: return sequence = Communication_pb2.AircraftSequence() 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: entry = sequence.sequence.add() entry.callsign = inbound.Callsign + entry.fixed = inbound.FixedSequence entry.arrivalRoute = inbound.PlannedStar.Name entry.arrivalRunway = inbound.PlannedRunway.Name for waypoint in inbound.PlannedArrivalRoute: wp = entry.waypoints.add() wp.name = waypoint.Waypoint.Name + wp.altitude = waypoint.Altitude + wp.indicatedAirspeed = waypoint.IndicatedAirspeed + wp.groundspeed = waypoint.GroundSpeed pta = str(waypoint.PTA) delimiter = pta.find('.')