Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
df-aggregator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleksandr Barabash
df-aggregator
Commits
7df2b3d2
Commit
7df2b3d2
authored
Nov 05, 2020
by
Corey Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ability to enable debugging
parent
c0d25d6e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
README.md
README.md
+2
-0
df-aggregator.py
df-aggregator.py
+17
-5
No files found.
README.md
View file @
7df2b3d2
...
...
@@ -4,6 +4,8 @@
-
[
numpy
](
https://numpy.org/install/
)
-
[
scikit-learn
](
https://scikit-learn.org/stable/install.html
)
-
[
python-geojson
](
https://python-geojson.readthedocs.io/en/latest/
)
-
[
czml3
](
https://pypi.org/project/czml3/
)
-
[
geojson
](
https://pypi.org/project/geojson/
)
## Usage: df-aggregator.py [options]
...
...
df-aggregator.py
View file @
7df2b3d2
...
...
@@ -70,6 +70,14 @@ class receiver:
confidence
=
0
doa_time
=
0
# class intersections:
# latitude = 0.0
# longitude = 0.0
# avg_power = 0.0
# avg_confidence = 0
# num_parents = 0
# intersect_time = 0
def
plot_polar
(
lat_a
,
lon_a
,
lat_a2
,
lon_a2
):
# Convert points in great circle 1, degrees to radians
...
...
@@ -159,7 +167,7 @@ def process_data(database_name, outfile, eps, min_samp):
# Number of clusters in labels, ignoring noise if present.
n_clusters_
=
len
(
set
(
labels
))
-
(
1
if
-
1
in
labels
else
0
)
n_noise_
=
list
(
labels
)
.
count
(
-
1
)
# clear(
)
clear
(
debugging
)
print
(
'Number of clusters:
%
d'
%
n_clusters_
)
print
(
'Outliers Removed:
%
d'
%
n_noise_
)
# print(intersect_array)
...
...
@@ -245,7 +253,8 @@ def Reverse(lst):
lst
.
reverse
()
return
lst
def
clear
():
def
clear
(
debugging
):
if
not
debugging
:
# for windows
if
name
==
'nt'
:
_
=
system
(
'cls'
)
...
...
@@ -291,6 +300,8 @@ if __name__ == '__main__':
metavar
=
"Number"
,
type
=
"int"
,
default
=
20
)
parser
.
add_option
(
"--dist-from-reference"
,
dest
=
"mdfr"
,
help
=
"Max distance in km from intersection with strongest signal."
,
metavar
=
"Number"
,
type
=
"int"
,
default
=
500
)
parser
.
add_option
(
"--debugging"
,
dest
=
"debugging"
,
help
=
"Does not clear the screen. Useful for seeing errors and warnings."
,
action
=
"store_true"
)
(
options
,
args
)
=
parser
.
parse_args
()
mandatories
=
[
'geofile'
,
'rx_file'
,
'database_name'
]
...
...
@@ -308,9 +319,10 @@ if __name__ == '__main__':
min_power
=
options
.
pwr
max_dist_from_ref
=
options
.
mdfr
min_samp
=
options
.
minsamp
debugging
=
False
if
not
options
.
debugging
else
True
try
:
# clear(
)
clear
(
debugging
)
dots
=
0
conn
=
sqlite3
.
connect
(
database_name
)
c
=
conn
.
cursor
()
...
...
@@ -381,10 +393,10 @@ if __name__ == '__main__':
dots
=
1
else
:
dots
+=
1
# clear(
)
clear
(
debugging
)
except
KeyboardInterrupt
:
# clear(
)
clear
(
debugging
)
print
(
"Processing, please wait."
)
conn
.
commit
()
conn
.
close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment