SonTek/YSI
ADVField Software Manual (September 1, 2001) 67
Appendix 2. ADV Real-Time Binary Data File Format
This appendix describes the format of the binary files generated by the ADV data acquisition
software. The format is the same for all ADV configurations.
A2.1. Overview of Binary File Format
There are four basic data types in the ADV real-time binary files: file configuration, data sample,
event counter, and analog input sample.
• File Configuration Structure (578 bytes)
• Data Sample 1 (18-30 bytes)
• Event Counter 1 (2 bytes)
• Data Sample 2 (18-30 bytes)
• Event Counter 2 (2 bytes)
• ! ! ! ! !
• Data Sample N (18-30 bytes)
• Event Counter N (2 bytes)
A2.1.1 File Configuration Structure
ADV system configuration data is recorded once at the beginning of each binary data file. The
file configuration structure is split into two areas: user setup parameters (324 bytes) and probe
configuration parameters (254 bytes). The User Setup and Probe Configuration structure defini-
tions are given below in the C language code used to access the data files.
User Setup Structure
(324 bytes)
typedef struct {
char SoftVer[8];
DateTimeType StartTime;
unsigned char ProbeStatus[8]; /* 1 if installed, 0 if not */
unsigned char CpuSoftwareVerNum;
unsigned char DspSoftwareVerNum;
char AdvType; /* 0-10MHz,5cm 1-10MHz,10cm 2-OCEAN */
char SensorOrientation; /* 0-down; 1-up; 2-side */
char CompassInstalled; /* 0-No; 1-Yes */
char RecorderInstalled; /* 0-No; 1-Yes */
char TempInstalled; /* 0-No; 1-Yes */
char PressInstalled; /* 0-No; 1-Yes */
long PressScale; /* nano bar per count */
long PressOffset; /* micro bar */
int CompassOffset; /* Degress to East of North */
unsigned char Spare[6];
int UN; /* Units System 0-Metric 1-English */
float Temp, /* Water Temperature */
Sal, /* Water Salinity */
Cw, /* Speed of Sound */
SR; /* Sampling Rate */
int Ivr; /* Velocity range list index */
int Isy; /* External synchronization */
int AdOn; /* A/D enable flag */
int CoordSystem; /* Coordinate system; 1-xyx; 2-enu */
int Spare2; /* Spare field */
char RF[40]; /* Recording file name */
char FC1[60], /* File Comments 1 */
FC2[60], /* File Comment 2 */
FC3[60]; /* File Comment 3 */
char AdvSysPar[10];
char AdvProcPar[18];
} UserSetupType;