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
IQ Recorder
Commits
14bf2a3f
Commit
14bf2a3f
authored
Jun 01, 2022
by
Tammo Jan Dijkema
Browse files
Tidy up offset from api
parent
509cc7f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
make_sigmf.py
View file @
14bf2a3f
...
...
@@ -85,7 +85,15 @@ def make_sigmf(iqfile, no_rename=False):
global_meta
[
"camras:pointing:az_deg"
]
=
f
"
{
(
pointingdata
[
'az'
]
+
180
)
%
360
:
.
4
f
}
"
global_meta
[
"camras:pointing:el_deg"
]
=
f
"
{
pointingdata
[
'el'
]
:
.
4
f
}
"
global_meta
[
"camras:offset_str"
]
=
f
"
{
pointingdata
[
'offset'
]
}
"
if
pointingdata
[
'offset'
].
strip
()
==
""
:
offset_az_deg
=
0
offset_el_deg
=
0
else
:
offset_az_str
,
offset_el_str
=
pointingdata
[
'offset'
].
split
(
','
)
offset_az_str
=
offset_az_str
.
strip
().
rstrip
(
'°'
)
offset_el_str
=
offset_el_str
.
strip
().
rstrip
(
'°'
)
global_meta
[
"camras:pointing:offset:az_deg"
]
=
offset_az_str
global_meta
[
"camras:pointing:offset:el_deg"
]
=
offset_el_str
global_meta
[
"camras:pointing:datetime"
]
=
Time
.
now
(
).
iso
[:
19
]
# Pointing is only accurate to the second
else
:
...
...
@@ -96,10 +104,10 @@ def make_sigmf(iqfile, no_rename=False):
"camras:pointing:az_deg"
]
=
f
"
{
(
dt
.
az
.
value
+
180
)
%
360
:
.
4
f
}
"
global_meta
[
"camras:pointing:el_deg"
]
=
f
"
{
dt
.
el
.
value
:
.
4
f
}
"
global_meta
[
"camras:pointing:offset
_
az_deg"
]
=
f
"
{
dt
.
offset_az
.
value
:
.
4
f
}
"
"camras:pointing:offset
:
az_deg"
]
=
f
"
{
dt
.
offset_az
.
value
:
+
.
4
f
}
"
global_meta
[
"camras:pointing:offset
_
el_deg"
]
=
f
"
{
dt
.
offset_el
.
value
:
.
4
f
}
"
global_meta
[
"camras:focusbox_position"
]
=
f
"
{
dt
.
focusbox_pos
:
.
3
f
}
"
"camras:pointing:offset
:
el_deg"
]
=
f
"
{
dt
.
offset_el
.
value
:
+
.
4
f
}
"
global_meta
[
"camras:focusbox_position
_m
"
]
=
f
"
{
dt
.
focusbox_pos
:
.
3
f
}
"
global_meta
[
"camras:pointing:datetime"
]
=
Time
.
now
(
).
datetime
.
isoformat
()
...
...
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