Main Page Class Hierarchy Compound List File List Compound Members File Members

# parse_usnsn.h File Reference

`#include <earthworm_defs.h>`

Go to the source code of this file.

## Compounds
struct | _ErrorElipse
struct | _NSNMsgStruct
struct | _OriginMag
struct | _PhaseMag
struct | _PhaseStruct
## Defines
#define | DATE_BASE 5
#define | DEPTH_BASE 25
#define | EVENT_KEY_BASE 52
#define | PRELIM_BASE 61
#define | ELLIPSE_BASE 22
#define | ELLIPSE_LENGTH 53
#define | EARTH_CIRCUM 40000.0
#define | MAG_LEN 5
#define | DATUM_LEN 3
#define | MB_BASE 5
#define | MB_DATUM 11
#define | ML_BASE 21
#define | ML_DATUM 27
#define | MBLG_BASE 39
#define | MBLG_DATUM 45
#define | MD_BASE 55
#define | MD_DATUM 61
#define | MS_BASE 71
#define | MS_DATUM 77
#define | STA_BASE 1
#define | STA_LEN 5
#define | PHA_BASE 6
#define | PHA_LEN 8
#define | OT_BASE 14
#define | OT_LEN 11
#define | RES_BASE 25
#define | RES_LEN 6
#define | RES_USED 31
#define | DIST_BASE 32
#define | DIST_LEN 6
#define | AZM_BASE 39
#define | AZM_LEN 3
#define | MAG1_BASE 43
#define | MAG1_LEN 15
#define | MAG1_USED 58
#define | MAG2_BASE 60
#define | MAG2_LEN 15
#define | MAG2_USED 75
#define | RETURN_DELETE -100
#define | RETURN_BAD_SCN -3
#define | RETURN_SUCCESS 0
#define | RETURN_FAILURE -1
#define | MAX_MAGS 5
## Typedefs
typedef _PhaseMag | PhaseMag
typedef _PhaseStruct | Phase
typedef _OriginMag | OriginMag
typedef _ErrorElipse | Err_Elipse
typedef _NSNMsgStruct | NSNStruct
## Functions
int | ParseNSNMsg (char *NsnMsg, int msgLen, NSNStruct *msgStruct, int debug, char *debug_dir)

## Define Documentation

#define AZM_BASE 39

| Definition at line 75 of file parse_usnsn.h.

#define AZM_LEN 3

| Definition at line 76 of file parse_usnsn.h. Referenced by ParsePhase().

#define DATE_BASE 5

| Definition at line 41 of file parse_usnsn.h.

#define DATUM_LEN 3

| Definition at line 51 of file parse_usnsn.h. Referenced by ParseMagnitude().

#define DEPTH_BASE 25

| Definition at line 42 of file parse_usnsn.h. Referenced by ParseNSNMsg().

#define DIST_BASE 32

| Definition at line 73 of file parse_usnsn.h.

#define DIST_LEN 6

| Definition at line 74 of file parse_usnsn.h. Referenced by ParsePhase().

#define EARTH_CIRCUM 40000.0

| Definition at line 47 of file parse_usnsn.h. Referenced by ParseNSNMsg(), and ParsePhase().

#define ELLIPSE_BASE 22

| Definition at line 45 of file parse_usnsn.h.

#define ELLIPSE_LENGTH 53

| Definition at line 46 of file parse_usnsn.h. Referenced by ParseEllipse(), and ParseNSNMsg().

#define EVENT_KEY_BASE 52

| Definition at line 43 of file parse_usnsn.h.

#define MAG1_BASE 43

| Definition at line 77 of file parse_usnsn.h. Referenced by ParsePhase().

#define MAG1_LEN 15

| Definition at line 78 of file parse_usnsn.h.

#define MAG1_USED 58

| Definition at line 79 of file parse_usnsn.h.

#define MAG2_BASE 60

| Definition at line 80 of file parse_usnsn.h. Referenced by ParsePhase().

#define MAG2_LEN 15

| Definition at line 81 of file parse_usnsn.h.

#define MAG2_USED 75

| Definition at line 82 of file parse_usnsn.h.

#define MAG_LEN 5

| Definition at line 50 of file parse_usnsn.h. Referenced by ParseMagnitude().

#define MAX_MAGS 5

| Definition at line 94 of file parse_usnsn.h.

#define MB_BASE 5

| Definition at line 52 of file parse_usnsn.h.

#define MB_DATUM 11

| Definition at line 53 of file parse_usnsn.h.

#define MBLG_BASE 39

| Definition at line 56 of file parse_usnsn.h.

#define MBLG_DATUM 45

| Definition at line 57 of file parse_usnsn.h.

#define MD_BASE 55

| Definition at line 58 of file parse_usnsn.h.

#define MD_DATUM 61

| Definition at line 59 of file parse_usnsn.h.

#define ML_BASE 21

| Definition at line 54 of file parse_usnsn.h.

#define ML_DATUM 27

| Definition at line 55 of file parse_usnsn.h.

#define MS_BASE 71

| Definition at line 60 of file parse_usnsn.h.

#define MS_DATUM 77

| Definition at line 61 of file parse_usnsn.h.

#define OT_BASE 14

| Definition at line 68 of file parse_usnsn.h.

#define OT_LEN 11

| Definition at line 69 of file parse_usnsn.h. Referenced by ParsePhase().

#define PHA_BASE 6

| Definition at line 66 of file parse_usnsn.h.

#define PHA_LEN 8

| Definition at line 67 of file parse_usnsn.h. Referenced by ParsePhase().

#define PRELIM_BASE 61

| Definition at line 44 of file parse_usnsn.h. Referenced by ParseNSNMsg().

#define RES_BASE 25

| Definition at line 70 of file parse_usnsn.h.

#define RES_LEN 6

| Definition at line 71 of file parse_usnsn.h. Referenced by ParsePhase().

#define RES_USED 31

| Definition at line 72 of file parse_usnsn.h. Referenced by ParsePhase().

#define RETURN_BAD_SCN -3

| Definition at line 87 of file parse_usnsn.h.

#define RETURN_DELETE -100

| Definition at line 85 of file parse_usnsn.h. Referenced by ParseNSNMsg().

#define RETURN_FAILURE -1

| Definition at line 91 of file parse_usnsn.h.

#define RETURN_SUCCESS 0

| Definition at line 90 of file parse_usnsn.h.

#define STA_BASE 1

| Definition at line 64 of file parse_usnsn.h.

#define STA_LEN 5

| Definition at line 65 of file parse_usnsn.h. Referenced by ParsePhase().

## Typedef Documentation

typedef struct _ErrorElipse Err_Elipse

typedef struct _NSNMsgStruct NSNStruct

typedef struct _OriginMag OriginMag

typedef struct _PhaseStruct Phase

| Referenced by GlEvt2EWEvent().

typedef struct _PhaseMag PhaseMag

## Function Documentation

int ParseNSNMsg | ( | char * | NsnMsg,
|  | int | msgLen,
|  | NSNStruct * | msgStruct,
|  | int | debug,
|  | char * | debug_dir
| ) |

| Definition at line 103 of file parse_usnsn.c. References AppendDateStr(), _NSNMsgStruct::automatic, _PhaseStruct::azm, BuildDateStr(), ConvertNSNMsg(), _NSNMsgStruct::depth, DEPTH_BASE, _NSNMsgStruct::depth_err, _NSNMsgStruct::depth_fixed, _PhaseStruct::dist, _NSNMsgStruct::Dmin, EARTH_CIRCUM, ELLIPSE_LENGTH, epochsec17(), _NSNMsgStruct::error, _NSNMsgStruct::EventDate, _NSNMsgStruct::EventKey, EW_FAILURE, EW_SUCCESS, GetNextLine(), _NSNMsgStruct::lat, _NSNMsgStruct::lat_err, logit(), _NSNMsgStruct::lon, _NSNMsgStruct::lon_err, _PhaseMag::mag, _PhaseStruct::mag, _OriginMag::magAvg, _PhaseMag::magLabel, _OriginMag::magLabel, _PhaseMag::MagType, _OriginMag::MagType, MAX_LINES, _PhaseStruct::motion, _NSNMsgStruct::nph_actual, _NSNMsgStruct::nph_assoc, _NSNMsgStruct::nph_used, _PhaseStruct::num_mags, _NSNMsgStruct::numMags, _OriginMag::numStas, _NSNMsgStruct::O_mag, _PhaseStruct::onset, _PhaseStruct::ot, _NSNMsgStruct::ot, _NSNMsgStruct::ot_err, ParseEllipse(), ParseMagnitude(), ParsePhase(), _PhaseMag::period, _PhaseStruct::phase, _NSNMsgStruct::phases, PRELIM_BASE, _PhaseStruct::res, RETURN_DELETE, _PhaseStruct::sta, _NSNMsgStruct::std_error, _PhaseMag::used, and _PhaseMag::value.