Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AP-S 2020 - PyRaTk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
DELTA
DELTA Low-Cost 5.8GHz FMCW Radar PCB
AP-S 2020 Software
AP-S 2020 - PyRaTk
Commits
61c7bdd9
Commit
61c7bdd9
authored
4 years ago
by
Stavros Vakalis
Browse files
Options
Downloads
Patches
Plain Diff
added angle estimation
parent
042116a7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyratk/trackers/aps_tracker.py
+13
-3
13 additions, 3 deletions
pyratk/trackers/aps_tracker.py
pyratk/widgets/polar_tracker_widget.py
+1
-1
1 addition, 1 deletion
pyratk/widgets/polar_tracker_widget.py
with
14 additions
and
4 deletions
pyratk/trackers/aps_tracker.py
+
13
−
3
View file @
61c7bdd9
...
@@ -11,6 +11,7 @@ from pyratk.datatypes.ts_data import TimeSeries # storing data
...
@@ -11,6 +11,7 @@ from pyratk.datatypes.ts_data import TimeSeries # storing data
from
pyratk.datatypes.motion
import
StateMatrix
from
pyratk.datatypes.motion
import
StateMatrix
from
pyratk.datatypes.geometry
import
Point
from
pyratk.datatypes.geometry
import
Point
from
pyratk.datatypes.radar
import
Detection
from
pyratk.datatypes.radar
import
Detection
from
scipy
import
signal
class
ApsTracker
(
object
):
class
ApsTracker
(
object
):
"""
Class to track detections using 4 doppler measurements.
"""
"""
Class to track detections using 4 doppler measurements.
"""
...
@@ -51,10 +52,19 @@ class ApsTracker(object):
...
@@ -51,10 +52,19 @@ class ApsTracker(object):
# Add new Detection objects to detections list
# Add new Detection objects to detections list
fft_mats
=
[
self
.
receiver_array
[
0
].
fft_mat
,
self
.
receiver_array
[
1
].
fft_mat
]
fft_mats
=
[
self
.
receiver_array
[
0
].
fft_mat
,
self
.
receiver_array
[
1
].
fft_mat
]
var0
=
np
.
power
(
np
.
mean
(
self
.
receiver_array
[
0
].
fft_mat
,
axis
=
0
),
2
)
var1
=
np
.
power
(
np
.
mean
(
self
.
receiver_array
[
1
].
fft_mat
,
axis
=
0
),
2
)
#var0=signal.resample_poly(var00,4,1)
#var1=signal.resample_poly(var01,4,1)
f
=
np
.
linspace
(
-
50000
,
50000
,
num
=
var0
.
size
-
1
)
r_d0
=
np
.
abs
(
f
[
np
.
argmax
(
var0
)]
*
3e8
/
100e9
*
2
/
3
/
2
)
r_d1
=
np
.
abs
(
f
[
np
.
argmax
(
var1
)]
*
3e8
/
100e9
*
2
/
3
/
2
)
theta
=
np
.
arcsin
((
r_d0
-
r_d1
)
/
0.3864
)
+
0.5
*
np
.
pi
R
=
0.5
*
(
r_d0
+
r_d1
)
# loc is cylindrical (R, theta, Z), but Z is ignored by plot
# loc is cylindrical (R, theta, Z), but Z is ignored by plot
R
=
np
.
random
.
rand
()
*
15
#
R = np.random.rand() * 15
theta
=
np
.
random
.
rand
()
*
np
.
pi
#
theta = np.random.rand() * np.pi
loc
=
Point
(
R
,
theta
,
0.0
)
loc
=
Point
(
R
,
theta
,
0.0
)
new_detection
=
Detection
(
loc
)
new_detection
=
Detection
(
loc
)
self
.
detections
.
append
(
new_detection
)
self
.
detections
.
append
(
new_detection
)
...
...
This diff is collapsed.
Click to expand it.
pyratk/widgets/polar_tracker_widget.py
+
1
−
1
View file @
61c7bdd9
...
@@ -63,7 +63,7 @@ class PolarTrackerWidget(pg.GraphicsLayoutWidget):
...
@@ -63,7 +63,7 @@ class PolarTrackerWidget(pg.GraphicsLayoutWidget):
self
.
plot
.
addItem
(
self
.
det_loc_plot
)
self
.
plot
.
addItem
(
self
.
det_loc_plot
)
# Set up plot
# Set up plot
self
.
plot
.
setLimits
(
yMin
=
0
)
#
self.plot.setLimits(yMin=0)
self
.
plot
.
setRange
(
yRange
=
[
0
,
self
.
max_range
],
xRange
=
[
-
self
.
max_range
,
self
.
max_range
])
self
.
plot
.
setRange
(
yRange
=
[
0
,
self
.
max_range
],
xRange
=
[
-
self
.
max_range
,
self
.
max_range
])
self
.
plot
.
setAspectLocked
(
True
)
self
.
plot
.
setAspectLocked
(
True
)
# xMin=-self.max_range, xMax=self.max_range)
# xMin=-self.max_range, xMax=self.max_range)
...
...
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