Example #1
0
def flight_path(igc_file, max_points=1000):
    args = [
        helper_path('FlightPath'),
        '--max-points=' + str(max_points),
        files.filename_to_path(igc_file.filename),
    ]

    return map(line_to_fix, Popen(args, stdout=PIPE).stdout)
Example #2
0
def flight_path(igc_file, max_points = 1000):
    path = files.filename_to_path(igc_file.filename)
    f = os.popen(helper_path('FlightPath') + ' --max-points=' + str(max_points) + ' "' + path + '"')

    path = []
    for line in f:
        line = line.split()
        path.append(FlightPathFix(int(line[0]), float(line[1]), float(line[2]), int(line[3]), int(line[4])))
    return path