Commit b00ba6b6 authored by thomas.forbriger's avatar thomas.forbriger

libfapidxx [FEATURE]: support negative time shift

parent adac33f5
......@@ -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__
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment