Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99324648
CardNorth
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jan 23, 11:47
Size
472 B
Mime Type
text/x-python
Expires
Sat, Jan 25, 11:47 (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
23777572
Attached To
R890 mux0183
CardNorth
View Options
#!/usr/bin/python
import
sys
,
socket
sys
.
path
.
append
(
'../lib'
)
from
aisMsg
import
*
# Connect to multiplexer
client
=
socket
.
socket
()
host
=
socket
.
gethostname
()
client
.
connect
((
'0.0.0.0'
,
39150
))
obj
=
AISmsg21
()
obj
.
mmsi
=
101010100
obj
.
AtoN_type
=
AISmsg21
.
BEACON_CARDINAL_N
obj
.
name
=
'North'
obj
.
accuracy
=
1
obj
.
lat
=
42.0
+
0.05
obj
.
lon
=
6.0
obj
.
virtual_AtoN
=
1
multi
=
obj
.
Encode
()
for
aivdm
in
multi
:
print
(
aivdm
)
client
.
send
(
bytes
(
aivdm
,
'ASCII'
))
Event Timeline
Log In to Comment