Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
93e8efe9
Commit
93e8efe9
authored
Nov 12, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing if did is sane
parent
1d60252a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
EventLoggerFileInfo.java
src/main/java/com/elphel/imagej/ims/EventLoggerFileInfo.java
+16
-2
No files found.
src/main/java/com/elphel/imagej/ims/EventLoggerFileInfo.java
View file @
93e8efe9
...
@@ -381,6 +381,9 @@ public class EventLoggerFileInfo implements Comparable<EventLoggerFileInfo> {
...
@@ -381,6 +381,9 @@ public class EventLoggerFileInfo implements Comparable<EventLoggerFileInfo> {
bb_payload
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
bb_payload
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
@SuppressWarnings
(
"rawtypes"
)
@SuppressWarnings
(
"rawtypes"
)
Did_ins
did_ins
=
type_ins_2
?
(
new
Did_ins_2
(
bb_payload
))
:
(
new
Did_ins_1
(
bb_payload
));
Did_ins
did_ins
=
type_ins_2
?
(
new
Did_ins_2
(
bb_payload
))
:
(
new
Did_ins_1
(
bb_payload
));
if
(!
did_ins
.
isDidSane
())
{
continue
;
}
// double full_time = did_ins.getDoubleTime();
// double full_time = did_ins.getDoubleTime();
int
[]
week_time
=
did_ins
.
getWeekTimeMs
();
int
[]
week_time
=
did_ins
.
getWeekTimeMs
();
if
(
week_time0
==
null
)
{
if
(
week_time0
==
null
)
{
...
@@ -395,12 +398,23 @@ public class EventLoggerFileInfo implements Comparable<EventLoggerFileInfo> {
...
@@ -395,12 +398,23 @@ public class EventLoggerFileInfo implements Comparable<EventLoggerFileInfo> {
sx2
+=
ts_master
*
ts_master
;
sx2
+=
ts_master
*
ts_master
;
sy
+=
ts_gnss
;
sy
+=
ts_gnss
;
sxy
+=
ts_master
*
ts_gnss
;
sxy
+=
ts_master
*
ts_gnss
;
if
(
debugLevel
>
0
)
{
// -1
if
(
sy
>
2
*
sx
)
{
// -1
System
.
out
.
println
(
String
.
format
(
"%6d %10.6f %10.6f"
,
nrec
,
ts_master
,
ts_gnss
)+
" sx="
+
sx
+
" sy="
+
sy
);
System
.
out
.
println
(
Did_strobe_in_time
.
getWeekTimeMsDelta
(
week_time0
,
week_time
));
}
if
((
sy
>
2
*
sx
)
||
(
debugLevel
>
0
))
{
// -1
System
.
out
.
println
(
System
.
out
.
println
(
String
.
format
(
"%6d %10.6f %10.6f"
,
nrec
,
ts_master
,
ts_gnss
));
String
.
format
(
"%6d %10.6f %10.6f"
,
nrec
,
ts_master
,
ts_gnss
)
+
" sx="
+
sx
+
" sy="
+
sy
);
}
}
}
}
}
}
if
(
s0
==
0
){
System
.
out
.
println
(
"calibrateFromDidIns(): no valid records available, aborting."
);
return
false
;
}
double
d
=
(
s0
*
sx2
-
sx
*
sx
);
double
d
=
(
s0
*
sx2
-
sx
*
sx
);
double
a
=
(
sxy
*
s0
-
sy
*
sx
)
/
d
;
double
a
=
(
sxy
*
s0
-
sy
*
sx
)
/
d
;
double
b
=
(
sx2
*
sy
-
sx
*
sxy
)
/
d
;
double
b
=
(
sx2
*
sy
-
sx
*
sxy
)
/
d
;
...
...
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