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
Achim Morschhauser
GeomagLogger
Commits
996c9a81
Commit
996c9a81
authored
Nov 08, 2021
by
Achim Morschhauser
Browse files
Comments updated
parent
472c6b47
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
src/Filter_Obs.cpp
View file @
996c9a81
This diff is collapsed.
Click to expand it.
src/data_obs.cpp
View file @
996c9a81
...
...
@@ -712,8 +712,8 @@ int data_obs::filter_fir_sym_data(std::vector <data_obs*>* data,
int
N
=
data
->
size
();
if
(
data
->
size
()
!=
win
->
size
()){
std
::
cerr
<<
"Number of elements in data and win"
"must match !"
<<
std
::
endl
;
std
::
cerr
<<
"
ERROR:
Number of elements in data and win"
"must match !"
<<
std
::
endl
;
return
(
-
1
);
}
...
...
@@ -722,7 +722,6 @@ int data_obs::filter_fir_sym_data(std::vector <data_obs*>* data,
// Get data
data
->
at
(
i
)
->
get_data
(
data_in
);
//data->at(i)->string(&datastr,5);
//std::cerr << "DEBUG FILTER INCOMING: " << data_in[0] << std::endl;
for
(
int
j
=
0
;
j
<
N_data
;
j
++
){
...
...
@@ -731,7 +730,8 @@ int data_obs::filter_fir_sym_data(std::vector <data_obs*>* data,
missing
[
j
]
+=
win
->
at
(
i
);
missing_N
[
j
]
++
;
timestamp
=
data
->
at
(
i
)
->
get_time
(
"%Y-%m-%d %H:%M:%S"
,
true
);
std
::
cerr
<<
"["
<<
timestamp
<<
"]: "
std
::
cerr
<<
"["
<<
timestamp
<<
"."
<<
tofilter1
.
back
()
->
get_msec
()
<<
"]: "
<<
"Found missing data in filter: "
<<
j
<<
" "
<<
missing
[
j
]
<<
" "
<<
missing_N
[
j
]
<<
" "
...
...
@@ -755,12 +755,15 @@ int data_obs::filter_fir_sym_data(std::vector <data_obs*>* data,
}
else
if
(
missing_N
[
j
]
==
0
)
{
this
->
data
[
j
]
=
filtered
[
j
];
}
else
{
timestamp
=
this
->
get_time
(
"%Y-%m-%d %H:%M:%S"
,
true
);
std
::
cerr
<<
"["
<<
timestamp
<<
"]: "
;
this
->
data
[
j
]
=
filtered
[
j
]
/
(
1
-
missing
[
j
]);
/* DEBUG
timestamp=this->get_time("%Y-%m-%d %H:%M:%S",true);
std::cerr << "[" << timestamp << "."
<< tofilter1.back()->get_msec() << "]: ";
std::cerr << "FILTERED DATA SET TO : "
<<
this
->
data
[
j
]
<<
<< this->data[j] <<
std::endl;
*/
}
}
...
...
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