def analyse_flight(flight_id, full=2048, triangle=6144, sprint=512): logger.info("Analysing flight %d" % flight_id) if analysis.analyse_flight(Flight.get(flight_id), full, triangle, sprint): db.session.commit() else: logger.warn("Analysis of flight %d failed." % flight_id)
def analyse_flight(flight_id, full=2048, triangle=6144, sprint=512): logger.info("Analysing flight %d" % flight_id) if analysis.analyse_flight(Flight.get(flight_id), full, triangle, sprint): db.session.commit() else: logger.warn("Analysis of flight %d failed." % flight_id)
def analyse_flight(flight_id, full=2048, triangle=6144, sprint=512): logger.info("Analysing flight %d" % flight_id) flight = Flight.get(flight_id) success = analysis.analyse_flight(flight, full, triangle, sprint) if not success: logger.warn("Analysis of flight %d failed." % flight_id) return unlock_flight_achievements(flight) db.session.commit()
def create_flight(igcfile): igc = model.IGCFile(filename=igcfile, md5=str(hash(igcfile)), # owner=cls.pilot, date_utc=datetime.datetime(2013, 7, 7, 13, 0)) flight = model.Flight() flight.igc_file = igc success = analysis.analyse_flight(flight, full=2048, triangle=6144, sprint=512) assert success, "IGC file analysis failed" return flight
def create_flight(igcfile): igc = model.IGCFile( filename=igcfile, md5=str(hash(igcfile)), # owner=cls.pilot, date_utc=datetime.datetime(2013, 7, 7, 13, 0)) flight = model.Flight() flight.igc_file = igc success = analysis.analyse_flight(flight, full=2048, triangle=6144, sprint=512) assert success, "IGC file analysis failed" return flight