Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Achim Morschhauser
GeomagLogger
Commits
366fc1ee
Commit
366fc1ee
authored
Nov 15, 2018
by
Achim Morschhauser
Browse files
AUX channels
parent
105f860b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/driver_obs_obsdaq.cpp
View file @
366fc1ee
...
...
@@ -882,10 +882,10 @@ int driver_obs_obsdaq::parse_data_bin(data_obs_vector* data, char* buf) {
}
// Check supplementary data
if
(
buf
[
1
]
&
(
unsigned
char
)
64
){
if
(
buf
[
1
]
&
1
){
if
(
buf
[
1
]
&
(
unsigned
char
)
64
){
if
(
buf
[
1
]
&
1
){
supp_count
=
1
;
}
else
if
(
supp_count
)
{
}
else
{
supp_count
+=
1
;
}
}
...
...
@@ -920,12 +920,26 @@ int driver_obs_obsdaq::parse_data_bin(data_obs_vector* data, char* buf) {
//
// Extract data from supplementary channels
//
num
=
(
uint32_t
)
0x8000
;
if
((
buf
[
1
]
&
64
)
&&
supp_count
>=
3
&&
supp_count
<=
4
){
if
((
buf
[
1
]
&
64
)
&&
supp_count
>=
1
&&
supp_count
<=
2
){
n32
=
(
(
(
buf
[
11
]
&
127
)
+
((
buf
[
1
]
&
4
)
<<
5
)
)
<<
8
)
+
(
(
(
buf
[
12
]
&
127
)
+
((
buf
[
1
]
&
2
)
<<
6
)
)
);
n
[
supp_count
]
=
((
double
)
((
int32_t
)
((
n32
^
num
)
-
num
)))
/
8000.0
;
switch
(
supp_count
)
{
case
1
:
n
[
3
]
=
((
double
)
((
int32_t
)
((
n32
^
num
)
-
num
)))
*
0.000575
+
1.0
;
break
;
case
2
:
n
[
4
]
=
((
double
)
((
int32_t
)
((
n32
^
num
)
-
num
)))
/
128.0
;
break
;
default:
n
[
supp_count
]
=
((
double
)
((
int32_t
)
((
n32
^
num
)
-
num
)))
/
8000.0
;
break
;
}
}
// Save the data
...
...
Write
Preview
Supports
Markdown
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