Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
BAORadio
AnaPAON4
Commits
b4481345
Commit
b4481345
authored
May 19, 2015
by
Reza ANSARI
Browse files
correction bug remplissage DataTable, Reza 19/05/2015
parent
c818b714
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
visi2dtacx.cc
visi2dtacx.cc
+7
-6
No files found.
visi2dtacx.cc
View file @
b4481345
...
...
@@ -192,7 +192,7 @@ int main(int narg, char* arg[])
double
acdt
[
32
];
// les 4*8=32 valeurs d'autocorrelation pour remplissage dans la table
complex
<
double
>
cxdt
[
18
];
// les 3*6=18 valeurs de cross-correlations pour remplissage dans la table
TimeStamp
dateobs
;
TimeStamp
dateobs
,
cfdate
;
TimeStamp
dateorg
(
2015
,
1
,
1
,
12
,
0
,
0.
);
// Date origine 1 jan 2015
double
mttag
;
int
cnt
=
0
,
cntnt
=
0
,
pcntnt
=
0
;
...
...
@@ -202,17 +202,14 @@ int main(int narg, char* arg[])
DataTableRowPtr
rowp
=
dt
.
EmptyRowPtr
();
//
while
(
fgok
)
{
fgok
=
vreader
.
ReadNext
(
vismtx
,
date
obs
,
mttag
);
fgok
=
vreader
.
ReadNext
(
vismtx
,
cf
date
,
mttag
);
if
(
fgok
)
{
if
(
cnt
==
0
)
{
//resizing matrices for sum of auto-correlations and sum of 6 cross-correlations
acsum
.
SetSize
(
8
,
vismtx
.
NCols
());
cxsum
.
SetSize
(
6
,
vismtx
.
NCols
());
}
if
(
I
==
0
)
{
// start filling a new DataTable row
dt
.
NextRowPtr
(
rowp
);
rowp
(
0
)
=
(
int_4
)
cnt
;
rowp
(
1
)
=
(
int_4
)(
dateobs
.
DaysPart
()
-
dateorg
.
DaysPart
());
rowp
(
2
)
=
(
r_4
)
dateobs
.
SecondsPart
();
dateobs
=
cfdate
;
if
(
prtlev
>
0
)
cout
<<
"visi2dtacx/Info: dateobs="
<<
dateobs
<<
" SecondsPart()="
<<
dateobs
.
SecondsPart
()
<<
endl
;
for
(
int
k
=
0
;
k
<
32
;
k
++
)
acdt
[
k
]
=
0.
;
...
...
@@ -262,6 +259,10 @@ int main(int narg, char* arg[])
for
(
int
k
=
0
;
k
<
8
;
k
++
)
acdt
[
k
+
16
]
*=
fnorm
;
for
(
int
k
=
0
;
k
<
6
;
k
++
)
cxdt
[
k
+
12
]
*=
complex
<
r_8
>
(
fnorm
,
0.
);
// remplissage datatable
dt
.
NextRowPtr
(
rowp
);
rowp
(
0
)
=
(
int_4
)
cnt
;
rowp
(
1
)
=
(
int_4
)(
dateobs
.
DaysPart
()
-
dateorg
.
DaysPart
());
rowp
(
2
)
=
(
r_4
)
dateobs
.
SecondsPart
();
for
(
int
k
=
0
;
k
<
32
;
k
++
)
rowp
(
3
+
k
)
=
(
float
)
acdt
[
k
];
for
(
int
k
=
0
;
k
<
18
;
k
++
)
rowp
(
35
+
k
)
=
complex
<
float
>
((
float
)
cxdt
[
k
].
real
(),
(
float
)
cxdt
[
k
].
imag
());
// ... done
...
...
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