Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
b00ba6b6
Commit
b00ba6b6
authored
Dec 11, 2019
by
thomas.forbriger
Browse files
libfapidxx [FEATURE]: support negative time shift
parent
adac33f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/libfapidxx/fapid_sff_modwid2shift.cc
View file @
b00ba6b6
...
...
@@ -28,11 +28,12 @@
*
* REVISIONS and CHANGES
* - 04/07/2014 V1.0 Thomas Forbriger
* - 11/12/2019 V1.1 support negative time shift
*
* ============================================================================
*/
#define TF_FAPID_SFF_MODWID2SHIFT_CC_VERSION \
"TF_FAPID_SFF_MODWID2SHIFT_CC V1.
0
"
"TF_FAPID_SFF_MODWID2SHIFT_CC V1.
1
"
#define TF_FAPID_SFF_MODWID2SHIFT_CC_CVSID \
"$Id: $"
...
...
@@ -65,7 +66,11 @@ int sff_modwid2shift__(char *wid2line, real *tmin, real *
{
fapidxx
::
WID2container
wid2c
(
wid2line
,
wid2line_len
);
libtime
::
TAbsoluteTime
date
(
wid2c
.
wid2
.
date
);
wid2c
.
wid2
.
date
+=
libtime
::
double2time
(
double
(
*
tsec
)
+
60.
*
double
(
*
tmin
));
double
tshift
=
double
(
*
tsec
)
+
60.
*
double
(
*
tmin
);
if
(
tshift
<
0.
)
{
wid2c
.
wid2
.
date
-=
libtime
::
double2time
(
-
tshift
);
}
else
{
wid2c
.
wid2
.
date
+=
libtime
::
double2time
(
tshift
);
}
wid2c
.
encode
(
wid2line
,
wid2line_len
);
return
0
;
}
// int sff_modwid2shift__
...
...
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