---
name: "x_init"
section: "1gmt"
platform: "linux"
package: "gmt"
version: "4.5.12-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/x_init"
---

# x\_init(1gmt)

Initialization of Cross-Over Data Bases.

## NAME

**x\_init** - Initialization of Cross-Over Data Bases.

## SYNOPSIS

**x\_init** **-I**

## DESCRIPTION

The purpose of **x\_init** is to create two key files that will be holding all the cross-over information for all the cruises tested. These files are called *xx\_base.b* and *xx\_legs.b*, and they will contain data for each cross-over and totals for each leg, respectively.  **x\_init** will create these two files in the current directory, and write out the fileheader with a 1 as the next record number in the case of xx\_base.b. NB! Any previous files with the same names in the current directory will be erased, so use with caution.

- **-I**

  Must be present form initialization to take effect.

## BEWARE

Both files are binary and have fixed record lengths. The formats of the files are as follows:\

- **xx\_base.b:**

  	Record length = 40 bytes.\
  \
   	Rec # 1:		fileheader\
  \
   	Rec # 2:		pairheader\
  \
   	Next n recs:		crossover-structure\
  \
   	Rec  #  n+3:		pairheader etc.\
   The fileheader is a 40 byte character string where the last 10 bytes contains the record number of the last record in the file. The pairheader is a 40 byte character string which contains the names of the two legs in question and the number of COEs generated between them. The crossover-structure contains all the information for one COE, that is lat, lon, time along leg values of gravity, magnetics, and bathymetry at the cross-over point, the heading of track #1, and the heading of track #2. See program listing for more details on formats. The file is sequential in that new data are appended at the end of the file.

- **xx\_legs.b:**

  	Record length = 204 bytes.\

  Each record contains the complete information for each leg that has been checked. The leg-structure contains fields like year of cruise, number of internal/external COEs for gravity, magnetics, and bathymetry, their means and standard deviations, and the best fitting regression lines, i.e., the dc-shifts and drift-rates computed from the time/error data points. See program listing for complete description of record format.\

## SEE ALSO

[*GMT*(1)](/GMT/1.md), *x\_system*(1)

## REFERENCES

Wessel, P. XOVER: A Cross-over Error Detector for Track Data, *Computers & Geosciences, 15*, 333-346.
