source: trunk/include/rdpickcoda.h @ 5054

Revision 1469, 3.3 KB checked in by dietz, 14 years ago (diff)

moved from pkfilter's source dir

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/*
2 *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE
3 *   CHECKED IT OUT USING THE COMMAND CHECKOUT.
4 *
5 *    $Id$
6 *
7 *    Revision history:
8 *     $Log$
9 *     Revision 1.1  2004/05/14 17:57:01  dietz
10 *     moved from pkfilter's source dir
11 *
12 *     Revision 1.2  2004/04/29 22:01:07  dietz
13 *     added capability to process TYPE_PICK_SCNL and TYPE_CODA_SCNL msgs
14 *
15 *     Revision 1.1  2004/04/22 18:01:56  dietz
16 *     Moved pkfilter source from Contrib/Menlo to the earthworm orthodoxy
17 *
18 *
19 *
20 */
21
22/* rdpickcoda.h
23 *
24 * Header file for the functions in rdpickcoda.c that convert
25 * from TYPE_PICK2K, TYPE_PICK_SCNL, TYPE_CODA2K, TYPE_CODA_SCNL
26 * messages to structures.
27 *
28 * written by Lynn Dietz   January, 2002
29 */
30
31#ifndef RDPICKCODA_H
32#define RDPICKCODA_H
33
34#include <trace_buf.h>
35
36/* Structure to contain data from a TYPE_PICK2K or TYPE_PICK_SCNL
37   In the comments below, NTS = Null Terminated String
38 ****************************************************************/
39typedef struct _EWPICK {
40   unsigned char msgtype;        /* one-byte number message type         */
41   unsigned char modid;          /* one-byte number module id            */
42   unsigned char instid;         /* one-byte number installation id      */
43   int    seq;                   /* sequence number                      */
44   char   site[TRACE2_STA_LEN];  /* NTS: Site code as per IRIS SEED      */
45   char   net[TRACE2_NET_LEN];   /* NTS: Network code as per IRIS SEED   */
46   char   comp[TRACE2_CHAN_LEN]; /* NTS: Component code as per IRIS SEED */
47   char   loc[TRACE2_LOC_LEN];   /* NTS: location code as per IRIS SEED  */
48                                 /*      set to "--" for TYPE_PICK2K     */
49   char   fm;                    /* first-motion descriptor (U,D,' ','?')*/
50   char   wt;                    /* pick weight or quality (0-4)         */
51   double tpick;                 /* time of pick - seconds since 1970    */
52   long   pamp[3];               /* P amplitudes in digital counts       */
53} EWPICK;
54
55/* Structure to contain data from a TYPE_CODA2K or TYPE_CODA_SCNL
56   In the comments below, NTS = Null Terminated String
57 ****************************************************************/
58typedef struct _EWCODA {
59   unsigned char msgtype;        /* one-byte number message type         */
60   unsigned char modid;          /* one-byte number module id            */
61   unsigned char instid;         /* one-byte number installation id      */
62   int    seq;                   /* sequence number                      */
63   char   site[TRACE2_STA_LEN];  /* NTS: Site code as per IRIS SEED      */
64   char   net[TRACE2_NET_LEN];   /* NTS: Network code as per IRIS SEED   */
65   char   comp[TRACE2_CHAN_LEN]; /* NTS: Component code as per IRIS SEED */
66   char   loc[TRACE2_LOC_LEN];   /* NTS: location code as per IRIS SEED  */
67                                 /*      set to "--" for TYPE_CODA2K     */
68   long   caav[6];               /* coda avg abs value (counts) 2s window*/
69   int    dur;                   /* coda duration (seconds since pick)   */
70} EWCODA;
71
72
73/* Function Prototypes
74 *********************/
75int  rd_pick2k( char *msg, int msglen, EWPICK *pk );
76int  rd_coda2k( char *msg, int msglen, EWCODA *cd );
77int  rd_pick_scnl( char *msg, int msglen, EWPICK *pk );
78int  rd_coda_scnl( char *msg, int msglen, EWCODA *cd );
79
80#endif
Note: See TracBrowser for help on using the repository browser.