'sonar' has the basic structure: sonar = filename: {42x1 cell} dasinfo: [1x1 struct] cov0: [170x1440x4 double] int0: [170x1440x4 double] cov: [170x1440x4 double] int: [170x1440x4 double] covs: [170x1440x4 double] covs0: [170x1440x4 double] TDS: [1x1 struct] datenum: [1x1440 double] sn: [170x1440 double] nbins: 170 ranges: [170x1 double] depths: [170x1 double] beamvel: [170x1440x4 double] u: [170x1440 double] w: [170x1440 double] u_z: [170x1440 double] nav: [1x1440 double] U: [170x1440 double] U_z: [170x1440 double] yday: [1x1440 double] lat: [1x1440 double] lon: [1x1440 double] Header data filename The basenames of sonar raw and covariance files whose data are contained in this sonar struct are stored in this cell array dasinfo HDSS-specific setup variables are stored here, organized in exact parallel to the binary C data structure. TDS Time Domain Server, contains all recorded environmental sensor data, including GPS and VRU (vertical reference unit) Covariance data (cov, int, etc.) Using the raw digital output of the sonar receivers, a lagged autocovariance of the received signal is computed. The result, which contains Doppler phase shift information, is averaged by range bin (time gate) and stored in cov. A zero-lag autocorrelation, which represents the sonar backscatter intensity, is stored in int. The autocovariance procedure incorporates an matched filter which improves detection at the maximum ranges of the sonar. This filter attempts to search near an 'expected phase shift' caused by ship motions. The IIR time filter used to center the matched filter can cause filtering errors due to a bottom hit or sudden ship motions to persist over a period of several pings. Therefore, the unfiltered covariances and intensities, indicated by a following '0', e.g., cov0, should be used when the ship is in shallow water or where ship's navigation data contain repeated spikes. To allow for precise averaging across pings, a motion correction algorithm is also applied to the single ping covarince data. The correction estimator is produced from the ship's VRU (vertical reference unit) inertial measurements. This corrected data, stored in covs (and covs0), is the default version used in all subsequent velocity computations. Velocities exist in three successive reference frames: Beam coordinates: beamvel, ranges Positive-inward Doppler velocity detected by each beam (1–4) are computed from binned, motion-corrected covariance data (covs) and stored in beamvel. The indices of sonar.beamvel are [bin x time x beam]. Ship coordinates: u, w, u_z, depths Velocities from the four sonar beams are combined into horizontal velocity u (Re + Im parts) and vertical velocity w in the ship's frame of reference. The ship frame is a right-handed coordinate system: Re u is pointed forward (toward the bow), Im u is across (toward the port side), and w is positive up. Vertical shear (du/dz) is placed in the field u_z. Indices are [bin x time]. Earth coordinates: U, w, U_z, depths Using the heading and navigation information from the ship's GPS units and Vertical Reference Unit (VRU), the horizonal ship frame velocities u are transformed to earth frame velocities U (Re = East, Im = North) and vertical shear of horizontal velocity (U_z). Indices are [bin x time]. Several useful fields are also included at the root level of sonar (datenum, yday, lat, lon): datenum the TDS timestamp, in matlab datenum format. In multiple-ping-averaged sonar data, timestamps represent the time of the first ping included in the average. yday The decimal yearday, which includes a integer day (Jan 1 = yday 1) and a decimal part of days since midnight. lat/lon/nav Navigation data as recorded by the ship's GPS. nav is the ship's velocity (u + iv) in Earth coordinates.