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
8d7e4abb
Commit
8d7e4abb
authored
Nov 10, 2020
by
Corey Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nightly Cleanup
parent
36a4f915
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
43 deletions
+44
-43
df-aggregator.py
df-aggregator.py
+2
-4
cesium.tpl
views/cesium.tpl
+42
-39
No files found.
df-aggregator.py
View file @
8d7e4abb
...
...
@@ -19,9 +19,6 @@ from bottle import route, run, request, get, post, redirect, template, static_fi
d
=
40000
#meters
all_pt_style
=
{
"name"
:
"Various Points"
,
"marker-color"
:
"#FF0000"
}
best_pt_style
=
{
"name"
:
"Most Likely TX Location"
,
"marker-color"
:
"#00FF00"
}
class
math_settings
:
def
__init__
(
self
,
eps
,
min_samp
,
conf
,
power
):
self
.
eps
=
eps
...
...
@@ -221,6 +218,8 @@ def process_data(database_name, outfile):
return
None
def
write_geojson
(
best_point
,
all_the_points
):
all_pt_style
=
{
"name"
:
"Various Points"
,
"marker-color"
:
"#FF0000"
}
best_pt_style
=
{
"name"
:
"Most Likely TX Location"
,
"marker-color"
:
"#00FF00"
}
if
all_the_points
!=
None
:
all_the_points
=
Feature
(
properties
=
all_pt_style
,
geometry
=
MultiPoint
(
tuple
(
all_the_points
)))
with
open
(
geofile
,
"w"
)
as
file1
:
...
...
@@ -270,7 +269,6 @@ def write_czml(best_point, all_the_points, ellipsedata):
}
ellipse_properties
=
{
"heightReference"
:
"RELATIVE_TO_GROUND"
,
"granularity"
:
0.008722222
,
"material"
:
{
"solidColor"
:
{
...
...
views/cesium.tpl
View file @
8d7e4abb
...
...
@@ -9,13 +9,17 @@
</head>
<body>
<h2>
DF Aggregator
</h2>
<div
id=
"cesiumContainer"
style=
"height: 800px"
></div>
<div
id=
"cesiumContainer"
style=
"height: 800px"
>
</div>
<script>
// Your access token can be found at: https://cesium.com/ion/tokens.
Cesium
.
Ion
.
defaultAccessToken
=
'{
{
access_token
}
}'
;
var
viewer
=
new
Cesium
.
Viewer
(
'cesiumContainer'
,
{
terrainProvider
:
Cesium
.
createWorldTerrain
()
});
viewer
.
clock
.
shouldAnimate
=
true
;
var
dataSourcePromise
=
Cesium
.
CzmlDataSource
.
load
(
'/static/output.czml'
);
viewer
.
dataSources
.
add
(
dataSourcePromise
);
...
...
@@ -25,9 +29,8 @@
// const buildingTileset = viewer.scene.primitives.add(Cesium.createOsmBuildings());
</script>
</div>
<div
class=
"slidecontainer"
>
<form
action=
"/"
method=
"post"
>
<div
class=
"slidecontainer"
>
<form
action=
"/"
method=
"post"
>
<div><span
class=
"slidetitle"
><h4>
Min Power*:
</h4></span>
<span
class=
"slidespan"
><input
name=
"powerValue"
type=
"range"
min=
"0"
max=
"100"
value=
"{
{
minpower
}
}"
class=
"slider"
id=
"powerRange"
></span>
<span
class=
"slidevalue"
id=
"power"
></span></div>
...
...
@@ -44,52 +47,52 @@
<span
class=
"slidespan"
style=
"text-align:left; width: 80px;"
>
<!-- Rounded switch -->
<label
class=
"switch"
>
<input
name=
"rx_en"
{
{
rx_state
}
}
type=
"checkbox"
>
<span
class=
"switchslider round"
></span>
<input
name=
"rx_en"
{
{
rx_state
}
}
type=
"checkbox"
>
<span
class=
"switchslider round"
></span>
</label></span>
<span
class=
"slidetitle"
><h4>
Plot All intersect Points**:
</h4></span>
<span
class=
"slidespan"
style=
"text-align:left; width: 80px;"
>
<!-- Rounded switch -->
<label
class=
"switch"
>
<input
name=
"intersect_en"
{
{
intersect_state
}
}
type=
"checkbox"
>
<span
class=
"switchslider round"
></span>
<input
name=
"intersect_en"
{
{
intersect_state
}
}
type=
"checkbox"
>
<span
class=
"switchslider round"
></span>
</label></span><span>
Enabling this can cause longer load times.
</span></div>
<div
style=
"width:15%; text-align:right;"
><input
value=
"Update"
type=
"submit"
style=
"height:40px;"
/></div>
</form>
</form>
<p>
* Does not affect historical data.
</p>
<p>
** This setting does not apply if clustering is turned off (epsilon = 0).
</p>
</div>
<script>
var
powerslider
=
document
.
getElementById
(
"powerRange"
);
var
poweroutput
=
document
.
getElementById
(
"power"
);
poweroutput
.
innerHTML
=
powerslider
.
value
;
<p>
* Does not affect historical data.
</p>
<p>
** This setting does not apply if clustering is turned off (epsilon = 0).
</p>
</div>
<script>
var
powerslider
=
document
.
getElementById
(
"powerRange"
);
var
poweroutput
=
document
.
getElementById
(
"power"
);
poweroutput
.
innerHTML
=
powerslider
.
value
;
var
confslider
=
document
.
getElementById
(
"confRange"
);
var
confoutput
=
document
.
getElementById
(
"confidence"
);
confoutput
.
innerHTML
=
confslider
.
value
;
var
confslider
=
document
.
getElementById
(
"confRange"
);
var
confoutput
=
document
.
getElementById
(
"confidence"
);
confoutput
.
innerHTML
=
confslider
.
value
;
var
epsslider
=
document
.
getElementById
(
"epsilonRange"
);
var
epsoutput
=
document
.
getElementById
(
"epsilon"
);
epsoutput
.
innerHTML
=
epsslider
.
value
/
100
;
var
epsslider
=
document
.
getElementById
(
"epsilonRange"
);
var
epsoutput
=
document
.
getElementById
(
"epsilon"
);
epsoutput
.
innerHTML
=
epsslider
.
value
/
100
;
var
minpointslider
=
document
.
getElementById
(
"minpointRange"
);
var
minpointoutput
=
document
.
getElementById
(
"minpoints"
);
minpointoutput
.
innerHTML
=
minpointslider
.
value
;
var
minpointslider
=
document
.
getElementById
(
"minpointRange"
);
var
minpointoutput
=
document
.
getElementById
(
"minpoints"
);
minpointoutput
.
innerHTML
=
minpointslider
.
value
;
// Update the current slider value (each time you drag the slider handle)
epsslider
.
oninput
=
function
()
{
epsoutput
.
innerHTML
=
this
.
value
/
100
;
}
powerslider
.
oninput
=
function
()
{
poweroutput
.
innerHTML
=
this
.
value
;
}
confslider
.
oninput
=
function
()
{
confoutput
.
innerHTML
=
this
.
value
;
}
minpointslider
.
oninput
=
function
()
{
minpointoutput
.
innerHTML
=
this
.
value
;
}
</script>
// Update the current slider value (each time you drag the slider handle)
epsslider
.
oninput
=
function
()
{
epsoutput
.
innerHTML
=
this
.
value
/
100
;
}
powerslider
.
oninput
=
function
()
{
poweroutput
.
innerHTML
=
this
.
value
;
}
confslider
.
oninput
=
function
()
{
confoutput
.
innerHTML
=
this
.
value
;
}
minpointslider
.
oninput
=
function
()
{
minpointoutput
.
innerHTML
=
this
.
value
;
}
</script>
</body>
</html>
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