コード例 #1
0
 def testCsvDumpsNotEmpty(self):
     tmp_csv_track = os.path.join(self.tmp_output_dir, 'flight.csv')
     tmp_csv_thermals = os.path.join(self.tmp_output_dir, 'thermals.csv')
     dumpers.dump_flight_to_csv(self.flight, tmp_csv_track,
                                tmp_csv_thermals)
     self.assertFileNotEmpty(tmp_csv_track)
     self.assertFileNotEmpty(tmp_csv_thermals)
コード例 #2
0
ファイル: test_dumpers.py プロジェクト: kuaka/igc_lib
 def testCsvDumpsNotEmpty(self):
     tmp_csv_track = os.path.join(self.tmp_output_dir, 'flight.csv')
     tmp_csv_thermals = os.path.join(self.tmp_output_dir, 'thermals.csv')
     dumpers.dump_flight_to_csv(
         self.flight, tmp_csv_track, tmp_csv_thermals)
     self.assertFileNotEmpty(tmp_csv_track)
     self.assertFileNotEmpty(tmp_csv_thermals)
コード例 #3
0
ファイル: igc_lib_demo.py プロジェクト: setalle/igc_lib
def dump_flight(flight, input_file):
    input_base_file = os.path.splitext(input_file)[0]
    wpt_file = "%s-thermals.wpt" % input_base_file
    cup_file = "%s-thermals.cup" % input_base_file
    thermals_csv_file = "%s-thermals.csv" % input_base_file
    flight_csv_file = "%s-flight.csv" % input_base_file
    kml_file = "%s-flight.kml" % input_base_file

    print("Dumping thermals to %s, %s and %s" %
          (wpt_file, cup_file, thermals_csv_file))
    dumpers.dump_thermals_to_wpt_file(flight, wpt_file, True)
    dumpers.dump_thermals_to_cup_file(flight, cup_file)

    print("Dumping flight to %s and %s" % (kml_file, flight_csv_file))
    dumpers.dump_flight_to_csv(flight, flight_csv_file, thermals_csv_file)
    dumpers.dump_flight_to_kml(flight, kml_file)
コード例 #4
0
ファイル: igc_lib_demo.py プロジェクト: kuaka/igc_lib
def dump_flight(flight, input_file):
    input_base_file = os.path.splitext(input_file)[0]
    wpt_file = "%s-thermals.wpt" % input_base_file
    cup_file = "%s-thermals.cup" % input_base_file
    thermals_csv_file = "%s-thermals.csv" % input_base_file
    flight_csv_file = "%s-flight.csv" % input_base_file
    kml_file = "%s-flight.kml" % input_base_file

    print("Dumping thermals to %s, %s and %s" %
          (wpt_file, cup_file, thermals_csv_file))
    dumpers.dump_thermals_to_wpt_file(flight, wpt_file, True)
    dumpers.dump_thermals_to_cup_file(flight, cup_file)

    print("Dumping flight to %s and %s" % (kml_file, flight_csv_file))
    dumpers.dump_flight_to_csv(flight, flight_csv_file, thermals_csv_file)
    dumpers.dump_flight_to_kml(flight, kml_file)