Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Robobin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
plw1g21
Robobin
Commits
6237c709
Commit
6237c709
authored
6 months ago
by
Paul-Winpenny
Browse files
Options
Downloads
Patches
Plain Diff
Tag position now displayed.
parent
2cc99cf6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Wireless_Communication/UWB/Beacons_tag_position/realtime_location_POF_gui.py
+4
-4
4 additions, 4 deletions
...ion/UWB/Beacons_tag_position/realtime_location_POF_gui.py
with
4 additions
and
4 deletions
Wireless_Communication/UWB/Beacons_tag_position/realtime_location_POF_gui.py
+
4
−
4
View file @
6237c709
...
@@ -52,9 +52,7 @@ class AnchorTagGUI:
...
@@ -52,9 +52,7 @@ class AnchorTagGUI:
def
determine_anchor_coords
(
self
):
def
determine_anchor_coords
(
self
):
try
:
try
:
measured_distances
=
self
.
measured_distances
measured_distances
=
self
.
measured_distances
for
var
in
measured_distances
:
print
(
var
.
get
())
# Measured distances arrive in order: A, E, D, B, F, C
# Measured distances arrive in order: A, E, D, B, F, C
measured_distances
=
[
var
.
get
()
for
var
in
measured_distances
]
measured_distances
=
[
var
.
get
()
for
var
in
measured_distances
]
...
@@ -161,6 +159,7 @@ class AnchorTagGUI:
...
@@ -161,6 +159,7 @@ class AnchorTagGUI:
# Display result
# Display result
self
.
output_label
.
config
(
text
=
f
"
Tag Position: (
{
x_tag
:
.
2
f
}
,
{
y_tag
:
.
2
f
}
)
"
)
self
.
output_label
.
config
(
text
=
f
"
Tag Position: (
{
x_tag
:
.
2
f
}
,
{
y_tag
:
.
2
f
}
)
"
)
#print(f"Tag Position: ({x_tag:.2f}, {y_tag:.2f})")
except
Exception
as
e
:
except
Exception
as
e
:
self
.
output_label
.
config
(
text
=
f
"
Error:
{
str
(
e
)
}
"
)
self
.
output_label
.
config
(
text
=
f
"
Error:
{
str
(
e
)
}
"
)
...
@@ -206,8 +205,9 @@ class AnchorTagGUI:
...
@@ -206,8 +205,9 @@ class AnchorTagGUI:
self
.
canvas
.
create_oval
(
self
.
canvas
.
create_oval
(
x_tag_scaled
-
5
,
y_tag_scaled
-
5
,
x_tag_scaled
+
5
,
y_tag_scaled
+
5
,
fill
=
"
red
"
x_tag_scaled
-
5
,
y_tag_scaled
-
5
,
x_tag_scaled
+
5
,
y_tag_scaled
+
5
,
fill
=
"
red
"
)
)
label
=
f
"
Tag (
{
round
(
x_tag
,
2
)
}
,
{
round
(
y_tag
,
2
)
}
)
"
self
.
canvas
.
create_text
(
self
.
canvas
.
create_text
(
x_tag_scaled
+
15
,
y_tag_scaled
,
text
=
"
Tag
"
,
fill
=
"
black
"
x_tag_scaled
+
15
,
y_tag_scaled
+
15
,
text
=
label
,
fill
=
"
black
"
)
)
...
...
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