Now got 2 lists with with all data relevant for one photo.
This commit is contained in:
parent
a2ae379883
commit
314e70faa9
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Added optional dry-run modifier
|
||||
- Made timezone-aware for timesources without timezone
|
||||
- Added optional parameter to override timezone to local timezone, defaults to localtime
|
||||
- Swith to oop style programming. Made code easier to read.
|
||||
|
||||
## [0.2] - 2020-02-05
|
||||
### Added
|
||||
|
@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# This file is now obsolete and is going to disappear.
|
||||
|
||||
"""Iterates over a bunch of .jpg or .cr2 files and matches
|
||||
DateTimeOriginal from Exif tag to DateTime in a csv log
|
||||
of a GeigerMuellerCounter and writes its value to the UserComment
|
||||
|
@ -23,9 +23,3 @@ class Radiation:
|
||||
# Convert CP/M to µS/h using si_factor
|
||||
radiation = round(float(radiation) * si_factor, 2)
|
||||
return radiation
|
||||
|
||||
class Position:
|
||||
def __init__(self, timestamp, latitude, longitude):
|
||||
self.timestamp = timestamp
|
||||
self.latitude = latitude
|
||||
self.longitude = longitude
|
||||
|
16
rad_tag.py
16
rad_tag.py
@ -102,7 +102,7 @@ for srcphoto in args.photos:
|
||||
for _, csvrawtime, csvrawcpm, _ in csvreader:
|
||||
radiation = Radiation(csvrawtime, csvrawcpm, local_timezone, args.sifactor)
|
||||
radiation_list.append(radiation)
|
||||
print(radiation_list)
|
||||
#print(radiation_list)
|
||||
|
||||
# close CSV file
|
||||
f.close()
|
||||
@ -116,13 +116,7 @@ for srcphoto in args.photos:
|
||||
for track in gpxreader.tracks:
|
||||
for segment in track.segments:
|
||||
for point in segment.points:
|
||||
# datetimes match with 1 minute precision
|
||||
delta = timedelta(seconds=60)
|
||||
if abs(point.time - pictime) < delta:
|
||||
valuelist = []
|
||||
row = [point.time - pictime, point.latitude, point.longitude]
|
||||
valuelist.append(row)
|
||||
print(valuelist)
|
||||
min(valuelist[0][0])
|
||||
#print(pictime, 'vs.', point.time, 'Delta:', pictime - point.time)
|
||||
# print('Point at ({0},{1}) -> {2}'.format(point.latitude, point.longitude, point.time))
|
||||
position = [point.time, point.latitude, point.longitude]
|
||||
position_list.append(position)
|
||||
#print(position_list)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user