U. S. GEOLOGICAL SURVEY
DATA ACQUISITION EQUIPMENT


Topside Data Acquisiton
Sonar Towfish
File Formats


Topside Data Acquisition:

Sonar Towfish:

The topside data acquisition computer the USGS uses to collect and store the analog signal is the QMIPS(TM) system built by Triton Technologies, Inc., Watsonville, CA: A dual-display IBM-compatible AT computer built around a 66-mHz 80486 Intel CPU. using a 12-bit (72 db effective dynamic range) A/D converter in conjunction with an array processor, QMIPS (TM) is capable of digitizing up to four channels of analog information aggregate rates of up to 750 kHz, thus preserving the content and the dynamic range of the sonar signal. Port and starboard sonar image data, as well as the 4.5 kHz sub-bottom profilerata, are displayed in real-time on a high-resolution color display (1280 x 1024 pixels) while telemetry from navigation systems and the towfish, including full towfish attitude information, is displayed on a separate monitor. The data storage media used is 8mm Exabyte tape. Currently the USGS uses two systems: One for analog input (QMIPS) and one for digital input (QMIPS-DSP).

Sonar files collected using the QMIPS system have the following format:

     1st rec   ----    ----    ---- *** Data is stored in 
        |      ----    ----    ---- *** 1024 byte records for
        |        .                            each channel
        |        .                      (*** 256 byte trailer.)
        |        .
        |        .
        V        .
      End rec  ----    ----    ---- ***

chan1 chan2 chanX followed by the sonar data itself which consists of at least two channels of sonar information and a 256 byte trailer. The trailer contains parameters relevant to the collected sonar, such as altitude, file name, pitch, roll, date of collection, time of day, etc. The header and trailer formats for both the QMIPS(TM) and the QMIPS-DSP(TM) systems are described on the next few pages.

FILE FORMATS


QMIPS

The header structure labelled qmips_header is the 1024 byte portion that occurs once at the beginning of a file. The structure labeled qmips_sonar is the 256 byte trailer which is placed at the end of every ping. NOTE: These structures were designed for DEC's, which align on 16 bit boundaries. If you are using a 32 or 64 bit machine, alignment will have to be forced as these structures will be larger than 256 bytes on those machines. Creating a union of these structures with a 1024 or 256 byte (respectively) unsigned char buffer generally works. Also note the defines. The WORD define for RISC machines, or any 32 bit machine, should be changed to unsigned short.
#define BYTE unsigned char
#define WORD unsigned int          /* PC: 16 bit  */
#define DWORD unsigned long        /* PC: 32 bit */

struct qmips_header
{                                 
    /* header header */
    /*****************/
    BYTE fileFormat;               /* always decimal 50 */
    BYTE reserved;
    BYTE softwareRev[6];
    BYTE spare1[20];    

    /* digitizer parameters */
    /************************/
    WORD  sampleRate;              /* in Ksamples/sec */
    WORD  numChannels;             /* 1-4 */
    WORD  bitsPerPixel;            /* 8 or 12 */
    WORD  pixelsPerChannelPerPing; /* (WORD COUNT) */
    float speedOfSoundInWater;     /* two way travel time in meters/sec */
    float noLongerUsed;
    WORD  asyncChannelNumber;      /* if 8 no async chan. otherwise, asynchronous */
    WORD  numSonarChannels;        /* 1 to 4 */
    WORD  ch1_processingAvailable;
    WORD  ch2_processingAvailable;
    WORD  ch3_processingAvailable;
    WORD  ch4_processingAvailable;

                  /* nav system parameters */

    WORD  timeDelay;                /* tenths of seconds */
    BYTE navSystemName[100];
    BYTE projectionType[12];
    BYTE spheriodType[12];
    WORD zone;
    float originLat;
    float originLong;
    float offsetLat;
    float offsetLong;
    WORD   navUnits;               /* 0 = meters */
                                   /* 1 = feet */
                                   /* 2 = yards */
                                   /* 3 = degrees */


                  /* site parameters */

    WORD  diveNumber;
    WORD  blockNumber;
    WORD  trackNumber;
    WORD  runNumber;
    BYTE spare4[100];

    /* annotation */
    BYTE operatorAnnotation[100];
    BYTE sonarName[40];


    /* sonar parameters */
    /************************/
    WORD triggerDirection;         /* -1 is neg, 0 is equal, 1 isos */
    DWORD triggerMagnitude;
    float triggerWidth;

    WORD ch1_frequency;            /* in kHz */
    WORD ch2_frequency;
    WORD ch3_frequency;
    WORD ch4_frequency;

    float ch1_horizBeamAngle;      /* degrees */
    float ch2_horizBeamAngle;
    float ch3_horizBeamAngle;
    float ch4_horizBeamAngle;

/* name of this file */

   char thisFileName[45];
/* which channels are half wave rectified */
/* -------------------------------------- */
   WORD  ch1_halfWaveRectify;
   WORD  ch2_halfWaveRectify;
   WORD  ch3_halfWaveRectify;
   WORD  ch4_halfWaveRectify;

    /* left over */
    BYTE spare5[486];

};


struct qmips_sonar
{
/* time and date stamp */
     BYTE day;
     BYTE month;
     BYTE year;
     BYTE hour;
     BYTE minute;
     BYTE seconds;
     WORD tenthsSeconds;

/* misc. info */

    BYTE fileName[12];
    WORD pingNumber;
    WORD asyncByteOffset;     /* when non-zero, indicates where  */
                              /* sync (subbottom) channel starts */
    BYTE spare1[12];

/* digitizer parameters */

    BYTE spare2[4];
    float timeInterval;       /* multiplier (fraction) to make window in time
                                 of an uncorrected channel */
    float APaltitude;         /* altitude from array processor
                                 computed from water column */
    WORD  triggerChannel;  
    WORD  altSource;          /* which altitude to use:
                                    0 = from telemetry
                                  1-4 = channel 1-4 water column
                                    5 = manual entry */
    DWORD waterColumn;
    DWORD triggerPeriod;
    WORD  ch_1signalDivisor;  /* chan 1 signal divisor multiply by 100 */ 
    float telemFishDepth;     
    float telemFishHeading;   
    float telemFishPitch;     
    float telemFishRoll;      
    float telemFishAlt;       /* meters - comes from manual entry or */
                              /* towfish telem.                      */
    BYTE  spare3[10];

    /* sonar parameters */
   
    BYTE  ch1_spare4[8];
    WORD  ch1_bandWidth;      /* in kilohertz     */
    WORD  ch1_sampleScheme;
    WORD  ch1_rangeScale;     /* meters */
    WORD  ch1_gain;
    WORD  ch1_pulseWidth;     /* microseconds */
    WORD  sampleRate;
    WORD  ch1_corrected;      /* boolean */

    BYTE  ch2_spare4[8];
    WORD  ch2_bandWidth;      /* in kilohertz */
    WORD  ch2_sampleScheme;
    WORD  ch2_rangeScale;     /* meters */
    WORD  ch2_gain;
    WORD  ch2_pulseWidth;     /* microseconds */
    WORD  ch2_spare;
    WORD  ch2_corrected;      /* boolean */

    BYTE  ch3_spare4[8];
    WORD  ch3_bandWidth;      /* in kilohertz */
    WORD  ch3_sampleScheme;
    WORD  ch3_rangeScale;     /* meters */
    WORD  ch3_gain;
    WORD  ch3_pulseWidth;     /* microseconds */
    WORD  ch3_spare;
    WORD  ch3_corrected;      /* boolean */
    
    BYTE  ch4_spare4[8];
    WORD  ch4_bandWidth;      /* in kilohertz */
    WORD  ch4_sampleScheme;
    WORD  ch4_rangeScale;     /* meters */
    WORD  ch4_gain;
    WORD  ch4_pulseWidth;     /* microseconds */
    WORD  ch4_spare;
    WORD  ch4_corrected;      /* boolean */


                /* nav system parameters */

    BYTE nav_sensor[4];       /* sensor code */
    WORD eventNumber;
    BYTE station_1_code;      /* station code data as */
                              /* BYTE station_2_code; */
    BYTE station_3_code;
    BYTE station_4_code;

    float range_1;            /* ranges to the nav stations/
    float range_2;
    float range_3;
    float range_4;

/* #define nav_telemetry.latitude *((double)&nav_telemetry.navEasting) */
/* re-use easting and northing variable space for latitude.            */
/* If a system collects XY data pairs,                                 */
/* then the navEasting and navNorthing fields would been commented and */
/* set to floats.                                                      */

    /*float navEasting;       /* (x) in meters */ 
    /*float navNorthing;      /* (y) in meters */ 
    double navEasting;        /* USGS uses lat & lon */

    float navDepth;           /* (z) in meters */

    float navRMS;             /* root mean square -- quality factor of nav solution */
    float navFishHeading;     /* degrees */
    float navFishSpeed;       /* knots */
    float navShipGyro;        /* degrees */

    DWORD navFixNumber;       /* sequential value */

    double navLongitude;      /* double precision */

    BYTE spare6[2];           /* alphanumeric */

    BYTE navFixHour;
    BYTE navFixMinute;
    BYTE navFixSeconds;
    BYTE navSpare;

    WORD  julianDay;  /* cable out */
    WORD  layback;

};

DSP

This is the file header and ping trailer that accompany the DSP (digital signal processor) files. The format is essentially the same as the analog QMIPS(TM) files except that the file header (dsp_header) is 2048 bytes. Again, a 256 byte trailer (dsp_sonar) accompanys each ping. Some of the fields have different names in the QMIPS-DSP(TM) trailer as compared to the QMIPS(TM) trailer.
struct dsp_header {

                 /* header record */
                                                             /* offset in bytes*/
   BYTE     fileFormat;       /* will be 50 */                     /* 0 */
   BYTE     systemType;       /* will be 84 for Q-MIPS DSP */      /* 1 */
   BYTE     softwareRev[6];                                        /* 2 */
   BYTE     spare1[18];                                            /* 8 */
   
   /* digitizer parameters */

   DWORD     sampleRate;      /* in samples/sec */                 /* 26 */
   WORD     numImageryChannels;      /* 1-8 */                     /* 30 */
   WORD     bitsPerPixel;            /* 8 or 16/                   /* 32 */
   WORD     pixelsPerChannelPerPing; /* (WORD COUNT) */            /* 34 */
   float    speedOfSoundInWater;     /* two way travel time/sec */ /* 36 */
   float    noLongerUsed;            /* used toe initial */        /* 40 */
                                     /* SonarSignalDivisor */
                                     /* before5.19 */
   WORD     asyncChannelNumber;      /* if 0, no async chan.*/      /* 44 */
                                     /* otherwise, which */
                                     /* channels asynchronous */
   WORD     numSonarChannels;        /* 1-4 */                      /* 46 */
   WORD     ch1_processingAvailable;                                /* 48 */
   WORD     ch2_processingAvailable;                                /* 50 */
   WORD     ch3_processingAvailable;                                /* 52 */
   WORD     ch4_processingAvailable;                                /* 54 */
   
   /* nav system parameters */
   /*-----------------------*/
   WORD     timeDelay;               /* tenths of seconds */        /* 56 */
   BYTE     navSystemName[100];                                     /* 58 */
   BYTE     projectionType[12];                                     /* 158 */
   BYTE     spheriodType[12];                                       /* 170 */
   WORD     zone;                                                   /* 182 */
   float    originLat;                                              /* 184 */
   float    originLong;                                             /* 188 */
   float    offsetLat;                                              /* 192 */
   float    offsetLong;                                             /* 196 */
  
 WORD     navUnits;           /* 0 = meters, 1 = feet, */           /* 200 */
                              /* 2 = yards, 3 = degrees */
    /* site parameters */
 
   WORD     diveNumber;                                             /* 202 */
   WORD     blockNumber;                                            /* 204 */
   WORD     trackNumber;                                            /* 206 */
   WORD     runNumber;                                              /* 208 */
   BYTE     spare4[100];                                            /* 210 */
   
   /* annotation */

   BYTE     operatorAnnotation[100];                                /* 310 */
   BYTE     sonarName[40];                                          /* 410 */
   
   /* sonar parameters */

   WORD     triggerDirection;      /* -1 is neg, 0 is equal, 1 is ' */
   DWORD    triggerMagnitude;                                       /* 452 */
   float    triggerWidth;                                           /* 456 */
   
   WORD     ch1_frequency;         /* in kHz */                     /* 460 */
   WORD     ch2_frequency;                                          /* 462 */
   WORD     ch3_frequency;                                          /* 464 */
   WORD     ch4_frequency;                                          /* 466 */
   
   float    ch1_horizBeamAngle;  /*degrees, read from DSP.DAT file*//* 468 */
   float    ch2_horizBeamAngle;                                     /* 472 */
   float    ch3_horizBeamAngle;                                     /* 476 */
   float    ch4_horizBeamAngle;                                     /* 480 */
   
   /* name of this file */
   /*-------------------*/
   char     thisFileName[45];                                       /* 484 */
   char     reserved2;                                              /* 529 */
   
   /* which channels are half-wave rectified */
   /*----------------------------------------*/
   WORD     ch1_halfWaveRectify;                                    /* 530 */
   WORD     ch2_halfWaveRectify;                                    /* 532 */
   WORD     ch3_halfWaveRectify;                                    /* 534 */
   WORD     ch4_halfWaveRectify;                                    /* 536 */


   /* Sonar Transducer Tilt Angles (off horizontal) */

   float    ch1_tiltAngle;  /* in degrees, read from SP.DAT file */ /* 538 */
   float    ch2_tiltAngle;                                          /* 542 */
   float    ch3_tiltAngle;                                          /* 546 */
   float    ch4_tiltAngle;                                          /* 550 */

   float    ch1_beamWidth_3dB; /*in degrees, read from DSP.DAT file*/ /* 554 */
   float    ch2_beamWidth_3dB;                                      /* 558 */
   float    ch3_beamWidth_3dB;                                      /* 562 */
   float    ch4_beamWidth_3dB;                                      /* 566 */

   float    ch1_realSampleRate;                                     /* 570 */
   float    ch2_realSampleRate;                                     /* 574 */
   float    ch3_realSampleRate;                                     /* 578 */
   float    ch4_realSampleRate;                                     /* 582 */

   /* left over */
   /*-----------*/
   BYTE     spare5[438];                                            /* 586 */

   
};


struct dsp_sonar {
 
/*  If  not  all channels are being used, the remaining channels */
/*  still contain 0's for all fields.                            */

   /* time and date stamp */

   BYTE     day;
   BYTE     month;
   BYTE     year;
   BYTE     hour;
   BYTE     minute;
   BYTE     seconds;
   WORD     tenthsSeconds;
   
   /* misc. info */
  
   float    magX;
   float    magY;
   float    magZ;

   DWORD    pingNumber;

   WORD     asyncByteOffset;       /* when non-zero, indicates a */
   WORD     shipSpeed;             /* speed of ship (knots * 100)*/

   float    auxVal1;
   float    auxVal2;
   float    auxVal3;


   /* digitizer parameters */

   float    auxVal5;               /* Auxilary value from serialnput */
   float    auxAltitude;           /* auxiliary altitude from subbottom sensor */

   WORD     triggerChannel;  
   WORD     altSource;             /* which altitude to use: 0 =from telemetry, 
                                   1-4 = channel 1-4 waterolumn,
                                   5=manual entry */
   DWORD    waterColumn;           /* # samples in water column/
   DWORD    triggerPeriod;         /* # samples in trigger period/
   WORD     ch1_signalDivisor;     /* chan 1 signal divisor multiplied by 100 */
   
   /* telemetry from towfish */

   float    telemFishDepth;        /* meters */ 
   float    telemFishHeading;      /* degrees */
   float    telemFishPitch;        /* degrees */
   float    telemFishRoll;         /* degrees */
   float    telemFishAlt;          /* meters - from QMIPS altitude tracker */
   float    telemSbotAlt;          /* meters - from subbottom sensor */
   float    telemSpeedLog;         /* from EM speed log */
   WORD     soundVelocity;         /* compute speed of sound * 30 one-way) */
   
   /* sonar parameters */

   float    ch1_floatRawRange;
   float    ch1_delayRange;
   WORD     ch1_bandWidth;         /* in kHz */
   WORD     ch1_sampleScheme;
   WORD     ch1_rawRange;          /* (m) range of uncorrected channel */
   BYTE     ch1_initialGain;
   BYTE     ch1_gain;
   WORD     ch1_correctedRange;    /* (m) range of corrected channel */
   float    ch2_floatRawRange;
   float    ch2_delayRange;
   WORD     ch2_bandWidth;         /* in kHz */
   WORD     ch2_sampleScheme;
   WORD     ch2_rawRange;          /* (m) range of uncorrected channel */
   BYTE     ch2_initialGain;
   BYTE     ch2_gain;
   WORD     ch2_unused;
   WORD     ch2_signalDivisor;     /* signal divisor * 100 */
   WORD     ch2_correctedRange;    /* (m) range of corrected channel */
                                   /* On any async channel, corrected Range */
                                   /* holds the async delay in meters * 100 */
   float    ch3_floatRawRange;
   float    ch3_delayRange;
   WORD     ch3_bandWidth;         /* in kHz */
   WORD     ch3_sampleScheme;
   WORD     ch3_rawRange;          /* (m) range of uncorrected channel */
   BYTE     ch3_initialGain;
   BYTE     ch3_gain;
   WORD     range_to_fish;         /* stored * 10 */
   WORD     ch3_signalDivisor;
   WORD     ch3_correctedRange;    /* (m) range of corrected channel */
   float    ch4_floatRawRange;
   float    ch4_delayRange;
   WORD     ch4_bandWidth;         /* in kHz */
   WORD     ch4_sampleScheme;
   WORD     ch4_rawRange;          /* (m) range of uncorrected channel */
   BYTE     ch4_initialGain;
   BYTE     ch4_gain;
   WORD     bearing_to_fish;       /* stored as degrees * 100 */
   WORD     ch4_signalDivisor;     /* signal divisor * 100 */
   WORD     ch4_correctedRange;    /* (m) range of corrected channel */
   
   /* nav system parameters */
 
   WORD     waterTemperature;      /* water temp * 100 */
   int      currentLineIdentifier;
   int      eventNumber;

   float    auxVal6;
 
   double   shipLatitude;
   double   shipLongitude;
      float    navEasting;     /* (x) in meters */
   float    navNorthing;           /* (y) in meters */
   
   float    cableTension;     
   
   float    conductivity;          /* water conductivity */
   float    navFishHeading;        /* degrees */
   float    navFishSpeed;          /* knots */
   float    navShipGyro;           /* degrees */
   
   float    auxVal4;
   double   navLongitude;          /* longitude of fish */

   WORD     fishLayback;
   BYTE     navFixHour;
   BYTE     navFixMinute;
   BYTE     navFixSeconds;
   BYTE     onLineFlag;
   WORD     julianDay;             /* when supplied by nav system/
   WORD     cableOut;              /* entered in NAV menu */
   
};


To sidescan sonar field data listing

Return to R/V CAPE HENLOPEN 94-12 home page.