X2SYS_CROSS(l)

NAME
x2sys_cross - Find and compute Cross-Over Errors

SYNOPSIS
x2sys_cross file(s) OR -Lflist [ -Agap ] [ -Cc|f|g ] [ -Ddeffile ] [ -Fflags ] [ -Gd|g ] [ -Jparams ] [-Kcombi.lis] [ -Nwindow ] [ -O ] [ -Sl|uspeed ] [ -Tl|a|c ] [ -Wsize ] [ -V ] [ -Xe|i ] [ -bo[s][n] ] [ -2 ]

DESCRIPTION
x2sys_cross is used to determine all intersections between or within tracks, and report the time, position, discrepancies in all observables, the mean values of the observables, heading along each track segment, and the distance along track at the cross-over point. The names of the files are passed on the command line, or as a list of files with the -L option. If they are identical or only one name is passed, then x2sys_cross will also look for internal cross-overs. The optional parameters are:

-A  Ignore crossovers on segments of length > gap [no gap checking].

-C  Select procedure for along-track distance calculation:
            c Cartesian distances [Default].
            f Flat earth distances.
            g Great circle distances.

-D  Give the definition file for this data format [x2sys].

-F  Sets which columns to use. Give a comma-separated list of column names [Default is all columns].

-G  Selects geographical coordinates. Append d for discontinuity at the Dateline (makes longitude go from -180 to + 180) or g for discontinuity at Greenwhich (makes longitude go from 0 to 360 [Default]).

-J  Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT (upper case modifier). UNIT is cm, inch, or m, depending on the MEASURE_UNIT setting in .gmtdefaults, but this can be overridden on the command line by appending the c, i, or m to the scale/width value.

    CYLINDRICAL PROJECTIONS:

    -Jclon0/lat0/scale (Cassini)
    -Jjlon0/scale (Miller)
    -Jmscale (Mercator - Greenwich and Equator as origin)
    -Jmlon0/lat0/scale (Mercator - Give meridian and standard parallel)
    -Joalon0/lat0/azimuth/scale (Oblique Mercator - point and azimuth)
    -Joblon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
    -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point and pole)
    -Jqlon0/scale (Equidistant Cylindrical Projection (Plate Carree))
    -Jtlon0/scale (TM - Transverse Mercator, with Equator as y = 0)
    -Jtlon0/lat0/scale (TM - Transverse Mercator, set origin)
    -Juzone/scale (UTM - Universal Transverse Mercator)
    -Jylon0/lats/scale (Basic Cylindrical Projection)

    AZIMUTHAL PROJECTIONS:

    -Jalon0/lat0/scale (Lambert).
    -Jelon0/lat0/scale (Equidistant).
    -Jflon0/lat0/horizon/scale (Gnomonic).
    -Jglon0/lat0/scale (Orthographic).
    -Jslon0/lat0/[slat/]scale (General Stereographic)

    CONIC PROJECTIONS:

    -Jblon0/lat0/lat1/lat2/scale (Albers)
    -Jdlon0/lat0/lat1/lat2/scale (Equidistant)
    -Jllon0/lat0/lat1/lat2/scale (Lambert)

    MISCELLANEOUS PROJECTIONS:

    -Jhlon0/scale (Hammer)
    -Jilon0/scale (Sinusoidal)
    -Jk[f|s]lon0/scale (Eckert IV (f) and VI (s))
    -Jnlon0/scale (Robinson)
    -Jrlon0/scale (Winkel Tripel)
    -Jvlon0/scale (Van der Grinten)
    -Jwlon0/scale (Mollweide)

    NON-GEOGRAPHICAL PROJECTIONS:

    -Jp[a]scale[/origin] (polar (theta,r) coordinates, optional a for azimuths and offset theta [0])
    -Jxx-scale[l|ppow][/y-scale[l|ppow]] (Linear, log, and power scaling)
    More details can be found in the psbasemap manpages.

-K  Only process the pair-combinations found in the file combi.lis [Default process all possible combinations among the specified files]. Suitable option for passing old x_setup output.

-N  Maximum number of points to use in the interpolation [6].

-O  Output results using the old XOVER format [Default is X2SYS format]. This option should only be used with *.gmt-formatted MGD77 files.

-R  west, east, south, and north specify the Region of interest. To specify boundaries in degrees and minutes [and seconds], use the dd:mm[:ss] format. Append r if lower left and upper right map coordinates are given instead of wesn.

-S  Defines window of track speed within which to calculate crossovers.
            -Sl sets lower speed [Default is 0].
            -Su sets upper speed [Default is Infinity].

-T  Sets the interpolation mode. Choose among:
            l Linear interpolation [Default].
            a Akima spline interpolation.
            c Cubic spline interpolation.

-V  Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].

-W  Sets maximum time gap (in user units) allowed between points on either side of a crossover [Default is Infinity].

-X  Append e for external crossovers only, and i for internal crossovers only [Default is all crossovers].

-2  Report the values of each track at the crossover [Default is the crossover value and the mean value].

-bo Selects binary output. Append s for single precision [Default is double].

REMARKS
The COEs found are printed out to standard output in ASCII format (unless -bo is set). When ASCII is chosen, the output format depends on whether or not old-style XOVER output (-O) has been selected. If so, then the first record contains the file names and their start year, whereas subsequent records have the data for each COE encountered. The fields written out are lat, lon, time along track #1, time along track #2, x_gravity, x_magnetics, x_bathymetry, average gravity, average magnetics, average bathymetry, heading along track #1, and heading along track #2. If the default format is chosen then the header record starts with "> ", and the output format for crossovers are first 8 columns that contain x, y, time along track #1, time along track #2, distance along track #1, distance along track #2, heading along track #1, and heading along track #2, and then pairs of (COE, average value) for each data type. Sign convention: If lega and legb are passed on the command line, then the COE value is Value (lega) - Value (legb). It is recommended that the Akima's spline is used' instead of the natural cubic spline, since it is less sensitive to outliers that tend to introduce wild oscillations in the interpolation.

EXAMPLES
To compute all internal crossovers in the gmt-formatted file c2104.gmt, and output in the old XOVER format, use

x2sys_cross c2104.gmt -O -Dgmt > c2104.d

To find the crossover locations with bathymetry between the two MGD77 files A13232.mgd77 and A99938.mgd77, try

x2sys_cross A13232.mgd77 A99938.mgd77 -Xe -Dmgd77 -Flon,lat,top > crossovers.d

SEE ALSO
gmt(l), x2sys_datalist(l)