.if n .ds Q \&"
.if t .ds Q ``
.if n .ds U \&"
.if t .ds U ''
.TH fix_nbr 1 "CODAS Utilities" "GFI"
.tr \&
.nr bi 0
.nr ll 0
.nr el 0
.de DS
..
.de DE
..
.de Pp
.ie \\n(ll>0 \{\
.ie \\n(bi=1 \{\
.nr bi 0
.if \\n(t\\n(ll=0 \{.IP \\(bu\}
.if \\n(t\\n(ll=1 \{.IP \\n+(e\\n(el.\}
.\}
.el .sp
.\}
.el \{\
.ie \\nh=1 \{\
.LP
.nr h 0
.\}
.el .PP
.\}
..
.SH NAME

.Pp
\fBfix_nbr\fP - Fix NB ADCP raw files

.SH USAGE

.Pp
\fBfix_nbr\fP \fIcontrol_file\fP

.SH DESCRIPTION

.Pp
This utility can be used to fix recorded values in NB ADCP raw
files. Currently, only fixing of ship's attitude is implemented.
See below for the syntax of the control file.

.SH PARAMETERS

.Pp
The control file must contain the following parameters:

.nr ll +1
.nr t\n(ll 2
.if \n(ll>1 .RS
.IP "\fByear_base:\fP \fIYYYY\fP"
.nr bi 1
.Pp
Year base to use for conversion of time into decimal days. Note
that since the NB ADCP raw format does not contain year
information, this parameter should be set to year of data
collections.

.IP "\fBfile_list:\fP \fIfile\fP"
.nr bi 1
.Pp
Name of a file containing the successive names of NB ADCP raw
files to fix. This file can contain C-syntax comments.

.IP "\fBlog_file:\fP \fIfile\fP"
.nr bi 1
.Pp
File name for recording log information about fixing process.

.IP "\fBout_dir:\fP \fIdirectory\fP"
.nr bi 1
.Pp
Path to directory where fixed raw files should be written.

.if \n(ll>1 .RE
.nr ll -1


.SH OPTIONS

.Pp
In addition to the parameters listed above, the following options
are available:

.nr ll +1
.nr t\n(ll 2
.if \n(ll>1 .RS
.IP "\fBOPTIONS:\fP \fI\fP"
.nr bi 1
.Pp
This key word can be used to improve the clarity of the control
file and specify the beginning of options. It has no effect.

.IP "\fBuse_scan_nav_output:\fP"
.nr bi 1
.Pp
This method allows to fix NB ADCP raw files with processed
navigation data resulting from \fBscan_nav\fP(1). The
following sub-options are available:

.nr ll +1
.nr t\n(ll 2
.if \n(ll>1 .RS
.IP "\fBfile_name:\fP \fIfile\fP"
.nr bi 1
.Pp
Name of file containing fixes. The format of this file must be
the same as the output of \fBscan_nav\fP(1).

.IP "\fBheading\fP \fI\fP"
.nr bi 1
.Pp
Must be specified if heading data have to be fixed.

.IP "\fBpitch\fP \fI\fP"
.nr bi 1
.Pp
Must be specified if pitch data have to be fixed.

.IP "\fBroll\fP \fI\fP"
.nr bi 1
.Pp
Must be specified if roll data have to be fixed.

.IP "\fBtime\fP \fI\fP"
.nr bi 1
.Pp
Must be specified if time data have to be fixed.

.IP "\fBend\fP \fI\fP"
.nr bi 1
.Pp
This keyword is mandatory and terminates the list of selected
sub-options.

.if \n(ll>1 .RE
.nr ll -1


.IP "\fBtransducer_misalignment:\fP \fI\fP"
.nr bi 1
.Pp
This option can be used to correct NB ADCP raw files for
misalignment of the transducer, in which case one or more of the
following parameters must be specified:

.nr ll +1
.nr t\n(ll 2
.if \n(ll>1 .RS
.IP "\fBheading=\fP \fIheading_offset\fP"
.nr bi 1
.Pp
.IP "\fBpitch=\fP   \fIpitch_offset\fP"
.nr bi 1
.Pp
.IP "\fBroll=\fP    \fIroll_offset\fP"
.nr bi 1
.Pp
.IP "\fBend\fP \fI\fP"
.nr bi 1
.Pp
This keyword is mandatory and terminates the list of selected
sub-options.

.if \n(ll>1 .RE
.nr ll -1

Values must be in degrees. The specified offset is subtracted
from  the measured value to yield the expected correct value.
These offsets are set to 0.0 by default.

.IP "\fBend\fP \fI\fP "
.nr bi 1
.Pp
This keyword is mandatory and terminates the list of selected
options.

.if \n(ll>1 .RE
.nr ll -1

If both method are selected, tilt corrections are performed on
values from the external navigation file.

.SH TIME RANGES

.Pp
Finally, the control file is terminated by a list of time ranges.
See \fBtime_rng\fP(5) for the syntax of these.

.SH OUTPUT FILES

.Pp
Generated fixed NB ADCP raw files have exactly the same name as
input ones, except that they are located in the specified output
directory.
.Pp
The log file contains information about fixing process, as well as
reading status from the navigation file.

.SH AUTHOR

.Pp
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999
