Fixed formatting and fixed some comments, removed obsolete stuff that remained.
This commit is contained in:
parent
59b94991d0
commit
5a39f08f35
@ -48,7 +48,7 @@ args = parser.parse_args()
|
||||
# Create timezone datetime object
|
||||
local_timezone = pytz.timezone(args.timezone)
|
||||
|
||||
# Initialize two empty lists for comparison
|
||||
# Initialize two empty lists for all radiation / gps values
|
||||
radiation_list = []
|
||||
position_list = []
|
||||
|
||||
@ -57,6 +57,7 @@ with open(args.csv, "r") as f:
|
||||
csv = csv.reader(filter(lambda row: row[0] != '#', f),
|
||||
delimiter=',', skipinitialspace=True)
|
||||
|
||||
# Import only relevant values, thats timestamp and CP/M
|
||||
for _, csv_raw_time, csv_raw_cpm, _ in csv:
|
||||
radiation = Radiation(csv_raw_time, csv_raw_cpm, local_timezone, args.sifactor)
|
||||
radiation_list.append(radiation)
|
||||
@ -67,7 +68,6 @@ with open(args.csv, "r") as f:
|
||||
if args.gpx:
|
||||
gpx_file = open(args.gpx, 'r')
|
||||
gpx_reader = gpxpy.parse(gpx_file)
|
||||
#for waypoint in gpx_reader.waypoints:
|
||||
for track in gpx_reader.tracks:
|
||||
for segment in track.segments:
|
||||
for point in segment.points:
|
||||
@ -96,9 +96,9 @@ for src_photo in args.photos:
|
||||
match = Match(photo.get_date, radiation_list, position_list)
|
||||
|
||||
# Formatted output:
|
||||
data = Output(match.radiation_value, match.position_latitude, match.position_longitude, match.position_altitude)
|
||||
data = Output(match.radiation_value, match.position_latitude,
|
||||
match.position_longitude, match.position_altitude)
|
||||
print('{:<15} {:<25} {:<22}'.format(photo.get_photo_basename, str(photo.get_date), str(data)))
|
||||
#print(match)
|
||||
|
||||
# Write exif data
|
||||
Exif(photo.get_photo_filename, args.dry, match.radiation_value,
|
||||
|
Loading…
Reference in New Issue
Block a user