Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solvers-acuk-m
Project
Project
Details
Activity
Releases
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
Takhir Fakhrutdinov
solvers-acuk-m
Commits
aa539bea
Commit
aa539bea
authored
Sep 25, 2022
by
Takhir Fakhrutdinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Изменение подчёта контрольной суммы проводки
parent
3eb4047a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
7 deletions
+11
-7
fileFactory.py
fte/lib/libpy/fileFactory.py
+1
-1
eopfile.py
fte/lib/libpy/parsers/eopfile.py
+7
-3
resfile.py
fte/lib/libpy/parsers/resfile.py
+1
-1
tcfile.py
fte/lib/libpy/parsers/tcfile.py
+1
-1
tdmfile.py
fte/lib/libpy/parsers/tdmfile.py
+1
-1
No files found.
fte/lib/libpy/fileFactory.py
View file @
aa539bea
...
@@ -301,7 +301,7 @@ eop = {
...
@@ -301,7 +301,7 @@ eop = {
"mag_error"
:{
"type"
:
"string"
,
"pattern"
:
r"[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?"
},
"mag_error"
:{
"type"
:
"string"
,
"pattern"
:
r"[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?"
},
"crops"
:{
"type"
:
"string"
,
"media"
:{
"binaryEncoding"
:
"base64"
,
"type"
:
"image/png"
}}
"crops"
:{
"type"
:
"string"
,
"media"
:{
"binaryEncoding"
:
"base64"
,
"type"
:
"image/png"
}}
},
},
"required"
:
[
"utc"
,
"ra_j2000"
,
"dec_j2000"
,
"mag"
,
"ra_j2000_full_error"
,
"dec_j2000_full_error"
,
"mag_error"
,
"crops"
]
"required"
:
[
"utc"
,
"ra_j2000"
,
"dec_j2000"
,
"mag"
,
"ra_j2000_full_error"
,
"dec_j2000_full_error"
,
"mag_error"
]
}
}
}
}
}
}
...
...
fte/lib/libpy/parsers/eopfile.py
View file @
aa539bea
...
@@ -48,7 +48,7 @@ def _get_trackcrc(meas):
...
@@ -48,7 +48,7 @@ def _get_trackcrc(meas):
s
=
''
s
=
''
for
m
in
meas
:
for
m
in
meas
:
tm
=
datetime
.
strptime
(
m
[
'utc'
],
'
%
d/
%
m/
%
Y
%
H:
%
M:
%
S.
%
f'
)
tm
=
datetime
.
strptime
(
m
[
'utc'
],
'
%
d/
%
m/
%
Y
%
H:
%
M:
%
S.
%
f'
)
t
=
'
%
s
%.2
f
%.2
f'
%
(
t
=
'
%
.22
s
%.2
f
%.2
f'
%
(
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
_hms
(
float
(
m
[
'ra_j2000'
])),
_hms
(
float
(
m
[
'ra_j2000'
])),
_hms
(
float
(
m
[
'dec_j2000'
])),
_hms
(
float
(
m
[
'dec_j2000'
])),
...
@@ -78,10 +78,14 @@ def _get_meas_t(meas):
...
@@ -78,10 +78,14 @@ def _get_meas_t(meas):
tm
=
datetime
.
strptime
(
m
[
'utc'
],
'
%
d/
%
m/
%
Y
%
H:
%
M:
%
S.
%
f'
)
tm
=
datetime
.
strptime
(
m
[
'utc'
],
'
%
d/
%
m/
%
Y
%
H:
%
M:
%
S.
%
f'
)
tb
,
te
=
min
(
tb
,
tm
),
max
(
te
,
tm
)
tb
,
te
=
min
(
tb
,
tm
),
max
(
te
,
tm
)
rec
=
[
float
(
m
.
get
(
i
,
0.0
))
for
i
in
(
_fields
)]
rec
=
[
float
(
m
.
get
(
i
,
0.0
))
for
i
in
(
_fields
)]
crops
=
r'\\\\\\\\x
%
s'
%
base64
.
b64decode
(
m
[
'crops'
])
.
hex
()
mag
=
float
(
m
.
get
(
'mag'
,
0.0
))
mag
=
float
(
m
.
get
(
'mag'
,
0.0
))
if
mag
!=
0
:
mags
.
append
(
mag
)
if
mag
!=
0
:
mags
.
append
(
mag
)
if
'crops'
in
m
:
crops
=
r'\\\\\\\\x
%
s'
%
base64
.
b64decode
(
m
[
'crops'
])
.
hex
()
ms
.
append
(
r'"(\\"
%
s\\",\\"
%
s\\",\\"
%
s\\")"'
%
(
tm
.
isoformat
(),
str
(
rec
)
.
replace
(
'['
,
'{'
)
.
replace
(
']'
,
'}'
),
crops
,))
ms
.
append
(
r'"(\\"
%
s\\",\\"
%
s\\",\\"
%
s\\")"'
%
(
tm
.
isoformat
(),
str
(
rec
)
.
replace
(
'['
,
'{'
)
.
replace
(
']'
,
'}'
),
crops
,))
else
:
ms
.
append
(
r'"(\\"
%
s\\",\\"
%
s\\",)"'
%
(
tm
.
isoformat
(),
str
(
rec
)
.
replace
(
'['
,
'{'
)
.
replace
(
']'
,
'}'
),))
avg_m
=
round
(
sum
(
mags
)
/
len
(
mags
),
1
)
if
len
(
mags
)
else
0.0
avg_m
=
round
(
sum
(
mags
)
/
len
(
mags
),
1
)
if
len
(
mags
)
else
0.0
return
tb
,
te
,
avg_m
,
'{'
+
','
.
join
(
ms
)
+
'}'
return
tb
,
te
,
avg_m
,
'{'
+
','
.
join
(
ms
)
+
'}'
...
...
fte/lib/libpy/parsers/resfile.py
View file @
aa539bea
...
@@ -47,7 +47,7 @@ def get_trackcrc(meas):
...
@@ -47,7 +47,7 @@ def get_trackcrc(meas):
"""
"""
s
=
''
s
=
''
for
m
in
meas
:
for
m
in
meas
:
t
=
'
%
s
%.2
f
%.2
f'
%
(
m
.
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
m
.
params
[
0
],
m
.
params
[
1
],)
t
=
'
%
.22
s
%.2
f
%.2
f'
%
(
m
.
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
m
.
params
[
0
],
m
.
params
[
1
],)
s
+=
t
s
+=
t
return
hs
.
md5
(
s
.
encode
(
'utf8'
))
.
hexdigest
()
return
hs
.
md5
(
s
.
encode
(
'utf8'
))
.
hexdigest
()
...
...
fte/lib/libpy/parsers/tcfile.py
View file @
aa539bea
...
@@ -54,7 +54,7 @@ def get_trackcrc(meas):
...
@@ -54,7 +54,7 @@ def get_trackcrc(meas):
"""
"""
s
=
''
s
=
''
for
m
in
meas
:
for
m
in
meas
:
t
=
'
%
s
%.2
f
%.2
f'
%
(
m
.
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
m
.
params
[
0
],
m
.
params
[
1
],)
t
=
'
%
.22
s
%.2
f
%.2
f'
%
(
m
.
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
m
.
params
[
0
],
m
.
params
[
1
],)
s
+=
t
s
+=
t
return
hs
.
md5
(
s
.
encode
(
'utf8'
))
.
hexdigest
()
return
hs
.
md5
(
s
.
encode
(
'utf8'
))
.
hexdigest
()
...
...
fte/lib/libpy/parsers/tdmfile.py
View file @
aa539bea
...
@@ -48,7 +48,7 @@ def _get_trackcrc(meas,is_degree):
...
@@ -48,7 +48,7 @@ def _get_trackcrc(meas,is_degree):
s
=
''
s
=
''
for
m
in
meas
:
for
m
in
meas
:
tm
=
datetime
.
fromisoformat
(
m
[
0
])
tm
=
datetime
.
fromisoformat
(
m
[
0
])
t
=
'
%
s
%.2
f
%.2
f'
%
(
t
=
'
%
.22
s
%.2
f
%.2
f'
%
(
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
tm
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
),
_hms
(
float
(
m
[
1
]
/
15.0
))
if
is_degree
else
float
(
m
[
1
]
),
# Переводим в часовой угол
_hms
(
float
(
m
[
1
]
/
15.0
))
if
is_degree
else
float
(
m
[
1
]
),
# Переводим в часовой угол
_hms
(
float
(
m
[
2
]
))
if
is_degree
else
float
(
m
[
2
]
),
_hms
(
float
(
m
[
2
]
))
if
is_degree
else
float
(
m
[
2
]
),
...
...
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