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
e8c301bf
Commit
e8c301bf
authored
Nov 18, 2020
by
Corey Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ability to mark a receiver as mobile.
parent
188a916b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
146 additions
and
20 deletions
+146
-20
df-aggregator.py
df-aggregator.py
+22
-5
car.svg
static/car.svg
+1
-2
flipped_car.svg
static/flipped_car.svg
+58
-0
menu.css
static/menu.css
+23
-0
tower.svg
static/tower.svg
+1
-1
cesium.tpl
views/cesium.tpl
+41
-12
No files found.
df-aggregator.py
View file @
e8c301bf
...
...
@@ -255,10 +255,10 @@ def write_czml(best_point, all_the_points, ellipsedata):
}
}
rx_properties
=
{
"image"
:
{
"uri"
:
"/static/tower.svg"
},
#
"image":
#
{
#
"uri": "/static/tower.svg"
#
},
# "rotation": "Cesium.Math.PI_OVER_FOUR",
"verticalOrigin"
:
"BOTTOM"
,
"scale"
:
0.75
,
...
...
@@ -323,8 +323,16 @@ def write_czml(best_point, all_the_points, ellipsedata):
position
=
{
"cartographicDegrees"
:
[
x
[
3
],
x
[
4
],
15
]}))
for
x
in
receivers
:
if
x
.
isMobile
==
True
:
rx_icon
=
{
"image"
:{
"uri"
:
"/static/flipped_car.svg"
}}
# if x.heading > 0 or x.heading < 180:
# rx_icon = {"image":{"uri":"/static/flipped_car.svg"}, "rotation":math.radians(360 - x.heading + 90)}
# elif x.heading < 0 or x.heading > 180:
# rx_icon = {"image":{"uri":"/static/car.svg"}, "rotation":math.radians(360 - x.heading - 90)}
else
:
rx_icon
=
{
"image"
:{
"uri"
:
"/static/tower.svg"
}}
receiver_point_packets
.
append
(
Packet
(
id
=
x
.
station_id
,
billboard
=
rx_properties
,
billboard
=
{
**
rx_properties
,
**
rx_icon
}
,
position
=
{
"cartographicDegrees"
:
[
x
.
longitude
,
x
.
latitude
,
15
]}))
with
open
(
"static/output.czml"
,
"w"
)
as
file1
:
...
...
@@ -391,11 +399,20 @@ def update_cesium():
ms
.
receiving
=
True
elif
request
.
query
.
rx
==
"false"
:
ms
.
receiving
=
False
if
request
.
query
.
plotpts
==
"true"
:
ms
.
plotintersects
=
True
elif
request
.
query
.
plotpts
==
"false"
:
ms
.
plotintersects
=
False
if
request
.
query
.
ismobile
:
rx_index
=
int
(
request
.
query
.
ismobile
)
receivers
[
rx_index
]
.
isMobile
=
True
if
request
.
query
.
isnotmobile
:
rx_index
=
int
(
request
.
query
.
isnotmobile
)
receivers
[
rx_index
]
.
isMobile
=
False
write_czml
(
*
process_data
(
database_name
,
geofile
))
return
"OK"
...
...
static/car.svg
View file @
e8c301bf
<svg
id=
"Layer_1"
enable-background=
"new 0 0 480.324 480.324"
height=
"512"
viewBox=
"0 0 480.324 480.324"
width=
"512"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"m165 369.493c0 30.88-25.12 56-56 56-30.87 0-56-25.12-56-56s25.13-56 56-56c30.88 0 56 25.12 56 56zm206-56c-30.87 0-56 25.12-56 56s25.13 56 56 56c30.88 0 56-25.12 56-56s-25.12-56-56-56zm-77.967-64.001h50.033c12.052 0 23.313-5.336 30.941-14.65l22.049-31.979c2.903-4.21 1.174-10.035-3.566-11.956-28.458-11.533-62.576-20.032-100.599-19.283-4.771.094-8.412 4.304-7.797 9.036zm163.897-22.719c-9.155-6.647-20.698-14.234-34.298-21.613-3.605-1.956-8.105-.901-10.433 2.476l-25.199 36.548c-8.963 12.041-25.417 21.308-43.935 21.308-5.677 0-249.482 0-245.536 0-23.059 0-46.012 3.129-68.229 9.301-17.159 4.766-29.3 20.555-29.3 38.55v55.95c0 4.418 3.582 8 8 8h20.996c4.418 0 7.985-3.583 7.991-8.002.056-39.075 31.946-71.798 72.012-71.798 40.925 0 73.024 34.004 71.986 73.768-.118 4.507 3.479 8.232 7.988 8.232h102.053c4.509 0 8.105-3.725 7.988-8.232-1.032-39.714 31.007-73.768 71.986-73.768 40.75 0 72.986 33.817 71.993 73.681-.112 4.502 3.485 8.219 7.988 8.219h21.019c4.418 0 8-3.582 8-8v-99.32c0-17.88-8.62-34.81-23.07-45.3zm-180.032 22.719-8.834-68.025c-.582-4.48-4.752-7.59-9.212-6.873-47.703 7.673-90.703 29.182-126.329 60.937-5.482 4.886-2.002 13.961 5.341 13.961zm124.002-111.249c-9.442 9.442-2.676 25.61 10.6 25.61 8.33 0 15-6.736 15-15 0-13.427-16.25-19.96-25.6-10.61zm47.374-26.159c-20.323-20.323-53.215-20.324-73.539 0-3.125 3.124-3.125 8.189 0 11.314 3.124 3.124 8.189 3.124 11.313 0 14.07-14.07 36.84-14.071 50.912 0 1.562 1.562 3.609 2.343 5.657 2.343 7.063 0 10.712-8.602 5.657-13.657zm29.698-29.699c-36.737-36.736-96.197-36.74-132.936 0-3.125 3.124-3.125 8.189 0 11.314 3.124 3.124 8.189 3.124 11.313 0 30.484-30.484 79.822-30.486 110.309 0 1.562 1.562 3.609 2.343 5.657 2.343 7.064 0 10.711-8.603 5.657-13.657z"
/></svg>
\ No newline at end of file
<svg
stroke=
"#000000"
fill=
"#49f3fc"
stroke-width=
"4"
id=
"Layer_1"
enable-background=
"new 0 0 480.324 480.324"
height=
"512"
viewBox=
"0 0 480.324 480.324"
width=
"512"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"m165 369.493c0 30.88-25.12 56-56 56-30.87 0-56-25.12-56-56s25.13-56 56-56c30.88 0 56 25.12 56 56zm206-56c-30.87 0-56 25.12-56 56s25.13 56 56 56c30.88 0 56-25.12 56-56s-25.12-56-56-56zm-77.967-64.001h50.033c12.052 0 23.313-5.336 30.941-14.65l22.049-31.979c2.903-4.21 1.174-10.035-3.566-11.956-28.458-11.533-62.576-20.032-100.599-19.283-4.771.094-8.412 4.304-7.797 9.036zm163.897-22.719c-9.155-6.647-20.698-14.234-34.298-21.613-3.605-1.956-8.105-.901-10.433 2.476l-25.199 36.548c-8.963 12.041-25.417 21.308-43.935 21.308-5.677 0-249.482 0-245.536 0-23.059 0-46.012 3.129-68.229 9.301-17.159 4.766-29.3 20.555-29.3 38.55v55.95c0 4.418 3.582 8 8 8h20.996c4.418 0 7.985-3.583 7.991-8.002.056-39.075 31.946-71.798 72.012-71.798 40.925 0 73.024 34.004 71.986 73.768-.118 4.507 3.479 8.232 7.988 8.232h102.053c4.509 0 8.105-3.725 7.988-8.232-1.032-39.714 31.007-73.768 71.986-73.768 40.75 0 72.986 33.817 71.993 73.681-.112 4.502 3.485 8.219 7.988 8.219h21.019c4.418 0 8-3.582 8-8v-99.32c0-17.88-8.62-34.81-23.07-45.3zm-180.032 22.719-8.834-68.025c-.582-4.48-4.752-7.59-9.212-6.873-47.703 7.673-90.703 29.182-126.329 60.937-5.482 4.886-2.002 13.961 5.341 13.961zm124.002-111.249c-9.442 9.442-2.676 25.61 10.6 25.61 8.33 0 15-6.736 15-15 0-13.427-16.25-19.96-25.6-10.61zm47.374-26.159c-20.323-20.323-53.215-20.324-73.539 0-3.125 3.124-3.125 8.189 0 11.314 3.124 3.124 8.189 3.124 11.313 0 14.07-14.07 36.84-14.071 50.912 0 1.562 1.562 3.609 2.343 5.657 2.343 7.063 0 10.712-8.602 5.657-13.657zm29.698-29.699c-36.737-36.736-96.197-36.74-132.936 0-3.125 3.124-3.125 8.189 0 11.314 3.124 3.124 8.189 3.124 11.313 0 30.484-30.484 79.822-30.486 110.309 0 1.562 1.562 3.609 2.343 5.657 2.343 7.064 0 10.711-8.603 5.657-13.657z"
/></svg>
static/flipped_car.svg
0 → 100644
View file @
e8c301bf
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:sodipodi=
"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape=
"http://www.inkscape.org/namespaces/inkscape"
stroke=
"#000000"
fill=
"#49f3fc"
stroke-width=
"4"
id=
"Layer_1"
enable-background=
"new 0 0 480.324 480.324"
viewBox=
"0 0 480.324 480.324"
height=
"512"
width=
"512"
version=
"1.1"
sodipodi:docname=
"flipped_car.svg"
inkscape:version=
"0.92.3 (2405546, 2018-03-11)"
>
<metadata
id=
"metadata9"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id=
"defs7"
/>
<sodipodi:namedview
pagecolor=
"#ffffff"
bordercolor=
"#666666"
borderopacity=
"1"
objecttolerance=
"10"
gridtolerance=
"10"
guidetolerance=
"10"
inkscape:pageopacity=
"0"
inkscape:pageshadow=
"2"
inkscape:window-width=
"1920"
inkscape:window-height=
"992"
id=
"namedview5"
showgrid=
"false"
inkscape:zoom=
"0.4609375"
inkscape:cx=
"256"
inkscape:cy=
"256"
inkscape:window-x=
"0"
inkscape:window-y=
"24"
inkscape:window-maximized=
"1"
inkscape:current-layer=
"Layer_1"
/>
<path
d=
"m 315.30837,369.493 c 0,30.88 25.12,56 56,56 30.87,0 56,-25.12 56,-56 0,-30.88 -25.13,-56 -56,-56 -30.88,0 -56,25.12 -56,56 z m -206,-56 c 30.87,0 56,25.12 56,56 0,30.88 -25.13,56 -56,56 -30.879999,0 -55.999999,-25.12 -55.999999,-56 0,-30.88 25.12,-56 55.999999,-56 z m 77.967,-64.001 h -50.033 c -12.052,0 -23.313,-5.336 -30.941,-14.65 L 84.252371,202.863 c -2.903,-4.21 -1.174,-10.035 3.566,-11.956 28.457999,-11.533 62.575999,-20.032 100.598999,-19.283 4.771,0.094 8.412,4.304 7.797,9.036 z M 23.378371,226.773 c 9.155,-6.647 20.698,-14.234 34.298,-21.613 3.605,-1.956 8.105,-0.901 10.433,2.476 l 25.199,36.548 c 8.962999,12.041 25.416999,21.308 43.934999,21.308 5.677,0 249.482,0 245.536,0 23.059,0 46.012,3.129 68.229,9.301 17.159,4.766 29.3,20.555 29.3,38.55 v 55.95 c 0,4.418 -3.582,8 -8,8 h -20.996 c -4.418,0 -7.985,-3.583 -7.991,-8.002 -0.056,-39.075 -31.946,-71.798 -72.012,-71.798 -40.925,0 -73.024,34.004 -71.986,73.768 0.118,4.507 -3.479,8.232 -7.988,8.232 h -102.053 c -4.509,0 -8.105,-3.725 -7.988,-8.232 1.032,-39.714 -31.007,-73.768 -71.986,-73.768 -40.749999,0 -72.985999,33.817 -71.992999,73.681 0.112,4.502 -3.485,8.219 -7.988,8.219 H 8.3083711 c -4.418,0 -8.00000002,-3.582 -8.00000002,-8 v -99.32 c 0,-17.88 8.62000002,-34.81 23.06999992,-45.3 z m 180.031999,22.719 8.834,-68.025 c 0.582,-4.48 4.752,-7.59 9.212,-6.873 47.703,7.673 90.703,29.182 126.329,60.937 5.482,4.886 2.002,13.961 -5.341,13.961 z M 79.408371,138.243 c 9.442,9.442 2.676,25.61 -10.6,25.61 -8.33,0 -15,-6.736 -15,-15 0,-13.427 16.25,-19.96 25.6,-10.61 z m -47.374,-26.159 c 20.323,-20.323 53.215,-20.324 73.538999,0 3.125,3.124 3.125,8.189 0,11.314 -3.124,3.124 -8.188999,3.124 -11.312999,0 -14.07,-14.07 -36.84,-14.071 -50.912,0 -1.562,1.562 -3.609,2.343 -5.657,2.343 -7.063,0 -10.712,-8.602 -5.657,-13.657 z M 2.3363711,82.385 c 36.7369999,-36.736 96.1969999,-36.74 132.9359989,0 3.125,3.124 3.125,8.189 0,11.314 -3.124,3.124 -8.189,3.124 -11.313,0 -30.483999,-30.484 -79.821999,-30.486 -110.308999,0 -1.562,1.562 -3.609,2.343 -5.6569999,2.343 -7.06400002,0 -10.711,-8.603 -5.657,-13.657 z"
id=
"path2"
inkscape:connector-curvature=
"0"
/>
</svg>
static/menu.css
View file @
e8c301bf
...
...
@@ -105,6 +105,7 @@ body {
}
.receiver
{
position
:
relative
;
background
:
#d4d4d4
;
color
:
#111
;
font-weight
:
bold
;
...
...
@@ -115,3 +116,25 @@ body {
.receiver
span
{
display
:
block
;
}
.edit-icon
{
display
:
block
;
position
:
absolute
;
top
:
5px
;
right
:
5px
;
}
.edit-checkbox
{
cursor
:
pointer
;
opacity
:
0
;
/* hide this */
z-index
:
2
;
/* and place it on top */
}
.no-select
{
-webkit-user-select
:
none
;
/* Safari */
-khtml-user-select
:
none
;
/* Konqueror HTML */
-moz-user-select
:
none
;
/* Old versions of Firefox */
-ms-user-select
:
none
;
/* Internet Explorer/Edge */
user-select
:
none
;
/* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
static/tower.svg
View file @
e8c301bf
<svg
stroke=
"#000
"
fill=
"#689bed
"
height=
"511pt"
viewBox=
"-11 0 511 511.99951"
width=
"511pt"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"m377.628906 169.832031c2.203125 1.140625 4.5625 1.679688 6.886719 1.679688 5.449219 0 10.707031-2.96875 13.378906-8.144531 12.300781-23.835938 18.804688-50.675782 18.804688-77.613282 0-26.933594-6.503907-53.773437-18.804688-77.609375-3.8125-7.378906-12.886719-10.277343-20.265625-6.464843-7.382812 3.808593-10.277344 12.882812-6.46875 20.265624 10.257813 19.867188 15.457032 41.335938 15.457032 63.808594 0 22.476563-5.199219 43.945313-15.457032 63.8125-3.808594 7.382813-.914062 16.457032 6.46875 20.265625zm0 0"
/><path
d=
"m109.148438 171.320312c2.316406 0 4.667968-.539062 6.871093-1.667968 7.386719-3.800782 10.292969-12.871094 6.496094-20.257813-10.195313-19.820312-15.363281-41.234375-15.363281-63.640625s5.167968-43.816406 15.363281-63.636718c3.796875-7.386719.890625-16.457032-6.496094-20.257813-7.390625-3.800781-16.457031-.890625-20.257812 6.496094-12.230469 23.78125-18.695313 50.542969-18.695313 77.398437 0 26.859375 6.464844 53.621094 18.695313 77.402344 2.667969 5.183594 7.929687 8.164062 13.386719 8.164062zm0 0"
/><path
d=
"m160.101562 150.265625c2.535157 0 5.105469-.644531 7.460938-1.992187 7.210938-4.128907 9.707031-13.320313 5.582031-20.527344-7.292969-12.734375-11.148437-27.257813-11.148437-41.992188 0-14.730468 3.851562-29.25 11.148437-41.988281 4.125-7.207031 1.628907-16.398437-5.582031-20.527344-7.207031-4.128906-16.398438-1.628906-20.527344 5.578125-9.894531 17.28125-15.125 36.96875-15.125 56.9375 0 19.972656 5.230469 39.660156 15.125 56.941406 2.777344 4.851563 7.851563 7.570313 13.066406 7.570313zm0 0"
/><path
d=
"m331.769531 85.753906c0 14.734375-3.851562 29.253906-11.148437 41.992188-4.125 7.207031-1.628906 16.398437 5.582031 20.527344 2.355469 1.351562 4.925781 1.992187 7.460937 1.992187 5.214844 0 10.289063-2.71875 13.066407-7.570313 9.894531-17.277343 15.125-36.96875 15.125-56.9375 0-19.972656-5.230469-39.660156-15.125-56.941406-4.128907-7.207031-13.320313-9.707031-20.527344-5.578125-7.210937 4.128907-9.707031 13.320313-5.582031 20.527344 7.296875 12.734375 11.148437 27.257813 11.148437 41.988281zm0 0"
/><path
d=
"m474.828125 481.914062h-61.304687l-25.597657-45.375c-2.667969-4.726562-7.671875-7.648437-13.101562-7.648437h-15.402344l-77.90625-284.546875c-.324219-1.1875-.789063-2.304688-1.367187-3.34375 18.707031-11.304688 31.242187-31.835938 31.242187-55.246094 0-35.566406-28.9375-64.503906-64.507813-64.503906-35.566406 0-64.503906 28.9375-64.503906 64.503906 0 23.410156 12.53125 43.941406 31.238282 55.246094-.578126 1.039062-1.042969 2.15625-1.367188 3.34375l-77.90625 284.546875h-15.402344c-5.429687 0-10.433594 2.921875-13.101562 7.648437l-25.597656 45.375h-64.699219c-8.308594 0-15.042969 6.734376-15.042969 15.042969 0 8.308594 6.734375 15.042969 15.042969 15.042969h459.285156c8.308594 0 15.042969-6.734375 15.042969-15.042969 0-8.308593-6.734375-15.042969-15.042969-15.042969zm-160.753906-104.722656-46.621094-48.949218 25.800781-27.089844zm-101.613281-291.4375c0-18.976562 15.441406-34.417968 34.421874-34.417968 18.980469 0 34.421876 15.441406 34.421876 34.417968 0 18.980469-15.441407 34.421875-34.421876 34.421875-18.980468 0-34.421874-15.441406-34.421874-34.421875zm59.121093 136.234375h-49.398437l16.050781-58.628906h17.296875zm-57.636719 30.082031h65.875l4.160157 15.199219-37.296875 39.160157-36.988282-38.832032zm-13.523437 49.40625 25.488281 26.765626-46.058594 48.355468zm46.261719 48.574219 75.082031 78.839844h-150.167969zm-131.902344 131.863281 12.941406-22.941406h238.316406l12.941407 22.941406zm0 0"
/></svg>
<svg
stroke=
"#000
000"
fill=
"#689bed"
stroke-width=
"4
"
height=
"511pt"
viewBox=
"-11 0 511 511.99951"
width=
"511pt"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"m377.628906 169.832031c2.203125 1.140625 4.5625 1.679688 6.886719 1.679688 5.449219 0 10.707031-2.96875 13.378906-8.144531 12.300781-23.835938 18.804688-50.675782 18.804688-77.613282 0-26.933594-6.503907-53.773437-18.804688-77.609375-3.8125-7.378906-12.886719-10.277343-20.265625-6.464843-7.382812 3.808593-10.277344 12.882812-6.46875 20.265624 10.257813 19.867188 15.457032 41.335938 15.457032 63.808594 0 22.476563-5.199219 43.945313-15.457032 63.8125-3.808594 7.382813-.914062 16.457032 6.46875 20.265625zm0 0"
/><path
d=
"m109.148438 171.320312c2.316406 0 4.667968-.539062 6.871093-1.667968 7.386719-3.800782 10.292969-12.871094 6.496094-20.257813-10.195313-19.820312-15.363281-41.234375-15.363281-63.640625s5.167968-43.816406 15.363281-63.636718c3.796875-7.386719.890625-16.457032-6.496094-20.257813-7.390625-3.800781-16.457031-.890625-20.257812 6.496094-12.230469 23.78125-18.695313 50.542969-18.695313 77.398437 0 26.859375 6.464844 53.621094 18.695313 77.402344 2.667969 5.183594 7.929687 8.164062 13.386719 8.164062zm0 0"
/><path
d=
"m160.101562 150.265625c2.535157 0 5.105469-.644531 7.460938-1.992187 7.210938-4.128907 9.707031-13.320313 5.582031-20.527344-7.292969-12.734375-11.148437-27.257813-11.148437-41.992188 0-14.730468 3.851562-29.25 11.148437-41.988281 4.125-7.207031 1.628907-16.398437-5.582031-20.527344-7.207031-4.128906-16.398438-1.628906-20.527344 5.578125-9.894531 17.28125-15.125 36.96875-15.125 56.9375 0 19.972656 5.230469 39.660156 15.125 56.941406 2.777344 4.851563 7.851563 7.570313 13.066406 7.570313zm0 0"
/><path
d=
"m331.769531 85.753906c0 14.734375-3.851562 29.253906-11.148437 41.992188-4.125 7.207031-1.628906 16.398437 5.582031 20.527344 2.355469 1.351562 4.925781 1.992187 7.460937 1.992187 5.214844 0 10.289063-2.71875 13.066407-7.570313 9.894531-17.277343 15.125-36.96875 15.125-56.9375 0-19.972656-5.230469-39.660156-15.125-56.941406-4.128907-7.207031-13.320313-9.707031-20.527344-5.578125-7.210937 4.128907-9.707031 13.320313-5.582031 20.527344 7.296875 12.734375 11.148437 27.257813 11.148437 41.988281zm0 0"
/><path
d=
"m474.828125 481.914062h-61.304687l-25.597657-45.375c-2.667969-4.726562-7.671875-7.648437-13.101562-7.648437h-15.402344l-77.90625-284.546875c-.324219-1.1875-.789063-2.304688-1.367187-3.34375 18.707031-11.304688 31.242187-31.835938 31.242187-55.246094 0-35.566406-28.9375-64.503906-64.507813-64.503906-35.566406 0-64.503906 28.9375-64.503906 64.503906 0 23.410156 12.53125 43.941406 31.238282 55.246094-.578126 1.039062-1.042969 2.15625-1.367188 3.34375l-77.90625 284.546875h-15.402344c-5.429687 0-10.433594 2.921875-13.101562 7.648437l-25.597656 45.375h-64.699219c-8.308594 0-15.042969 6.734376-15.042969 15.042969 0 8.308594 6.734375 15.042969 15.042969 15.042969h459.285156c8.308594 0 15.042969-6.734375 15.042969-15.042969 0-8.308593-6.734375-15.042969-15.042969-15.042969zm-160.753906-104.722656-46.621094-48.949218 25.800781-27.089844zm-101.613281-291.4375c0-18.976562 15.441406-34.417968 34.421874-34.417968 18.980469 0 34.421876 15.441406 34.421876 34.417968 0 18.980469-15.441407 34.421875-34.421876 34.421875-18.980468 0-34.421874-15.441406-34.421874-34.421875zm59.121093 136.234375h-49.398437l16.050781-58.628906h17.296875zm-57.636719 30.082031h65.875l4.160157 15.199219-37.296875 39.160157-36.988282-38.832032zm-13.523437 49.40625 25.488281 26.765626-46.058594 48.355468zm46.261719 48.574219 75.082031 78.839844h-150.167969zm-131.902344 131.863281 12.941406-22.941406h238.316406l12.941407 22.941406zm0 0"
/></svg>
views/cesium.tpl
View file @
e8c301bf
...
...
@@ -6,6 +6,7 @@
<!-- Include the CesiumJS JavaScript and CSS files -->
<script
src=
"https://cesium.com/downloads/cesiumjs/releases/1.75/Build/Cesium/Cesium.js"
></script>
<link
href=
"https://cesium.com/downloads/cesiumjs/releases/1.75/Build/Cesium/Widgets/widgets.css"
rel=
"stylesheet"
>
<link
href=
"https://fonts.googleapis.com/icon?family=Material+Icons"
rel=
"stylesheet"
>
<link
href=
"/static/style.css"
rel=
"stylesheet"
>
<link
href=
"/static/menu.css"
rel=
"stylesheet"
>
</head>
...
...
@@ -43,6 +44,10 @@
}
}
// function updateRx() {
//
// }
function
loadCzml
()
{
var
dataSourcePromise
=
Cesium
.
CzmlDataSource
.
load
(
'/static/output.czml'
);
viewer
.
dataSources
.
add
(
dataSourcePromise
);
...
...
@@ -67,23 +72,47 @@
<ul
id=
"menu"
>
<h2
style=
"color: #eee; padding-left: 5px;"
>
Receivers
</h2>
% for x in receivers:
% for rx_index, x in enumerate(receivers):
% bad_chars = ["/", "-", "?", " ", ";", ":"]
% for bad in bad_chars:
% id = x.station_id.replace(bad, '')
% end
% ismobile = "checked" if x.isMobile == True else ""
<div
class=
"receiver"
>
<span>
Station ID:
<a
href=
"{
{
x
.
station_url
}
}"
target=
"_blank"
>
{
{
x
.
station_id
}
}
</a></span>
<span>
Location: {
{
x
.
latitude
}
}
°
, {
{
x
.
longitude
}
}
°
</span>
<span>
Heading: {
{
x
.
heading
}
}
°
</span>
<span>
Tuned to {
{
x
.
frequency
}
} MHz
</span>
<span
id=
"{
{
x
.
station_id
}
}-id"
>
Station ID:
<a
href=
"{
{
x
.
station_url
}
}"
target=
"_blank"
>
{
{
x
.
station_id
}
}
</a></span>
<span
id=
"{
{
x
.
station_id
}
}-location"
>
Location: {
{
x
.
latitude
}
}
°
, {
{
x
.
longitude
}
}
°
</span>
<span
id=
"{
{
x
.
station_id
}
}-heading"
>
Heading: {
{
x
.
heading
}
}
°
</span>
<span
id=
"{
{
x
.
station_id
}
}-freq"
>
Tuned to {
{
x
.
frequency
}
} MHz
</span>
<input
id=
"{
{
x
.
station_id
}
}-edit"
class=
"edit-checkbox edit-icon"
type=
"checkbox"
/>
<span
id=
"{
{
x
.
station_id
}
}-editicon"
class=
"material-icons edit-icon no-select"
>
create
</span>
<span
id=
"{
{
x
.
station_id
}
}-mobile"
><input
type=
"hidden"
id=
"mobilerx_toggle_{
{
id
}
}"
/></span>
<script>
var
mobile_
{
{
id
}
}
=
"{
{
x
.
station_id
}
}-mobile"
;
// var editIcon = document.getElementById("{
{
x
.
station_id
}
}
-
editicon
")
var editButton_{
{
id
}
} = document.getElementById("
{
{
x
.
station_id
}
}
-
edit
");
editButton_{
{
id
}
}.onchange = function() {
var isMobileCheck_{
{
id
}
} = document.getElementById("
mobilerx_toggle_
{
{
id
}
}
");
if (editButton_{
{
id
}
}.checked) {
document.getElementById("
{
{
x
.
station_id
}
}
-
editicon
").innerHTML = "
save
";
document.getElementById(mobile_{
{
id
}
}).innerHTML = "
Mobile
Receiver
:
<
input
{
{
ismobile
}
}
id
=
\
"mobilerx_toggle_{
{
id
}
}
\"
type=
\"
checkbox
\"
/>"
;
}
else
{
isMobileCheck_
{
{
id
}
}
=
document
.
getElementById
(
"mobilerx_toggle_{
{
id
}
}"
);
if
(
isMobileCheck_
{
{
id
}
}.
checked
)
{
updateParams
(
"ismobile={
{
rx_index
}
}"
);
}
else
{
updateParams
(
"isnotmobile={
{
rx_index
}
}"
);
}
document
.
getElementById
(
mobile_
{
{
id
}
}).
innerHTML
=
""
;
document
.
getElementById
(
"{
{
x
.
station_id
}
}-editicon"
).
innerHTML
=
"create"
;
}
}
</script>
</div>
% end
</ul>
</div>
<!-- <span>Location:</span>
<span>Mobile Receiver:
<label class="switch">
<input id="isMobile" name="isMobile" type="checkbox">
<span class="switchslider round"></span>
</label></span>
</span> -->
<div
class=
"slidecontainer"
>
<div
class=
"tooltip"
>
<span>
...
...
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