head	1.5;
access;
symbols
	Hobson_Rock_14Dec2009:1.5
	HEAD_CTD_MERGE:1.5.0.6
	BEFORE_VCS_CHANGE:1.5
	Hobson_Rock_16Oct2009:1.5
	Hobson_Rock_29June2009:1.5
	Jun15_2009:1.5
	Apr_7_2009:1.5
	mar19_2009:1.5
	mar18_2009:1.5
	feb13_2009:1.5
	feb10-2009:1.5
	feb09-2009:1.5
	dec15_2008:1.5
	dec12_2008:1.5
	ST_10_5:1.5
	ST_10_4b:1.5
	ST_10_4:1.5
	ST_10_3:1.5
	ST10_HW:1.5
	ST_10_2:1.5
	ST_10_1:1.5
	ST_10_0:1.5
	AUTONOMY_BRANCH:1.5.0.4
	AUTONOMY:1.5
	AUTONOMY-2008_07_30:1.5
	TREX_ST_1_0:1.5
	RELEASE_27_April_2007_CTD_1:1.5.0.2
	Development_With_Wayne_060804:1.5
	Dev-27Jan2004:1.5
	Rel-15Dec2003:1.5
	Dev-2Dec2003:1.4
	Dev-1Dec2003:1.5
	Rel-26Nov2003:1.4
	OctansJune5:1.3
	Ver3-0:1.3
	Ver2-4:1.3
	Ver2-3-2:1.3
	Ver2-3:1.3
	Ver2-2:1.3;
locks; strict;
comment	@# @;


1.5
date	2003.11.26.23.34.56;	author rob;	state Exp;
branches;
next	1.4;

1.4
date	2001.08.06.17.22.42;	author rob;	state Exp;
branches;
next	1.3;

1.3
date	2000.06.14.22.27.32;	author rob;	state Exp;
branches;
next	1.2;

1.2
date	2000.06.14.01.56.16;	author rob;	state Exp;
branches;
next	1.1;

1.1
date	2000.06.13.22.38.15;	author rob;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Changes made on the Healy
@
text
@#!/bin/bash
#
# PURPOSE: Create Matlab-readable file of the avu location and time-stamps from
#	   the Winfrog log file.
# AUTHOR:  Rob McEwen
# DATE:    00/6/8
#
# NOTES:1) See page B-7 of the Winfrog User's Guide for the format description.

 if [ $1 ]
 then
   echo "Converting USBL data ..."
 else
   echo "cvtwfq: Please furnish a file name."
   exit -1
 fi
#
# The Winfrog on the Healy 2001 generated a .DAT with the following 
# columns:
#
# 1 2                   3           4            5 6          7         8    
# 0,10-24-01 10:58:09.1,N81 00.8440,E016 08.3090,0,8994969.29,519850.82,0.00,
#
# 9    10   11    12    13   14   15   16    17   18   19   20   21   22
# 0.00,0.00,21.57,63.23,1.67,0.00,NONE,0.000,0.00,0.00,0.00,0.00,0.00,Support
# Ship,
#
# 23          24           25     26         27        28   29  30    31   
# N81 01.0441,E016 09.0412,-50.00,8995345.62,520056.19,0.00,0.00,0.00,53.94,
#
# 32    33    34   35   36    37   38   39   40   41   42 
# 53.94,10.34,0.00,NONE,0.000,0.00,0.00,0.00,0.00,0.00,AUV
#
#
 echo "usbl = [ ... " > dataUsbl.m
#                1 2 3  4  5  6  7  8  9  10 11 12 13
 cat $1 | cut -f 6,7,11,12,13,26,27,28,29,30,31,32,33 -d "," >> dataUsbl.m
 echo " ];" >> dataUsbl.m
#
# The following used to extract only the time portion.  I've changed it to
# put the entire mm-dd-yy in the string, so that datenum will reference 
# 1 Jan 0000. Then, we can synchronize this with the vehicle time, which is 
# seconds since 1 Jan 1970, 00:00:00 (midnight).
#
#cat $1 | cut -f 2 -d "," | cut -f 2 -d " " > temp.txt
 cat $1 | cut -f 2 -d "," > temp.txt
#
# This gnarly sed command inserts a ' at the start and end of each line.
#
 cat temp.txt | sed 's/^/'\''/' | sed 's/$/'\''/' > temp1.txt


 echo "usblTime = [ ... " > dataUsblTime.m
 cat temp1.txt >> dataUsblTime.m
 echo " ];" >> dataUsblTime.m

 rm temp.txt
 rm temp1.txt


@


1.4
log
@Extract additional columns from the Winfrog output.
@
text
@d1 1
d17 18
a34 1

d36 1
d39 8
a46 2

 cat $1 | cut -f 2 -d "," | cut -f 2 -d " " > temp.txt
@


1.3
log
@Added file name default.
@
text
@d7 1
d18 1
a18 1
 cat $1 | cut -f 6,7,11,26,27 -d "," >> dataUsbl.m
@


1.2
log
@Now processes Winfrog data, and ship data from Winfrog GPS.
@
text
@d8 8
a15 1
 echo "Converting USBL data ..."
@


1.1
log
@Process Winfrog data.  Create matlab-readable files with .m suffix.
@
text
@d10 1
a10 1
 cat $1 | cut -f 26,27 -d "," >> dataUsbl.m
@
