MB-System Unix Manual Page

mbminirovnav

Section: MB-System 5.0 (1)
Updated: 7 September 2019
Index
 

NAME

mbminirovnav - Merges MBARI MiniROV data logs and outputs the ROV navigation in the format used for other ROV navigation at MBARI (format 165, MBF_MBARIROV).

 

VERSION

Version 5.0

 

SYNOPSIS

mbminirovnav [
--help
--input-nav-file=file
--input-ctd-file=file
--input-dvl-file=file
--input-rov-file=file
--interpolate-position
--interval=seconds
--output=file
--rov-dive-start=yyyymmddhhmmss
--rov-dive-end=yyyymmddhhmmss
--utm-zone=zone_id/NorS
--verbose ]

 

DESCRIPTION

The MBARI MiniROV logs navigation and related data in four files during each dive. These include USBL tracking in the form of position fixes derived from the Winfrog software package, CTD data including pressure depth, ROV platform data including heading, roll, and pitch, and DVL data including altitude and velocity over bottom whenever the Doppler Velocity Log (DVL) has bottom lock. This data logging structure began with MiniROV dive 100 on September 5, 2017. This program mbminirovnav reads the four MiniROV log files and outputs a single ROV navigation file in the format typically used by MBARI for ROV Doc Ricketts and ROV Ventana navigation. MB-System supports MBARI ROV navigation as format 165 (MBF_MBARIROV). The combined MiniROV navigation can then be interactively edited using the tool mbnavedit.

 

MB-SYSTEM AUTHORSHIP

David W. Caress

  Monterey Bay Aquarium Research Institute
Dale N. Chayes

  Center for Coastal and Ocean Mapping

  University of New Hampshire
Christian do Santos Ferreira

  MARUM - Center for Marine Environmental Sciences

  University of Bremen

 

OPTIONS

--help

This "help" flag cause the program to print out a description of its operation and then exit immediately.
--input-ctd-file=file

Specifies the MiniROV CTD data logfile to be read. This file includes the MiniROV's pressure depth values.
--input-dvl-file=file

Specifies the MiniROV DVL data logfile to be read. This file includes the MiniROV's altitude and velocity over bottom values (when the ROV is close enough to the seafloor for the DVL to have bottom lock).
--input-nav-file=file

Specifies the MiniROV NAV data logfile to be read. This file includes the MiniROV's lateral position values as estimated by an Ultra Short Baseline tracking sonar and passed through the Winfrog software package.
--input-rov-file=file

Specifies the MiniROV ROV data logfile to be read. This file includes the MiniROV's heading, roll, and pitch values.
--interpolate-position

This option causes repeated position values to be replaced with values linearly interpolated between the occasional changed (new) values. See the discussion in the example section section below for why this option is not recommended. TP --interval=seconds
This option sets the time interval in seconds of the output format 165 ROV navigation data. The default is 1.0 seconds.
--output=file

Specifies the filename for the output format 165 ROV navigation data.
--rov-dive-start=yyyymmddhhmmss

Specifies the start time of the output format 165 ROV navigation data.
--rov-dive-end=yyyymmddhhmmss

Specifies the end time of the output format 165 ROV navigation data.
--utm-zone=zone_id/NorS

Specifies the UTM zone used to calculate UTM eastings and northings from the longitude and latitude values derived from the NAV log file. By default, mbminirovnav calculates the UTM zone based on the average longitude and latitude contained in the input NAV log file.
--verbose ]
The --verbose option causes the program to be verbose.

 

EXAMPLE

During the 2017 Beaufort Sea cruise ARA08C on the South Korean icebreaker Araon, the MBARI MiniROV was used for ten ROV dives during six operational days (September 5, 6, 8, 9, 10, 12). The MiniROV data are logged in four ASCII text day files defined by UTC time, with names of the form XXX_mmddyyyy000000.txt where XXX is CTD, DVL, NAV, or ROV. For instance, the first set of files associated with expedition ARA08C are listed here:

  CTD_090517000000.txt
  DVL_090517000000.txt
  NAV_090517000000.txt
  ROV_090517000000.txt

The CTD files contain the serial output of the CTD sensor in CSV form, with a beginning that includes calibration coefficients as comments:

  #SN: 0361

  #CAL DATE: 161116

  #INST DATE: 200117

  #Soc: .5617073

  #Voffset: -.4905716

  #Tau20: 1.15

  #A: -.002684434

  #B: .0001176004

  #C: -.000001882225

  #E: .036

  #FIELDS=TIME,C,T,D,S,O2uM,O2raw,DGH_T,C2_T,C2_C
  1504629902.228,2.474,7.233,5.071,31.741,-87.877,0.000,7.332,5.514,0.076
  1504629904.528,2.474,7.233,5.707,31.741,-87.873,0.000,7.332,5.514,0.076
  1504629906.728,2.474,7.236,6.267,31.741,-87.884,0.000,7.332,5.514,0.076
  1504629908.935,2.475,7.235,6.839,31.741,-87.892,0.000,7.332,5.514,0.076
The fields of interest for the ROV navigation data are the timestamp (which is in epoch seconds, or seconds since 1970, in UTC) and the depth value, which derives from the CTD's pressure sensor.

The DVL files are also CSV, with the following form:

  #FIELDS,time,Depth,S_Time,bx,by,bz,Satus
  1504649788.514,0.000,758463.000,-99999.000,-99999.000,-99999.000,58.000
  1504649790.719,0.000,758712.000,-99999.000,-99999.000,-99999.000,58.000
  1504649792.920,0.000,758961.000,-99999.000,-99999.000,-99999.000,2.000
  1504649795.120,7.976,759109.000,-407.000,12.000,-159.000,2.000
  1504649797.321,0.000,759304.000,-99999.000,-99999.000,-99999.000,2.000
  1504649799.521,0.000,759497.000,-99999.000,-99999.000,-99999.000,2.000
  1504649801.721,0.000,759735.000,-99999.000,-99999.000,-99999.000,2.000
  1504649803.921,0.000,759928.000,-99999.000,-99999.000,-99999.000,2.000
  1504649806.122,7.355,760142.000,-8.000,38.000,-189.000,2.000
  1504649808.323,0.000,760365.000,-99999.000,-99999.000,-99999.000,2.000
Here the "Depth" field is actually altitude in meters, which is nonzero only when the DVL has bottom lock (which is also when the bx, by, and bz velocity components are not -99999.000). The altitude value is currently used in the output ROV navigation. The DVL velocity components are not currently used, but should be used in the calculation of an optimal navigation model.

The NAV files are simply $GPGLL strings output by the Winfrog software program when it is interfaced with an Ultra Short Baseline (USBL) tracking sonar appended after a CSV timestamp in UTC epoch seconds:

  #FIELDS,time,$GPGLL
  1504649757.995,$GPGLL,6952.70206,N,13903.45914,W,221550.15,V,N*68


  1504649760.205,$GPGLL,6952.70237,N,13903.46025,W,221555.21,V,N*60


  1504649762.405,$GPGLL,6952.70237,N,13903.46025,W,221555.21,V,N*60


  1504649764.607,$GPGLL,6952.70237,N,13903.46025,W,221555.21,V,N*60


  1504649766.906,$GPGLL,6952.70237,N,13903.46025,W,221555.21,V,N*60


  1504649769.106,$GPGLL,6952.70272,N,13903.46148,W,221600.16,V,N*6C


  1504649771.312,$GPGLL,6952.70272,N,13903.46148,W,221600.16,V,N*6C


  1504649773.513,$GPGLL,6952.70305,N,13903.46286,W,221605.23,V,N*6F


  1504649775.713,$GPGLL,6952.70305,N,13903.46286,W,221605.23,V,N*6F


Because the datalogger currently appends an EOL character on top of the EOL that is already in the $GPGLL string, these files appear to have empty alternate lines in a text editor. This feature is likely to be fixed in the future. The values of interest to ROV navigation are the ROV position in latitude and longitude, which are presented in the form of
    $GPGLL,ddmm.mmmmm,H,dddmm.mmmmm,H
where "dd" or "ddd" are degrees, "mm.mmmmm" are decimal minutes, and H is the hemisphere (N or S for north or south for latitude; E or W for east or west for longitude). Note that the datalogger saves the most recent position fix about every two seconds, which means that when the USBL fails to provide a new position fix the logged position does not change. Thus, repeated positions correspond to a lack of new data.

Finally, the ROV files are CSV ASCII text files in the following form:

  #FIELDS,time,x,y,z,yaw,magna_amps,F1,F2,F3,F4,F5-6,Heading,Pitch,Roll
  1504649787.899,-0.000,-0.000,-11.126,-0.000,3.530,1.508,-1.056,1.508,-1.056,-10.000,77.389,1.242,-4.974
  1504649790.099,-0.000,-0.000,-11.099,-0.000,3.520,1.192,-1.143,1.192,-1.143,-10.000,77.832,-0.353,-6.566
  1504649792.301,-0.000,-0.000,-11.153,-0.000,3.510,0.410,-0.383,0.410,-0.383,-10.000,77.580,-2.960,-5.878
  1504649794.503,-0.000,-0.000,-10.989,-0.000,3.510,-0.048,-1.232,-0.048,-1.232,-10.000,79.641,-1.444,-5.637
  1504649796.717,-0.000,-0.000,-11.099,-0.000,3.490,0.801,-0.104,0.801,-0.104,-10.000,80.332,-2.918,-6.626
  1504649798.917,-0.000,-0.000,-11.044,-0.000,3.520,0.176,-1.530,0.176,-1.530,-10.000,80.748,-1.917,-5.723
  1504649801.216,-0.000,-0.000,-11.153,-0.000,3.520,1.752,-0.497,1.752,-0.497,-10.000,83.300,-2.980,-6.701
  1504649803.416,5.097,-0.000,-11.126,-0.000,3.650,0.639,2.402,0.639,2.402,-10.000,82.556,-2.840,-4.664
  1504649805.618,6.581,0.483,-11.153,-0.000,4.980,9.577,7.055,9.253,8.021,-10.000,82.143,-2.174,-6.512
  1504649807.818,6.718,0.873,-11.126,-0.000,4.890,6.255,6.351,5.111,8.097,-10.000,76.531,-0.979,-3.645
Here the values of interest to ROV navigation are the heading, pitch and roll.

This program, mbminirovnav requires all four log files (CTD, DVL, NAV and ROV) to produce the output complete ROV navigation in format 165 files that can be further processed or plotted with MB-System. Data values that are missing, whether because the relevant input file is not specified or because the input does not contain valid values for that time, are flagged as invalid in the output filee. In practice, ROV dives often cross over the UTC day boundaries, and so it is frequently sensible to concatenate the data from an entire expedition and extract only the data of interest for individual ROV dives.

For the case of the ARA08C MiniROV dives, only the time spent with ROV on bottom is of interest, and so we break up the navigation into files associated with the on-bottom components of each of the ten dives. What follows is a workflow that produces a format 165 file for each of the dives according to the known on and off bottom times in UTC. Because ROV dives cross the UTC day boundaries, we start by concatenating all of the log files for the expedition into single long files, and then use those long files as the inputs to mbminirovnav.

The start and end times are defined by the --rov-dive-start and --rov-dive-end commands.

The format 165 ROV navigation files include UTM easting and northing fields but no place to define which UTM zone is used. By default, mbminirovnav will use the average input longitude and latitude values to determine the UTM zone to use, but the zone can also be specified using using the --utm-zone command. In the case of the ARA08C MiniROV dives, some were in UTM zone 7 and others in UTM zone 8, and we specify which to use for each dive.

This example also invokes the --interpolate-position command, which causes mbminirovnav to interpolate longitude and latitude values onto the output times. All of the other values are interpolated onto the output times regardless. USBL tracking of an ROV is intermittent in that interrogration usually occurs at intervals of a few seconds and that many, if not most, interrogations are unsuccessful. New positions are passed from Winfrog into the MiniROV only when they become available. The MiniROV navigation logging records the most recent position (in the form of the $GPGLL string sent from Winfrog) every two seconds or so; these values thus repeat until a new value is available. By default, mbminirovnav replicates this data flow in the output format 165 ROV navigation file, repeating position values until now positions are available. If the --interpolate-position option is specified, mbminirovnav instead replaces repeated position values with values linearly interpolated between the occasional changed (new) values. This may actually be undesirable if some of the USBL fixes are badly wrong (outliers). The interactive program mbnavedit recognizes repeated positions as potentially null, and allows one to flag bad fixes and apply interpolation that only uses the unrepeated and unflagged fixes. Therefore, the recommended approach is to not use the --interpolate-position option in mbminirovnav, and to instead apply the interpolation using mbnavadjust.


    # Processing MiniROV log files into MB-System compatible ROV navigation

    #

    # Wrote new tool mbminirovnav to be included in MB-System that outputs

    # format 165 ROV navigation files.

    # Dive_#    on_bottom_(Z)   off_bottom_(Z)     UTM_Zone


    # 100           5-Sep       16:54   5-Sep   17:56       8


    # 101           5-Sep       20:07   5-Sep   22:05       8


    # 102           6-Sep       1:55    6-Sep   02:39       8


    # 103           6-Sep       20:56   6-Sep   22:46       8


    # 104           8-Sep       16:30   8-Sep   19:12       7


    # 105           8-Sep       23:43   9-Sep   02:15       7


    # 106           9-Sep       18:00   9-Sep   21:19       7


    # 107           9-Sep       23:38   10-Sep  02:18       7


    # 108           10-Sep      19:27   10-Sep  23:15       7


    # 109           12-Sep      16:41   12-Sep  19:16       8


    #

    # First concatenate all the MiniROV log files locally
    cat ../MiniROVArctic2017logfiles/CTD*txt > MiniROV_CTD_2017Araon_ARA8C.txt
    cat ../MiniROVArctic2017logfiles/DVL*txt > MiniROV_DVL_2017Araon_ARA8C.txt
    cat ../MiniROVArctic2017logfiles/NAV*txt > MiniROV_NAV_2017Araon_ARA8C.txt
    cat ../MiniROVArctic2017logfiles/ROV*txt > MiniROV_ROV_2017Araon_ARA8C.txt

    #

    # Generate ROV navigation for MiniROV dive 100

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_100_20170905_ARA8C.mb165 
                    --utm-zone=8N 
                    --rov-dive-start=2017/09/05/16/54/00 
                    --rov-dive-end=2017/09/05/17/56/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 101

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_101_20170905_ARA8C.mb165 
                    --utm-zone=8N 
                    --rov-dive-start=2017/09/05/20/07/00 
                    --rov-dive-end=2017/09/05/22/05/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 102

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_102_20170905_ARA8C.mb165 
                    --utm-zone=8N 
                    --rov-dive-start=2017/09/06/01/58/30 
                    --rov-dive-end=2017/09/06/02/30/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 103

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_103_20170906_ARA8C.mb165 
                    --utm-zone=7N 
                    --rov-dive-start=2017/09/06/20/56/00 
                    --rov-dive-end=2017/09/06/22/46/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 104

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_104_20170908_ARA8C.mb165 
                    --utm-zone=7N 
                    --rov-dive-start=2017/09/08/16/30/00 
                    --rov-dive-end=2017/09/08/19/12/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 105

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_105_20170908_ARA8C.mb165 
                    --utm-zone=7N 
                    --rov-dive-start=2017/09/08/23/43/00 
                    --rov-dive-end=2017/09/09/02/14/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 106

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_106_20170909_ARA8C.mb165 
                    --utm-zone=7N 
                    --rov-dive-start=2017/09/09/18/00/00 
                    --rov-dive-end=2017/09/10/21/19/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 107

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_107_20170909_ARA8C.mb165 
                    --utm-zone=7N 
                    --rov-dive-start=2017/09/09/23/38/00 
                    --rov-dive-end=2017/09/10/02/18/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 108

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_108_20170910_ARA8C.mb165 
                    --utm-zone=7N 
                    --rov-dive-start=2017/09/10/19/27/00 
                    --rov-dive-end=2017/09/10/23/15/00 
                    --interpolate-position 
                    --verbose

    #

    # Generate ROV navigation for MiniROV dive 109

    mbminirovnav --input-nav-file=MiniROV_NAV_2017Araon_ARA8C.txt 
                    --input-ctd-file=MiniROV_CTD_2017Araon_ARA8C.txt 
                    --input-dvl-file=MiniROV_DVL_2017Araon_ARA8C.txt 
                    --input-rov-file=MiniROV_ROV_2017Araon_ARA8C.txt 
                    --output=MiniROVnav_109_20170912_ARA8C.mb165 
                    --utm-zone=8N 
                    --rov-dive-start=2017/09/12/16/41/00 
                    --rov-dive-end=2017/09/12/19/16/00 
                    --interpolate-position 
                    --verbose

 

SEE ALSO

mbsystem(1)

 

BUGS

Da.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
MB-SYSTEM AUTHORSHIP
OPTIONS
EXAMPLE
SEE ALSO
BUGS


Last Updated: 7 September 2019


<< Manual page for the MB-System package | MB-System website >>