Skip to content
Snippets Groups Projects
Commit 557de2b9 authored by Daalen, Tim van's avatar Daalen, Tim van
Browse files

show gps time

parent d5f863bb
No related branches found
No related tags found
No related merge requests found
......@@ -44,8 +44,8 @@ class take_img(Thread):
image = self.converter.Convert(grabResult)
img = image.GetArray()
with GPS_lock:
(data_obj, is_moving) = GPS_ringbuf.get_dataobject(timestamp)
to_display_deque.append({'data': data_obj, 'free_mem': freememory, 'free_mem_hdd': usbgb, 'is_moving':is_moving})
(data_obj, is_moving, gps_rectime) = GPS_ringbuf.get_dataobject(timestamp)
to_display_deque.append({'data': data_obj, 'free_mem': freememory, 'free_mem_hdd': usbgb, 'is_moving':is_moving, 'gps_rectime': gps_rectime})
#save GPS data
if (self.GPS_check == False) or (self.save_GPS == True) and (is_moving == True):
......
......@@ -168,7 +168,7 @@ class GPS_Ringbuffer:
(data_obj.lat, data_obj.lng) = self.get_currentlocation(timestamp)
data_obj.hdop = float(self.data[self.f_pnt].hdop)
data_obj.satnum = int(self.data[self.f_pnt].satnum)
return (data_obj, self.data[self.f_pnt].moving)
return (data_obj, self.data[self.f_pnt].moving, self.data[self.f_pnt].rectime )
#determine movement over the last samples
def determine_hasmoved(self):
......
......@@ -442,7 +442,7 @@ class GUI(Thread):
label.config(font=("courier 10 pitch", 16))
label.grid(row=0, column=52, sticky=tki.W)
self.fields = ['Time: {:s}', 'GPS time: {:s}', 'GPS quality: {:s}', 'Latitude: {:.5f}', 'Longitude: {:.5f}', 'Moving: {:s}', 'Hdop: {:.1f}', 'Satellites: {:d}', 'Free mem (Jetson): {:.1f} gb', 'Free mem (hdd): {:.1f} gb', 'Image analysis time: {:.2f} s', 'Detected class: {:s}', 'Hits: {:d}', 'Probability: {:.2f}']
self.fields = ['Time: {:s}', 'GPS time: {:s}', 'GPS quality: {:s}', 'Latitude: {:.6f}', 'Longitude: {:.6f}', 'Moving: {:s}', 'Hdop: {:.1f}', 'Satellites: {:d}', 'Free mem (Jetson): {:.1f} gb', 'Free mem (hdd): {:.1f} gb', 'Image analysis time: {:.2f}s', 'Detected class: {:s}', 'Hits: {:d}', 'Probability: {:.2f}']
self.labels=[]
for idx, field in enumerate(self.fields):
label = tki.Label(self.root, text=field)
......@@ -476,9 +476,10 @@ class GUI(Thread):
free_mem = item['free_mem']
free_mem_hdd = item['free_mem_hdd']
is_moving = item['is_moving']
gps_rectime = item['gps_rectime']
self.labels[0].configure(text=self.fields[0].format(datetime.now().strftime("%H:%M:%S")))
self.labels[1].configure(text=self.fields[1].format(data_obj.timestamp.split("T")[1]))
self.labels[1].configure(text=self.fields[1].format(gps_rectime.split("T")[1]))
self.labels[2].configure(text=self.fields[2].format(data_obj.gps_quality))
self.labels[3].configure(text=self.fields[3].format(data_obj.lat))
self.labels[4].configure(text=self.fields[4].format(data_obj.lng))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment