Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inference
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
optima
inference
Commits
557de2b9
Commit
557de2b9
authored
4 years ago
by
Daalen, Tim van
Browse files
Options
Downloads
Patches
Plain Diff
show gps time
parent
d5f863bb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
camera.py
+2
-2
2 additions, 2 deletions
camera.py
data_types.py
+1
-1
1 addition, 1 deletion
data_types.py
inference.py
+3
-2
3 additions, 2 deletions
inference.py
with
6 additions
and
5 deletions
camera.py
+
2
−
2
View file @
557de2b9
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
data_types.py
+
1
−
1
View file @
557de2b9
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
inference.py
+
3
−
2
View file @
557de2b9
...
...
@@ -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: {:.
5
f}
'
,
'
Longitude: {:.
5
f}
'
,
'
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: {:.
6
f}
'
,
'
Longitude: {:.
6
f}
'
,
'
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
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment