Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
zonnedemo
Commits
f3b362bd
Commit
f3b362bd
authored
Aug 23, 2021
by
Tammo Jan Dijkema
Browse files
Wrap
parent
c0ba27c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
kaart.py
View file @
f3b362bd
...
...
@@ -44,7 +44,7 @@ def signal_thread():
global
signal
context
=
zmq
.
Context
()
receiver
=
context
.
socket
(
zmq
.
PULL
)
receiver
.
connect
(
"tcp://127.0.0.1:555
7
"
)
receiver
.
connect
(
"tcp://127.0.0.1:555
8
"
)
while
True
:
buff
=
receiver
.
recv
()
signal
=
np
.
frombuffer
(
buff
,
dtype
=
"float32"
)[
-
1
]
...
...
@@ -53,7 +53,7 @@ s = Thread(target=signal_thread)
s
.
daemon
=
True
s
.
start
()
dt
=
Telescope
(
consoleHost
=
'
localhost
'
)
dt
=
Telescope
(
consoleHost
=
'
console
'
)
data
=
np
.
zeros
((
360
,
720
),
dtype
=
float
)
data
[:,
:]
=
np
.
nan
...
...
@@ -115,7 +115,10 @@ while not stoprequest:
def
lat_to_pixel
(
lat
):
return
round
(
2
*
lat
)
+
180
l
=
lon_to_pixel
(
pos
.
l
.
deg
)
ldeg
=
pos
.
l
.
deg
if
ldeg
>
180
:
ldeg
-=
360
l
=
lon_to_pixel
(
ldeg
)
b
=
lat_to_pixel
(
pos
.
b
.
deg
)
n
=
npoints
[
b
,
l
]
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment