/usr/include/gmt/mgd77/mgd77sniffer.h is in libgmt-dev 5.4.3+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | /* -------------------------------------------------------------------
* $Id: mgd77sniffer.h 19521 2017-12-27 22:38:24Z pwessel $
* See LICENSE.TXT file for copying and redistribution conditions.
*
* Copyright (c) 2004-2018 by P. Wessel and M. T. Chandler
* File: mgd77sniffer.h
*
* Include file for mgd77sniffer
*
* Authors:
* Michael Chandler and Paul Wessel
* School of Ocean and Earth Science and Technology
* University of Hawaii
*
* Date: 23-Feb-2004
*
* ------------------------------------------------------------------*/
/*!
* \file mgd77sniffer.h
* \brief
*/
#include "gmt_dev.h"
#include "mgd77.h"
#include "mgd77_e77.h"
#include "mgd77_rls_coeffs.h"
/* Constants */
#define MGD77_N_DATA_FIELDS 27
#define MGD77_NM_PER_DEGREE 60
#define MGD77_METERS_PER_NM 1852
#define MGD77_DEG_TO_KM (6371.0087714 * D2R)
#define MGD77_NAV_PRECISION_KM 0.00111 /* km */
#define MGD77_MAX_SPEED 10 /* m/s */
#define MGD77_MIN_SPEED 1 /* m/s */
#define MGD77_MEDIAN_SPEED 4.7 /* m/s */
#define MGD77_MAX_DT 900 /* sec */
#define MGD77_MIN_DS 0.1 /* km */
#define MGD77_MAX_DS 5 /* km */
#define MGD77_MAX_DUPLICATES 250
#define MGD77_METERS_PER_FATHOM (6 * 12 * 2.54 * 0.01)
#define MGD77_FATHOMS_PER_METER (1.0 / MGD77_METERS_PER_FATHOM)
#define MGD77_MIN_RLS_BINS 20
#define MGD77_MIN_RLS_PTS 100
#define MGD77_MAX_SEARCH 50
#define MGD77_DIST_FROM_COAST 100 /* meters */
#define MGD77_POS_BIT (1 << 0)
#define MGD77_ZERO_BIT (1 << 1)
#define MGD77_NEG_BIT (1 << 2)
/* RLS statistic array cell names */
#define MGD77_RLS_SLOPE 0
#define MGD77_RLS_ICEPT 1
#define MGD77_RLS_STD 2
#define MGD77_RLS_SXX 3
#define MGD77_RLS_CORR 4
#define MGD77_RLS_SIG 5
#define MGD77_RLS_RMS 6
#define MGD77_RLS_SUMX2 7
#define MGD77_N_STATS 8
/* LMS Limits - Obtained from 4616 bathy and 1657 gravity cruises */
#define MGD77_MIN_DEPTH_SLOPE 0.900404 /* Q2.5 */
#define MGD77_MAX_DEPTH_SLOPE 1.1149 /* Q97.5 */
#define MGD77_MAX_DEPTH_INTERCEPT 0
#define MGD77_MAX_DEPTH_MISFIT 140.676 /* Q95 */
#define MGD77_MIN_FAA_SLOPE 0.868674 /*Q25(Q2.5=-0.17)*/
#define MGD77_MAX_FAA_SLOPE 1.06862 /* Q97.5 */
#define MGD77_MAX_FAA_INTERCEPT 19.1557 /* Q95 */
#define MGD77_MAX_FAA_MISFIT 7.98608 /* Q95 */
/* Verbose Error Display Codes */
#define TYPE_WARN 0
#define TIME_WARN 1
#define DISTANCE_WARN 2
#define SPEED_WARN 3
#define VALUE_WARN 4
#define SLOPE_WARN 5
#define GRID_WARN 6
#define SUMMARY_WARN 7
#define MGD77_N_WARN_TYPES 8
/* MGD77 date constants */
#define AUX_YR 0
#define AUX_MO 1
#define AUX_DY 2
#define AUX_HR 3
#define AUX_MI 4
#define AUX_SC 5
struct BAD_SECTION { /* To flag a range of records as bad for given field */
char abbrev[8]; /* Field name */
unsigned int col; /* Column number */
unsigned int start; /* First record to flag */
unsigned int stop; /* Last record to flag */
};
#define MAX_BAD_SECTIONS 100
struct MGD77_GRID_INFO {
struct GMT_GRID *G;
unsigned int one_or_zero, n_columns, n_rows, col, g_pts, format, mode, mx, n_nan;
int sign;
bool interpolate;
double scale, max_lat;
char abbrev[8];
char fname[32];
};
struct MGD77_SNIFFER_DEFAULTS {
char abbrev[8]; /* MGD77 field name abbreviations */
double minValue; /* minimum accepted field value */
double maxValue; /* maximum accepted field value */
double delta; /* RLS decimation binsize interval */
double maxTimeGrad; /* maximum +/- time derivative */
double maxSpaceGrad; /* maximum +/- space derivative */
double maxDiff; /* maximum +/- value change */
double binmin; /* minimum possible MGD77 value */
double binmax; /* maximum possible MGD77 value */
double maxArea; /* maximum grid offset area */
};
struct MGD77_ERROR {
unsigned int flags[N_ERROR_CLASSES];
int utc_offset;
};
struct MGD77_MAG_RF {
char *model; /* Reference field model name */
int code; /* Reference field code */
int start; /* Model start year */
int end; /* Model end year */
};
|