#include <stdio.h>#include <ctype.h>#include <stdlib.h>#include <unistd.h>#include <time.h>#include <string.h>#include <assert.h>#include <sys/types.h>#include "common.h"
Go to the source code of this file.
Defines | |
| #define | IREAL 0 |
| #define | ITIME 1 |
| #define | IRLIM 2 |
| #define | IAMPH 3 |
| #define | IXY 4 |
| #define | IUNKN 5 |
| #define | IDISP 6 |
| #define | IVEL 7 |
| #define | IACC 8 |
| #define | IB 9 |
| #define | IDAY 10 |
| #define | IO 11 |
| #define | IA 12 |
| #define | IT0 13 |
| #define | IT1 14 |
| #define | IT2 15 |
| #define | IT3 16 |
| #define | IT4 17 |
| #define | IT5 18 |
| #define | IT6 19 |
| #define | IT7 20 |
| #define | IT8 21 |
| #define | IT9 22 |
| #define | IRADNV 23 |
| #define | ITANNV 24 |
| #define | IRADEV 25 |
| #define | ITANEV 26 |
| #define | INORTH 27 |
| #define | IEAST 28 |
| #define | IHORZA 29 |
| #define | IDOWN 30 |
| #define | IUP 31 |
| #define | ILLLBB 32 |
| #define | IWWSN1 33 |
| #define | IWWSN2 34 |
| #define | IHGLP 35 |
| #define | ISRO 36 |
| #define | INUCL 37 |
| #define | IPREN 38 |
| #define | IPOSTN 39 |
| #define | IQUAKE 40 |
| #define | IPREQ 41 |
| #define | IPOSTQ 42 |
| #define | ICHEM 43 |
| #define | IOTHER 44 |
| #define | IGOOD 45 |
| #define | IGLCH 46 |
| #define | IDROP 47 |
| #define | ILOWSN 48 |
| #define | IRLDTA 49 |
| #define | IVOLTS 50 |
| #define | INIV51 51 |
| #define | INIV52 52 |
| #define | INIV53 53 |
| #define | INIV54 54 |
| #define | INIV55 55 |
| #define | INIV56 56 |
| #define | INIV57 57 |
| #define | INIV58 58 |
| #define | INIV59 59 |
| #define | INIV60 60 |
Functions | |
| double | sac2unix (struct sac *sac0) |
| void | unix2sac (struct sac *sac0, double temps) |
| int32_t | defsack (char *field) |
| FILE * | OpenSacChannel (int channel) |
| open a sac file for output | |
| void | CloseSacFile (int channel) |
| end a SAC channel file The sac header is updated according to the previous information structure | |
| void | AbortSacFile (int channel) |
| cancel a SAC channel file | |
| void | AddSacData (int channel) |
| process one channel | |
| void | SetSource (float lat, float lon, float dep, double OT) |
| set the source location | |
Variables | |
| struct sac | sacHeader [MAX_CHANNEL] |
| FILE * | sacChannelFile [MAX_CHANNEL] |
| char | sacChannelFileName [MAX_CHANNEL][128] |
| #define IB 9 |
| #define ITIME 1 |
| #define IUNKN 5 |
| void AbortSacFile | ( | int | channel | ) |
cancel a SAC channel file
| channel | the channel to cancel |
Definition at line 328 of file sac.c.
References PrintDebug, sacChannelFile, and sacChannelFileName.
Referenced by AddSacData().
| void AddSacData | ( | int | channel | ) |
process one channel
| channel | the channel to process |
Definition at line 341 of file sac.c.
References AbortSacFile(), currentFile, currentTime, HWConfigType::data, HWConfig, infoHeader, noWrite, InfoHeaderType::npts, Titan2SRType::npts, OpenSacChannel(), PrintError, PrintLog, privateDebug, sacChannelFile, sacChannelFileName, sacHeader, HWConfigType::srExp, HWConfigType::srObs, StrTime(), test0, and titan2File.
Referenced by EndSuperFrame().
| void CloseSacFile | ( | int | channel | ) |
end a SAC channel file The sac header is updated according to the previous information structure
| channel | the channel to close |
Definition at line 273 of file sac.c.
References HWConfigType::avgPos, Titan2SRType::base, InfoHeaderType::correctedTime, PositionType::elev, FileName(), fileNameOptions, infoHeader, PositionType::lat, PositionType::lon, noWrite, oldHWConfig, PrintLog, Rename(), sacChannelFile, sacChannelFileName, sacHeader, InfoHeaderType::sr, station, unix2sac(), and UpdateInfoHeader().
Referenced by FlushDataFiles().
| FILE* OpenSacChannel | ( | int | channel | ) |
open a sac file for output
| channel | the channel number |
Definition at line 233 of file sac.c.
References Titan2SRType::base, Titan2SRType::div, FILE_BUFFER_SIZE, HWConfig, IB, InitInfoHeader(), ITIME, OpenTempFile(), PrintError, sacChannelFile, sacChannelFileName, sacHeader, and HWConfigType::srExp.
Referenced by AddSacData().
| double sac2unix | ( | struct sac * | sac0 | ) |
| void SetSource | ( | float | lat, | |
| float | lon, | |||
| float | dep, | |||
| double | OT | |||
| ) |
| void unix2sac | ( | struct sac * | sac0, | |
| double | temps | |||
| ) |
| FILE* sacChannelFile[MAX_CHANNEL] |
Initial value:
{
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
}
Definition at line 68 of file sac.c.
Referenced by AbortSacFile(), AddSacData(), CloseSacFile(), and OpenSacChannel().
| char sacChannelFileName[MAX_CHANNEL][128] |
Definition at line 75 of file sac.c.
Referenced by AbortSacFile(), AddSacData(), CloseSacFile(), and OpenSacChannel().
| struct sac sacHeader[MAX_CHANNEL] |
Definition at line 67 of file sac.c.
Referenced by AddSacData(), CloseSacFile(), and OpenSacChannel().
1.5.6