예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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()
예제 #4
0
    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