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

# parse_usnsn.c File Reference

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <math.h>`
`#include <parse_usnsn.h>`
`#include <earthworm.h>`
`#include <rw_mag.h>`

Go to the source code of this file.

## Defines
#define | MAX_LINES 1000
#define | MAX_LINE_SIZE 300
## Functions
int | epochsec17 (double *, char *)
int | ConvertNSNMsg (char *, int, char **, int *)
int | ParsePhaseMagnitude (char *, PhaseMag *)
int | ParsePhase (char *, Phase *, char *, int *, double *)
int | ParseMagnitude (char *, OriginMag *)
int | ParseEllipse (char *, double, Err_Elipse *)
int | AppendDateStr (char *, char *)
int | BuildDateStr (char *, char *)
int | GetNextLine (char **, int *, char *)
int | ParseNSNMsg (char *NsnMsg, int msgLen, NSNStruct *msgStruct, int debug, char *debug_dir)

## Define Documentation

#define MAX_LINE_SIZE 300

| Definition at line 85 of file parse_usnsn.c.

#define MAX_LINES 1000

| Definition at line 84 of file parse_usnsn.c. Referenced by ParseNSNMsg().

## Function Documentation

int AppendDateStr | ( | char * | ,
|  | char * |
| ) | `[static]`

| Definition at line 677 of file parse_usnsn.c. References EW_FAILURE, EW_SUCCESS, and logit(). Referenced by ParseNSNMsg(), and ParsePhase().

int BuildDateStr | ( | char * | ,
|  | char * |
| ) | `[static]`

| Definition at line 580 of file parse_usnsn.c. References EW_FAILURE, EW_SUCCESS, and logit(). Referenced by ParseNSNMsg().

int ConvertNSNMsg | ( | char * | msg,
|  | int | msgsize,
|  | char ** | buffer,
|  | int * | nlines
| ) | `[static]`

| line[j] = ''; Definition at line 482 of file parse_usnsn.c. References EW_FAILURE, EW_SUCCESS, FALSE, logit(), and TRUE. Referenced by ParseNSNMsg().

int epochsec17 | ( | double * | ,
|  | char * |
| ) |

| Definition at line 324 of file chron3.c.

int GetNextLine | ( | char ** | ,
|  | int * | ,
|  | char * |
| ) | `[static]`

| Definition at line 537 of file parse_usnsn.c. References EW_FAILURE, EW_SUCCESS, FALSE, logit(), and TRUE. Referenced by ParseNSNMsg().

int ParseEllipse | ( | char * | ,
|  | double | ,
|  | Err_Elipse * |
| ) | `[static]`

| Definition at line 717 of file parse_usnsn.c. References ELLIPSE_LENGTH, EW_FAILURE, EW_SUCCESS, _ErrorElipse::int_d, _ErrorElipse::int_l, _ErrorElipse::int_s, logit(), _ErrorElipse::maj_d, _ErrorElipse::maj_l, _ErrorElipse::maj_s, _ErrorElipse::min_d, _ErrorElipse::min_l, and _ErrorElipse::min_s. Referenced by ParseNSNMsg().

int ParseMagnitude | ( | char * | ,
|  | OriginMag * |
| ) | `[static]`

| Definition at line 813 of file parse_usnsn.c. References DATUM_LEN, EW_FAILURE, EW_SUCCESS, logit(), MAG_LEN, _OriginMag::magAvg, _OriginMag::magLabel, _OriginMag::MagType, MAGTYPE_DURATION, MAGTYPE_LOCAL_ZERO2PEAK, and _OriginMag::numStas. Referenced by ParseNSNMsg().

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, _PhaseStruct::mag, _PhaseMag::mag, _OriginMag::magAvg, _OriginMag::magLabel, _PhaseMag::magLabel, _OriginMag::MagType, _PhaseMag::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, _NSNMsgStruct::ot, _PhaseStruct::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.

int ParsePhase | ( | char * | ,
|  | Phase * | ,
|  | char * | ,
|  | int * | ,
|  | double * |
| ) | `[static]`

| Definition at line 893 of file parse_usnsn.c. References AppendDateStr(), _PhaseStruct::automatic, _PhaseStruct::azm, AZM_LEN, _PhaseStruct::dist, DIST_LEN, EARTH_CIRCUM, epochsec17(), EW_FAILURE, EW_SUCCESS, logit(), _PhaseStruct::mag, MAG1_BASE, MAG2_BASE, _PhaseStruct::motion, _PhaseStruct::num_mags, _PhaseStruct::onset, _PhaseStruct::ot, OT_LEN, ParsePhaseMagnitude(), PHA_LEN, _PhaseStruct::phase, _PhaseStruct::res, RES_LEN, _PhaseStruct::res_used, RES_USED, _PhaseStruct::sta, and STA_LEN. Referenced by ParseNSNMsg().

int ParsePhaseMagnitude | ( | char * | ,
|  | PhaseMag * |
| ) | `[static]`

| Definition at line 1031 of file parse_usnsn.c. References EW_FAILURE, EW_SUCCESS, logit(), _PhaseMag::mag, _PhaseMag::magLabel, _PhaseMag::MagType, MAGTYPE_DURATION, MAGTYPE_LOCAL_ZERO2PEAK, _PhaseMag::period, _PhaseMag::used, and _PhaseMag::value. Referenced by ParsePhase().