#include <stdlib.h>#include <stdio.h>#include <time.h>#include <ctype.h>#include <math.h>#include <errno.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <assert.h>#include <fcntl.h>#include <dirent.h>#include "common.h"
Go to the source code of this file.
Defines | |
| #define | DTMAX1 5.e-3 |
| #define | DTMAX2 5.e-6 |
| #define | ONE 1 |
Functions | |
| void | ResetTimes (void) |
| reset all the time variables | |
| int | InWindow (void) |
| test if we are within a segment: tricky | |
| int | DtFileSelect (const struct dirent *t) |
| filter for *station.dft *station.flt and *station.dt | |
| int | ReadDtLine (char *line, double *T, double *dt, char *fn) |
| read a dt/dft/flt line | |
| int | TimeFileSort (const void *a, const void *b) |
| comparison of time file names. | |
| void | FillDtCache (char *fileName) |
| read a dt file and fill the internal cache with the data | |
| int | GetInterpolatedShift (double t, double *ts, int *age, char *station, char *file) |
| scan a dt file and compute the interpolated shift | |
| double | GetExtraTcorr (struct InfoHeaderType *ih) |
| double | GetFrameSkip (double starttime, char *station) |
| double | ADCDelay (struct DigitizerType *digitizer, int ch) |
| return the static delay time for the given ADC (digitizer) | |
| double | Titan1FilterDelayTime (int ch) |
| compute the filter delay time for titan1 | |
| double | FixBuggyMykerinos (struct DigitizerType *d, double f) |
| return the Mykerinos bug fix | |
| void | SetBuggyMykerinos (int yes) |
| set the buggy mykerinos flag | |
| double | FilterDelayTime (struct DigitizerType *digitizer, struct Titan2SRType *sr, int ch) |
| return the delay time for a given frequency | |
| unsigned int | FilterChain (struct DigitizerType *digitizer, struct Titan2SRType *sr, int ch) |
| return the delay time for a given frequency | |
| int | CorrectTime (double t, struct InfoHeaderType *header) |
| Fetch the time correction for the given time. | |
| double | GetApproximatedShift (void) |
| get the current time shift (interpolated) | |
| double | CorrectChannelStartTime (int ch) |
| compute the corrected time starting from the uncorrected time this function is not Titan1-compatible | |
| int | PrimaryChannel (int channel) |
| double | DiffTimeT2T1 (struct Titan2TimeType *t1, struct Titan2TimeType *t2, struct Titan2TimeType *td) |
| Compute a time difference t2-t1, return the result as a double If td is null, the paramer is simply ignored. | |
| double | TimeAdd (struct Titan2TimeType *t1, struct Titan2TimeType *t2, struct Titan2TimeType *ts) |
| Compute a time sum t1+t2, return the result as a double If ts is null, the paramer is simply ignored. | |
| void | MakeDtFileName (struct Titan2TimeType *tt, char *infn, int len, char *sta) |
| create a new dt file name The file name is created based on the pattern YYYY.MM.DD-hh.mm.ss.station.dt | |
| void | CloseTimeFile (char *sta) |
| close any open time file | |
| FILE * | OpenTimeFile (struct Titan2TimeType *it) |
| open a new dt file If the the file is closed, open a new one | |
| void | TimeFrameCallBack (struct Titan2TimeType *it, struct Titan2TimeType *et) |
| After each complete time frame, this function is called to update the cache file and the dt file. | |
| void | RoundTime (struct Titan2TimeType *t, struct Titan2TimeType *r) |
| round the time to the closest minute | |
| unsigned char | ProcessTimeFrame (const unsigned char *frame) |
| Identify and process the frame Both GPS and TIME frames are processed here. | |
| int | InitInfoHeader (int ch) |
| initialize the channel information header Here the information data are read from HWConfig since it the function opens a new data segment. | |
| double | UpdateInfoHeader (int ch) |
| update the channel information header This function fetches the information data in oldHWConfig since it is called to close a data segment. | |
| char * | FileName (const char *inpre, const char *post, int ch, int option) |
| generate a file name based on the header information, prefix and postfix | |
Variables | |
| int | fileNameOptions = ADD_CHANNEL_CODE |
| char * | auxChannelName [] |
| char * | auxChannelUnit [] |
| int | buggyMykerinos = 0 |
| int | warnFixBuggyMykerinos = 0 |
| char | dayDirPrefix [255] |
| int | timeWarningNow = 0 |
| struct InfoHeaderType | infoHeader [MAX_CHANNEL] |
| struct Titan2TimeType | lastExtTime = { 0, 0 } |
| struct Titan2TimeType | lastIntTime = { 0, 0 } |
| struct Titan2TimeType | roundedTime = { 0, 0 } |
| int | knownUSecond = 0 |
| int | knownSecond = 0 |
| int | knownExtGps = 0 |
| int | knownTime = 0 |
| FILE * | dtFile = NULL |
| char | dtFileName [255] |
| struct Titan2TimeType | dtFileTime = { 0, 0 } |
| int | dtUseLine |
| double | lastDt = 1.e16 |
| used to detect time jumps in the dt files | |
| int | nCached = 0 |
| double * | dtCached = NULL |
| number of data in the cache | |
| double * | TCached = NULL |
| char | dtCachedFile [255] |
| char | testForStation [128] |
| int | emptyDir = 0 |
| time_t | lastShiftComputation = 0 |
| the lastShift* are approximated shifts derived from the drift file (interpolation) or from the last pulse. | |
| double | lastShiftComputed = 0.0 |
| #define DTMAX1 5.e-3 |
| #define DTMAX2 5.e-6 |
| #define ONE 1 |
Referenced by FilterDelayTime().
| double ADCDelay | ( | struct DigitizerType * | digitizer, | |
| int | ch | |||
| ) |
return the static delay time for the given ADC (digitizer)
| digitizer | the digitizer | |
| ch | the channel number used for titan1 only |
Definition at line 648 of file time.c.
References DigitizerType::adcDelay, DigitizerType::adcFrequency, Titan2SRType::base, Titan2SRType::div, infoHeader, MAX_OSIRIS_CHANNEL, DigitizerType::ok, PrimaryChannel(), and InfoHeaderType::sr.
Referenced by AddMSeedData(), and CorrectChannelStartTime().
| void CloseTimeFile | ( | char * | sta | ) |
close any open time file
| sta | the station name |
Definition at line 1140 of file time.c.
References dtFile, dtFileName, DTMAX1, DTMAX2, dtUseLine, HWConfig, MakeDtFileName(), PulseFilter(), pulseFilter, HWConfigType::rebootTime, Rename(), HWConfigType::resetTime, and Titan2TimeType::usecond.
Referenced by FlushNonDataFiles(), and TimeFrameCallBack().
| double CorrectChannelStartTime | ( | int | ch | ) |
compute the corrected time starting from the uncorrected time this function is not Titan1-compatible
| ch | the channel |
Definition at line 1012 of file time.c.
References ADCDelay(), InfoHeaderType::correctedTime, InfoHeaderType::correctionMethod, CorrectTime(), HWConfigType::digitizer, FilterDelayTime(), infoHeader, MAX_OSIRIS_CHANNEL, noTimeCorrection, oldHWConfig, InfoHeaderType::sr, InfoHeaderType::tadc, InfoHeaderType::tfilter, InfoHeaderType::tshift, InfoHeaderType::uncorrected, US2S, and Titan2TimeType::usecond.
Referenced by UpdateInfoHeader().
| int CorrectTime | ( | double | t, | |
| struct InfoHeaderType * | header | |||
| ) |
Fetch the time correction for the given time.
| t | the time of the correction | |
| header | the header to update |
Definition at line 893 of file time.c.
References AUTO_CORRECTION, InfoHeaderType::correctionMethod, DiffTimeT2T1(), InfoHeaderType::driftFile, InfoHeaderType::external, extractingData, GetInterpolatedShift(), INTERPOLATION_CORRECTION, LAST_PULSE_CORRECTION, NO_TIME_CORRECTION, InfoHeaderType::otshift, PrintWarning, InfoHeaderType::pulse, InfoHeaderType::pulseAge, pulseTime, InfoHeaderType::station, timeWarning, timeWarningNow, InfoHeaderType::tshift, and Titan2TimeType::usecond.
Referenced by CorrectChannelStartTime(), and GetApproximatedShift().
| double DiffTimeT2T1 | ( | struct Titan2TimeType * | t1, | |
| struct Titan2TimeType * | t2, | |||
| struct Titan2TimeType * | td | |||
| ) |
Compute a time difference t2-t1, return the result as a double If td is null, the paramer is simply ignored.
No check is performed on t1 and t2.
| t1 | first time | |
| t2 | second time | |
| td | difference t2-t1 |
Definition at line 1069 of file time.c.
References US2S, and Titan2TimeType::usecond.
Referenced by CheckContinuity(), CorrectTime(), and TimeFrameCallBack().
| int DtFileSelect | ( | const struct dirent * | t | ) |
filter for *station.dft *station.flt and *station.dt
Definition at line 166 of file time.c.
References testForStation.
Referenced by GetInterpolatedShift().
| char* FileName | ( | const char * | inpre, | |
| const char * | post, | |||
| int | ch, | |||
| int | option | |||
| ) |
generate a file name based on the header information, prefix and postfix
| pre | the prefix (path/) | |
| post | postfix (.SAC, .ASC ...) | |
| ch | channel number to build the filename for | |
| option | various undocumented options... |
Definition at line 1873 of file time.c.
References ADD_CHANNEL_CODE, ADD_LOCATION_CODE, ADD_NETWORK_CODE, auxChannelName, InfoHeaderType::beginWindow, beginWindow, InfoHeaderType::channel, channelNameNumber, InfoHeaderType::correctedTime, dayDirPrefix, EDU_FILE_NAME, forceName, forceNameOptions, HWConfigType::formatVersion, infoHeader, MAX_CHANNEL, MAX_OSIRIS_CHANNEL, oldHWConfig, overWrite, preEvent, prependdaydir, PrintWarning, station, and time2name().
Referenced by CloseAscFile(), CloseBinFile(), CloseMSeedInt32File(), CloseMSeedSteim1File(), CloseSacFile(), CloseSeg2File(), CloseSegyFile(), CloseSisFile(), CloseTitFile(), CloseWavFile(), OpenFullSeg2(), and UpdateInfoHeader().
| void FillDtCache | ( | char * | fileName | ) |
read a dt file and fill the internal cache with the data
| fileName | the filename |
Definition at line 268 of file time.c.
References dtCached, dtCachedFile, nCached, PrintError, PrintLog, ReadDtLine(), and TCached.
Referenced by GetInterpolatedShift().
| unsigned int FilterChain | ( | struct DigitizerType * | digitizer, | |
| struct Titan2SRType * | sr, | |||
| int | ch | |||
| ) |
return the delay time for a given frequency
| digitizer | the digitizer | |
| sr | the sampling rate | |
| ch | channel |
Definition at line 831 of file time.c.
References DigitizerType::adcDecimation, DigitizerType::adcDecimationLength, DigitizerType::adcFrequency, and Titan2SRType::npts.
Referenced by UpdateInfoHeader().
| double FilterDelayTime | ( | struct DigitizerType * | digitizer, | |
| struct Titan2SRType * | sr, | |||
| int | ch | |||
| ) |
return the delay time for a given frequency
| digitizer | the digitizer | |
| sr | the sampling rate | |
| ch | channel |
Definition at line 759 of file time.c.
References DigitizerType::adcDecimation, DigitizerType::adcDecimationLength, DigitizerType::adcFrequency, FixBuggyMykerinos(), MAX_OSIRIS_CHANNEL, Titan2SRType::npts, ONE, PrintError, DigitizerType::secondDecimationLength, timeWarning, timeWarningNow, and Titan1FilterDelayTime().
Referenced by AddMSeedData(), and CorrectChannelStartTime().
| double FixBuggyMykerinos | ( | struct DigitizerType * | d, | |
| double | f | |||
| ) |
return the Mykerinos bug fix
| d | the digitizer | |
| f | the head sampling rate |
Definition at line 717 of file time.c.
References DigitizerType::adcDecimationLength, buggyMykerinos, HWConfigType::formatMajor, HWConfigType::formatMinor, HWConfigType::formatVersion, HWConfig, PrintWarning, and warnFixBuggyMykerinos.
Referenced by FilterDelayTime().
| double GetApproximatedShift | ( | void | ) |
get the current time shift (interpolated)
Definition at line 974 of file time.c.
References AUTO_CORRECTION, InfoHeaderType::correctionMethod, CorrectTime(), currentTime, InfoHeaderType::external, HWConfigType::fieldIdent, HWConfig, LAST_PULSE_CORRECTION, lastShiftComputation, lastShiftComputed, InfoHeaderType::pulse, pulseTime, saveShift, InfoHeaderType::station, InfoHeaderType::tshift, and Titan2TimeType::usecond.
Referenced by ProcessTimeFrame().
| double GetExtraTcorr | ( | struct InfoHeaderType * | ih | ) |
Definition at line 533 of file time.c.
References InfoHeaderType::driftFile, InfoHeaderType::extraTcorrUsed, InfoHeaderType::station, TDB_PATH_TC, and TDBPath().
Referenced by UpdateInfoHeader().
| double GetFrameSkip | ( | double | starttime, | |
| char * | station | |||
| ) |
Definition at line 589 of file time.c.
References PrintWarning, str2time(), TDB_PATH_TC, and TDBPath().
Referenced by UpdateInfoHeader().
| int GetInterpolatedShift | ( | double | t, | |
| double * | ts, | |||
| int * | age, | |||
| char * | station, | |||
| char * | file | |||
| ) |
scan a dt file and compute the interpolated shift
| t | the time of the shift | |
| ts | the shift | |
| age | the age of the previous pulse | |
| station | the station name | |
| file | the file used to compute the delay |
Definition at line 324 of file time.c.
References __scandir(), dtCached, dtCachedFile, DtFileSelect(), emptyDir, EXTENDED_CORRECTION, FillDtCache(), INTERPOLATION_CORRECTION, nCached, NO_TIME_CORRECTION, PrintDebug, PrintError, ReadDtLine(), TCached, TDB_PATH_DFT, TDBPath(), testForStation, and TimeFileSort().
Referenced by CloseMSeedInt32File(), CloseMSeedSteim1File(), and CorrectTime().
| int InitInfoHeader | ( | int | ch | ) |
initialize the channel information header Here the information data are read from HWConfig since it the function opens a new data segment.
| ch | the channel to initialize |
Definition at line 1507 of file time.c.
References AUTO_CORRECTION, Titan2SRType::base, beginWindow, InfoHeaderType::beginWindow, InfoHeaderType::ch, InfoHeaderType::correctionMethod, currentTime, Titan2SRType::div, extractTit, HWConfig, infoHeader, Titan2SRType::npts, PrimaryChannel(), PrintDebug, PrintError, PrintLog, InfoHeaderType::pulse, InfoHeaderType::pulseAge, pulseTime, InfoHeaderType::sr, HWConfigType::srExp, HWConfigType::srObs, InfoHeaderType::uncorrected, and Titan2TimeType::usecond.
Referenced by OpenAscChannel(), OpenBinChannel(), OpenMSeedChannel(), OpenSacChannel(), OpenSeg2Channel(), OpenSegyChannel(), OpenSisBinFile(), OpenTitBinFile(), and OpenWavChannel().
| int InWindow | ( | void | ) |
test if we are within a segment: tricky
Definition at line 131 of file time.c.
References beginWindow, correctedTime, currentTag, currentTime, endWindow, extractTit, onlyTag, skipTime, and Titan2TimeType::usecond.
Referenced by EndSuperFrame().
| void MakeDtFileName | ( | struct Titan2TimeType * | tt, | |
| char * | infn, | |||
| int | len, | |||
| char * | sta | |||
| ) |
create a new dt file name The file name is created based on the pattern YYYY.MM.DD-hh.mm.ss.station.dt
| fn | the output buffer | |
| tt | titan time to start from | |
| len | the length of the buffer | |
| sta | the station name |
Definition at line 1103 of file time.c.
References overWrite, TDB_PATH_DT, TDBPath(), and Titan2TimeType::usecond.
Referenced by CloseTimeFile().
| FILE* OpenTimeFile | ( | struct Titan2TimeType * | it | ) |
open a new dt file If the the file is closed, open a new one
| it | the reference time |
Definition at line 1181 of file time.c.
References dtFile, dtFileName, dtUseLine, FILE_BUFFER_SIZE, OpenTempFile(), PrintDebug, and PrintError.
Referenced by TimeFrameCallBack().
| int PrimaryChannel | ( | int | channel | ) |
Definition at line 1050 of file time.c.
Referenced by ADCDelay(), AddMSeedDataInt32(), AddMSeedDataSteim1(), and InitInfoHeader().
| unsigned char ProcessTimeFrame | ( | const unsigned char * | frame | ) |
Identify and process the frame Both GPS and TIME frames are processed here.
The titan2 format sends GPST_FRAME, then TIME_FRAME with b20=1 and finally TIME_FRAME with b20=0.
| frame | the frame to be analysed and processed |
Definition at line 1353 of file time.c.
References Titan2SRType::base, beginWindow, CacheCallBack(), CachePrintCST(), ChangeStreamConfig(), CheckDiffConfig(), correctedTime, currentTime, EndSuperFrame(), endWindow, FlushDataFiles(), FlushNonDataFiles(), HWConfigType::formatVersion, frame2i24, frame2i24_64, frame2i32_64, GetApproximatedShift(), globalStationChange, gpsExtTime, gpsIntTime, GPST_FRAME, HWConfig, knownExtGps, knownSecond, knownTime, knownUSecond, MAX_CHANNEL, PrintDebug, PrintError, pulseTime, ResetTimes(), RoundTime(), SeekTime(), skipTime, HWConfigType::srExp, HWConfigType::srObs, TIME_FRAME, TimeFrameCallBack(), and Titan2TimeType::usecond.
| int ReadDtLine | ( | char * | line, | |
| double * | T, | |||
| double * | dt, | |||
| char * | fn | |||
| ) |
read a dt/dft/flt line
| line | the line to analyse | |
| T | the time read | |
| dt | the time shift read | |
| fn | the file name (for error printing) |
Definition at line 209 of file time.c.
References PrintError, and str2time().
Referenced by FillDtCache(), and GetInterpolatedShift().
| void ResetTimes | ( | void | ) |
reset all the time variables
Definition at line 103 of file time.c.
References correctedTime, currentTime, HWConfigType::digitizer, dtCached, emptyDir, gpsExtTime, gpsIntTime, HWConfig, knownExtGps, knownSecond, knownTime, knownUSecond, lastShiftComputation, lastShiftComputed, nCached, pulseTime, and TCached.
Referenced by EndSuperFrame(), ProcessTimeFrame(), and ResetInput().
| void RoundTime | ( | struct Titan2TimeType * | t, | |
| struct Titan2TimeType * | r | |||
| ) |
round the time to the closest minute
| t | input time | |
| r | rounded time |
Definition at line 1335 of file time.c.
References Titan2TimeType::usecond.
Referenced by ProcessTimeFrame().
| void SetBuggyMykerinos | ( | int | yes | ) |
set the buggy mykerinos flag
| yes | set (1) or unset (0) |
Definition at line 749 of file time.c.
References buggyMykerinos.
Referenced by CheckVersion().
| double TimeAdd | ( | struct Titan2TimeType * | t1, | |
| struct Titan2TimeType * | t2, | |||
| struct Titan2TimeType * | ts | |||
| ) |
Compute a time sum t1+t2, return the result as a double If ts is null, the paramer is simply ignored.
No check is performed on t1 and t2.
| t1 | first time | |
| t2 | second time | |
| ts | sum t1+t2 |
Definition at line 1091 of file time.c.
References US2S, and Titan2TimeType::usecond.
| int TimeFileSort | ( | const void * | a, | |
| const void * | b | |||
| ) |
comparison of time file names.
first dft<flt<dt, use __alphasort if the extension is the same
| a | entry 1 | |
| b | entry 2 |
Definition at line 228 of file time.c.
References __alphasort().
Referenced by GetInterpolatedShift().
| void TimeFrameCallBack | ( | struct Titan2TimeType * | it, | |
| struct Titan2TimeType * | et | |||
| ) |
After each complete time frame, this function is called to update the cache file and the dt file.
| it | internal time | |
| et | external time |
Definition at line 1215 of file time.c.
References CloseTimeFile(), cutDtOnReset, DiffTimeT2T1(), HWConfigType::drift, HWConfigType::driftTime, dtFile, dtUseLine, HWConfigType::fieldIdent, HWConfig, lastDt, oldHWConfig, OpenTimeFile(), PrintDebug, HWConfigType::rebootTime, HWConfigType::resetTime, saveShift, StrTime(), StrTimeNS(), and Titan2TimeType::usecond.
Referenced by ProcessTimeFrame().
| double Titan1FilterDelayTime | ( | int | ch | ) |
compute the filter delay time for titan1
| ch | the channel |
Definition at line 680 of file time.c.
References Titan2SRType::base, Titan2SRType::div, MAX_OSIRIS_CHANNEL, oldHWConfig, and HWConfigType::srExp.
Referenced by FilterDelayTime().
| double UpdateInfoHeader | ( | int | ch | ) |
update the channel information header This function fetches the information data in oldHWConfig since it is called to close a data segment.
| ch | the channel to correct |
Definition at line 1584 of file time.c.
References auxChannelName, auxChannelUnit, InfoHeaderType::beginWindow, beginWindow, InfoHeaderType::channel, HWConfigType::channelName, CorrectChannelStartTime(), correctedTime, InfoHeaderType::correctedTime, HWConfigType::digitizer, Titan2SRType::div, HWConfigType::drift, HWConfigType::driftTime, EmergencyExit(), extractTit, InfoHeaderType::extraTcorr, HWConfigType::fieldIdent, FileName(), fileNameOptions, FilterChain(), HWConfigType::formatMajor, HWConfigType::formatMinor, HWConfigType::formatVersion, HWConfigType::gain, GetExtraTcorr(), GetFrameSkip(), HWConfig, HWConfigType::impedance, infoHeader, InfoHeaderType::location, HWConfigType::locationName, HWConfigType::LSB, MAJOR, MAX_OSIRIS_CHANNEL, MINOR, InfoHeaderType::network, HWConfigType::networkName, noInfo, noTimeCorrection, oldHWConfig, PrintError, PROGRAMNAME, InfoHeaderType::pulse, HWConfigType::rebootTime, HWConfigType::resetTime, HWConfigType::selectedGain, HWConfigType::serialNumber, HWConfigType::softwareRealease, InfoHeaderType::sr, InfoHeaderType::station, station, StrTime(), StrTimeNS(), TDBUpdateHeader(), time2str(), timeWarningNow, InfoHeaderType::uncorrected, US2S, Titan2TimeType::usecond, and VERSION.
Referenced by CloseAscFile(), CloseBinFile(), CloseMSeedInt32File(), CloseMSeedSteim1File(), CloseSacFile(), CloseSeg2File(), CloseSisFile(), CloseTitFile(), CloseWavFile(), and UpdateSegyHeader().
| char* auxChannelName[] |
Initial value:
{ "PwrSupply", "IntTemp", "AUX02", "AUX03", "AUX04", "AUX05", "AUX06", "AUX07", "AUX08",
"AUX09", "AUX10", "AUX11", "AUX12", "AUX13", "AUX14", "AUX15" }
Definition at line 44 of file time.c.
Referenced by CloseAscFile(), FileName(), and UpdateInfoHeader().
| char* auxChannelUnit[] |
Initial value:
{ "0.1V", "0.1°C", "count", "count", "count", "count", "count", "count",
"count", "count", "count", "count", "count", "count", "count", "count" }
Definition at line 46 of file time.c.
Referenced by CloseAscFile(), and UpdateInfoHeader().
| int buggyMykerinos = 0 |
| char dayDirPrefix[255] |
| double* dtCached = NULL |
number of data in the cache
Definition at line 74 of file time.c.
Referenced by FillDtCache(), GetInterpolatedShift(), and ResetTimes().
| char dtCachedFile[255] |
| FILE* dtFile = NULL |
Definition at line 66 of file time.c.
Referenced by CloseTimeFile(), OpenTimeFile(), and TimeFrameCallBack().
| char dtFileName[255] |
| struct Titan2TimeType dtFileTime = { 0, 0 } |
| int dtUseLine |
Definition at line 69 of file time.c.
Referenced by CloseTimeFile(), OpenTimeFile(), and TimeFrameCallBack().
| int emptyDir = 0 |
| int fileNameOptions = ADD_CHANNEL_CODE |
Definition at line 42 of file time.c.
Referenced by CloseAscFile(), CloseBinFile(), CloseMSeedInt32File(), CloseMSeedSteim1File(), CloseSacFile(), CloseSeg2File(), CloseSegyFile(), CloseSisFile(), CloseTitFile(), CloseWavFile(), OpenFullSeg2(), OpenMSeedChannel(), ParseOptions(), TDBInit(), and UpdateInfoHeader().
| struct InfoHeaderType infoHeader[MAX_CHANNEL] |
Definition at line 55 of file time.c.
Referenced by ADCDelay(), AddAscData(), AddBinData(), AddMSeedDataInt32(), AddMSeedDataSteim1(), AddSacData(), AddSeg2Data(), AddSegyData(), AddSisData(), AddWavData(), AppendChannelToSeg2File(), CloseAscFile(), CloseBinFile(), CloseMSeedInt32File(), CloseMSeedSteim1File(), CloseSacFile(), CloseSegyFile(), CloseSisFile(), CloseTitFile(), CloseWavFile(), CorrectChannelStartTime(), EndSuperFrame(), FileName(), InitInfoHeader(), InitSegyHeader(), OpenSisBinFile(), OpenTitBinFile(), UpdateInfoHeader(), UpdateSegyHeader(), WriteFileDescriptorBlock(), and WriteTraceDescriptorBlock().
| int knownExtGps = 0 |
| int knownSecond = 0 |
| int knownTime = 0 |
| int knownUSecond = 0 |
| double lastDt = 1.e16 |
used to detect time jumps in the dt files
Definition at line 71 of file time.c.
Referenced by TimeFrameCallBack().
| struct Titan2TimeType lastExtTime = { 0, 0 } |
| struct Titan2TimeType lastIntTime = { 0, 0 } |
| time_t lastShiftComputation = 0 |
the lastShift* are approximated shifts derived from the drift file (interpolation) or from the last pulse.
They are "approximated" because we do not recompute (and re-interpolate) the value each time it is needed since only the integer part of the time is needed (not the microsecond.
Definition at line 87 of file time.c.
Referenced by GetApproximatedShift(), and ResetTimes().
| double lastShiftComputed = 0.0 |
| int nCached = 0 |
Definition at line 73 of file time.c.
Referenced by FillDtCache(), GetInterpolatedShift(), and ResetTimes().
| struct Titan2TimeType roundedTime = { 0, 0 } |
| double* TCached = NULL |
Definition at line 75 of file time.c.
Referenced by FillDtCache(), GetInterpolatedShift(), and ResetTimes().
| char testForStation[128] |
| int timeWarningNow = 0 |
Definition at line 53 of file time.c.
Referenced by CorrectTime(), FilterDelayTime(), and UpdateInfoHeader().
| int warnFixBuggyMykerinos = 0 |
1.5.6