MB-System Unix Manual Page

mbmerge

Section: MB-System 5.0 (l)
Updated: 13 July 2001
Index
 

NAME

mbmerge - Merges swath sonar data with new navigation.

 

VERSION

Version 5.0

 

SYNOPSIS

mbmerge [-Aheading_offset -B -Fformat -Llonflip -Iinfile -Ooutfile -Mnavformat -Nnavfile -Z -V -H]

 

DESCRIPTION

mbmerge is a utility for merging navigation with swath sonar echosounder data. The input navigation can be in one of several formats, including the L-DEO shipboard processing format.

Many data formats include the navigation information in the same data records as the ping or survey data. In this case, mbmerge replaces the position values in the file by interpolation of the values in the navigation file.

Some data formats use asynchronous navigation, which means that the navigation is contained in data records separate from the data records containing sonar ping data. The time stamps and frequency of the navigation records are in general different from those of the ping data records. Examples include all of the Simrad vendor data formats and all of the "UNB" formats for Reson SeaBat and Elac Bottomchart sonars. For data formats with asynchronous navigation, MB-System programs calculate the positions of ping data by interpolation and/or extrapolation of the navigation data. One frequently encountered problem is having the first ping record in a file occur before the first navigation record so that the position of that first record is unknown to MB-System programs. In the case of asynchronous navigation, mbmerge replaces the position values in the navigation records. In the special case of a ping record before any navigation records, mbmerge inserts a new navigation record just before the first ping record to eliminate the unknown position problem.

The default input and output streams are stdin and stdout.

 

AUTHORSHIP

David W. Caress (caress@mbari.org)

  Monterey Bay Aquarium Research Institute
Dale N. Chayes (dale@ldeo.columbia.edu)

  Lamont-Doherty Earth Observatory

 

OPTIONS

-A
heading_offset
Adds this value to all heading values. This option is useful for correcting simple, constant deviations in heading values.
-B
This option causes the navigation to be interpolated using a simple linear interpolation. Normally, a spline interpolation is used. Linear interpolation may provide better results when the navigation is sparse relative to the swath data or when the navigation contains significant gaps. Default: spline interpolation.
-F
format
Sets the format for the input and output swath sonar data using MBIO integer format identifiers. This program uses the MBIO library and will read or write any swath sonar format supported by MBIO. A list of the swath sonar data formats currently supported by MBIO and their identifier values is given in the MBIO manual page. Default: format = 11.
-H
This "help" flag causes the program to print out a description of its operation and then exit immediately.
-I
infile
Data file from which the input data will be read. If no input file is specified, the input will be read from stdin. Default: infile = stdin.
-L
lonflip
Sets the range of the longitude values used. If lonflip=-1 then the longitude values will be in the range from -360 to 0 degrees. If lonflip=0 then the longitude values will be in the range from -180 to 180 degrees. If lonflip=1 then the longitude values will be in the range from 0 to 360 degrees. Default: lonflip = 0.
-M
navformat
Defines the format of the navigation data to be read. Currently, eight formats are allowed:

navformat = 1:
This format consists of ascii lines of the form:
        time_d lon lat

where time_d is decimal unix time in seconds since 1/1/1970 00:00:00.000 and lon and lat are in decimal degrees. This form can be obtained from swath sonar data files using mblist with the -OMXY option. Some representative lines are:
 5440574.017    -129.505875      46.445255

 5440574.100    -129.506045      46.445083

 5440574.183    -129.506208      46.445083

 5440574.267    -129.506542      46.444913

navformat = 2:
This format consists of ascii lines of the form:
        year mon day hour min sec lon lat

where lon and lat are in decimal degrees. This form can be obtained from swath sonar data files using mblist with the -OtXY option. Some representative lines are:
 1981 05 06 04 14 01    -129.505875      46.445255

 1981 05 06 04 14 06    -129.506045      46.445083

 1981 05 06 04 14 11    -129.506208      46.445083

 1981 05 06 04 14 16    -129.506542      46.444913

navformat = 3:
This format consists of ascii lines of the form:
        year jday hour min sec lon lat

where jday is the julian day of the year and lon and lat are in decimal degrees. This form can be obtained from swath sonar data files using mblist with the -OJXY option. Some representative lines are:
 1981 126 04 14 01      -129.505875      46.445255

 1981 126 04 14 06      -129.506045      46.445083

 1981 126 04 14 11      -129.506208      46.445083

 1981 126 04 14 16      -129.506542      46.444913

navformat = 4:
This format consists of ascii lines of the form:
        year jday daymin sec lon lat

where jday is the julian day of the year, daymin is the minute of the day, and lon and lat are in decimal degrees. This form can be obtained from swath sonar data files using mblist with the -OjXY option. Some representative lines are:
 1981 126 0254 01       -129.505875      46.445255

 1981 126 0254 06       -129.506045      46.445083

 1981 126 0254 11       -129.506208      46.445083

 1981 126 0254 16       -129.506542      46.444913

navformat = 5:
This is the L-DEO shipboard processing navigation format, which consists of ascii records. Some representative lines of the format are:
 91+300:21:00:00.000 S 31 56.5282 E 179 21.3922   gp1  25.7   0.4
 91+300:21:01:00.000 S 31 56.5746 E 179 21.5991   gp1  25.7   0.4
 91+300:21:02:00.000 S 31 56.6215 E 179 21.8051   gp1  25.7   0.4
 91+300:21:03:00.000 S 31 56.6679 E 179 22.0111   gp1  25.7   0.4
 |year               |north or south              |nav source 
   |julian day         |latitude degrees               |quality1
        |hour             |latitude minutes                   |quality2
           |minute                |east or west
              |second               |longitude degrees
                                        |longitude minutes

navformat = 6 or 7:
These two formats are subsets of the NMEA 0183 marine interface standard. The raw data stream includes ASCII "sentences" beginning with the '$' character and ending with <CR><LF> characters; the sentences recognized by mbmerge include time (starting with "$--ZDA" or "$--UNX" where the "--" can be any two characters) and navigation (starting with "$--GLL" or "$--GGA"). The time tags for each navigation point are taken from the last ZDA or UNX sentence read prior to the GLL or GGA sentence. The GLL sentences used when navformat = 6 record generic position data, and the GGA sentences used when navformat = 7 record Global Positioning System (GPS) fixes. The sentence definitions are:
  ZDA (Time and Date):
    $--ZDA,hhmmss.ss,dd,mm,yyyy<CR><LF>
           |     |   |  |  |
           |     |   |  |  +- Year
           |     |   |  +---- Month
           |     |   +------- Day
           |     +----------- Optional fractional 
           |                  seconds 
           +----------------- Hour, minute, and 
                              second
  UNX (Nonstandard Time and Date derived from Unix host):
    $--UNX,hhmmss.ss,dd,mm,yyyy<CR><LF>
           |     |   |  |  |
           |     |   |  |  +- Year
           |     |   |  +---- Month
           |     |   +------- Day
           |     +----------- Optional fractional 
           |                  seconds 
           +----------------- Hour, minute, and 
                              second
  GLL (Generic Position):
    $--GLL,ddmm.mm,N,dddmm.mm,E,hhmmss.ss,AXX<CR><LF>
           | |     | |  |     | |
           | |     | |  |     | +- UTC time as 
           | |     | |  |     |    in ZDA sentence
           | |     | |  |     +- E/W East or West
           | |     | |  +- Longitude decimal minutes
           | |     | +- Longitude degrees
           | |     +- N/S North or South
           | +- Latitude decimal minutes 
           +- Latitude degrees
  GGA (GPS Position):
    $--GLL,hhmmss.ss,ddmm.mm,N,dddmm.mm,E,.....<CR><LF>
           |         | |     | |  |     |
           |         | |     | |  |     +- E/W East
           |         | |     | |  |        or West
           |         | |     | |  +- Longitude decimal 
           |         | |     | |     minutes
           |         | |     | +- Longitude degrees
           |         | |     +- N/S North or South
           |         | +- Latitude decimal minutes
           |         +- Latitude degrees 
           +- UTC time as in ZDA sentence

navformat = 8:
This is the Simrad 90 Position datagram format. This type of navigation typically derives from the *.pos files created by the Simrad Mermaid or Merlin data logging packages (when run in the parallel file mode).
 
 Default: navformat = 5.

-N
navfile
Data file from which the navigation data will be read.
-O
outfile
Data file to which the output data will be written. If no output file is specified, the output will be written to stdout. Default: outfile = stdout.
-V
Normally, mbmerge works "silently" without outputting anything to the stderr stream. If the -V flag is given, then mbmerge works in a "verbose" mode and outputs the program version being used and all error status messages.
-Z
This option causes the heading values to be set to "course-made-good" as calculated from the navigation. This option is useful when the original heading values are irretrievably bad.

 

EXAMPLES

Suppose one wishes to merge the good navigation in file navhs with the raw Hydrosweep data (format 21) file hsraw, which currently contains real-time navigation. The following will suffice:
        mbmerge -F21 -Nnavhs -Ihsraw -Ohsgood

 

SEE ALSO

mbsystem(l), mblist(l)

 

BUGS

You tell me.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
AUTHORSHIP
OPTIONS
EXAMPLES
SEE ALSO
BUGS


Last Updated: 13 July 2001


Return to list of MB-System manual pages...

Back to MB-System Home Page...