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
de94346c
Commit
de94346c
authored
Jun 29, 2023
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
socket fixed and kr_packet updated with compass_offset
parent
0f0d4418
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
kr_packet.py
utils/ether_service/entities/data/kr_packet.py
+5
-0
ws_client.py
utils/ws_client.py
+3
-0
No files found.
utils/ether_service/entities/data/kr_packet.py
View file @
de94346c
...
@@ -48,6 +48,7 @@ class KrPacketV2(BasicDataclass):
...
@@ -48,6 +48,7 @@ class KrPacketV2(BasicDataclass):
ant_type
:
str
ant_type
:
str
latency
:
int
latency
:
int
processing_time
:
int
processing_time
:
int
compass_offset
:
float
=
0
def
__repr__
(
self
):
def
__repr__
(
self
):
dt
=
(
dt
=
(
...
@@ -59,6 +60,10 @@ class KrPacketV2(BasicDataclass):
...
@@ -59,6 +60,10 @@ class KrPacketV2(BasicDataclass):
absolute_bearing
+=
360
absolute_bearing
+=
360
elif
absolute_bearing
>
359
:
elif
absolute_bearing
>
359
:
absolute_bearing
-=
360
absolute_bearing
-=
360
if
self
.
compass_offset
!=
0
:
absolute_bearing
+=
self
.
compass_offset
return
f
"{dt}::{self.station_id}::"
\
return
f
"{dt}::{self.station_id}::"
\
f
"frequency: {self.freq / 1000000}, "
\
f
"frequency: {self.freq / 1000000}, "
\
f
"DoA: {absolute_bearing}, "
\
f
"DoA: {absolute_bearing}, "
\
...
...
utils/ws_client.py
View file @
de94346c
...
@@ -148,4 +148,7 @@ class WSClient:
...
@@ -148,4 +148,7 @@ class WSClient:
exc_info
=
(
ex
.
__class__
,
ex
,
ex
.
__traceback__
)
exc_info
=
(
ex
.
__class__
,
ex
,
ex
.
__traceback__
)
logging
.
warning
(
"WS error."
,
exc_info
=
exc_info
)
logging
.
warning
(
"WS error."
,
exc_info
=
exc_info
)
self
.
ws
=
None
self
.
ws
=
None
finally
:
if
session
is
not
None
:
await
session
.
close
()
await
asyncio
.
sleep
(
0
)
await
asyncio
.
sleep
(
0
)
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