Example #1
0
def getBalloonBurst(flight_number):
    position = None

    flight = service.getFlightByNumber(flight_number)
    events = service.getEventsByFlight(flight.id)

    for e in events:
        if e.type == "burst":
            service.fillParametersDictionary(e)
            parameter = e.parametersDict["position"]
            position = {
                'type': "burst",
                'point': {
                    'time': parameter.time_received,
                    'lat': parameter.valuesDict["lat"].value,
                    'lng': parameter.valuesDict["lng"].value
                }
            }

    LOG.debug("BalloonBurst: ", position)

    return position
Example #2
0
def getEventsAllByFlight(flight_id):
    flight = service.getFlightById(flight_id)
    events = service.getEventsByFlight(flight.id)
    return events