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)
def testKmlDumpNotEmpty(self): tmp_kml_file = os.path.join(self.tmp_output_dir, 'flight.kml') dumpers.dump_flight_to_kml(self.flight, tmp_kml_file) self.assertFileNotEmpty(tmp_kml_file)