#define RCV_PORT 2002 #define ARCHIVER_ADDR 0x59000062 /* archiver ethernet address */ /******************************************************************** Sidescan data format ********************************************************************/ #define MAX_VRU_SAMP 1000 #define MAX_SS_SAMP 10000 #define MAX_PIXELS 1000 #define MAX_GATES 121 struct ss_header{ char ss[2]; /* "SS" record identifier */ int tot_len; /* Total length (bytes) of SS record */ int head_len; /* length of header in bytes */ int pixel_len; /* length of pixel data in bytes */ int ss_len; /* length of raw sidescan data in bytes */ int vru_len; /* length of VRU data in bytes */ int gate_len; /* length of gate data in bytes */ char format_id; /* Always 0 for now */ int ping_num; /* ping number */ short julian; /* julian date */ short time_hour; /* hour */ short time_min; /* min */ short time_sec; /* sec */ short time_dec; /* tenth of seconds */ short lat_deg; /* latitude degree */ short lat_min; /* latitude min */ short lat_sec; /* latitude sec */ short lon_deg; /* longitude degree */ short lon_min; /* longitude min */ short lon_sec; /* longitude sec */ short speed; /* ship speed .1 Knots */ short head; /* ship heading .1 Degrees */ short mode; /* sonar opperating mode */ char ping_len; /* transmit pulse length (msec) */ short samp_rate; /* hydrophone sampling rate (.1 usec) */ short start_slice; /* first time slice number */ short tot_slices; /* total time slices */ short int gate_count; /* number of beams/gates (61 or 121) */ short int pixel_count; /* number of pixels (1000) */ short int year; /* 1992 to 2099 Rev 3.08 */ short int pixel_size; /* meters/pixel Rev 3.08 */ short int grey_min; /* dB grey scale min Rev 3.08 */ short int grey_max; /* dB grey scale max Rev 3.08 */ short int ssv; /* surface sound velocity Rev 3.10 */ /* [velocity (meters/sec) * 10] */ }; struct vru_dat{ short slice; /* VRU sample time mark */ short roll; /* roll .01 degree */ short pitch; /* pitch .01 degree */ short heave; /* heave .01 meter */ short dheave; /* delayed heave .01 meter */ }; struct vru_record{ char sa[2]; /* "SA" ship attitude record ID */ int len; /* number of VRU samples */ short id; /* format ID (0 for now) */ short samp_rate; /* hydrophone sample rate */ struct vru_dat data[MAX_VRU_SAMP]; /* VRU data samples */ }; struct ss_dat{ short slice; /* hydrophone sample time mark */ short num_hits; /* number of 'hits' (always 2 for now */ short median; /* median beam power truncated IEEE float */ short ang[2]; /* hit angles ( radians * 65536/pi ) */ short amp[2]; /* hit amplitudes truncated IEEE float */ }; struct gray_info{ /* int num_pixels; */ /* number of grayscale pixels */ char data[ (MAX_PIXELS+1)/2 ]; /* pixel data (two 4-bit pixels/byte) */ }; struct gate_info{ short start; /* gate start sample number */ short stop; /* gate stop sample number */ }; struct ss_archive{ int bytes; /* *** total number of bytes in message */ int dat_type; /* *** data message type (always 2) */ int recv_time; /* *** receive time... (4 byte hour,min,sec,1/10 sec) */ struct ss_header header; /* header */ struct gray_info gray; /* grayscale pixel info */ struct ss_dat hits[MAX_SS_SAMP]; /* raw sidescan data */ struct vru_record vru; /* VRU data */ struct gate_info gates[MAX_GATES]; /* gates */ char crlf[2]; /* CR / LF pair */ int checksum; /* checksum (*** fields not included in checksum) */ }; /********************************************************************** fields marked with *** are added by the hydrophone archiving program and are not sent by the host computer **********************************************************************/ /******************************************************** * * int check_sum( char *cptr, int size ){ * int i; * int checksum = 0; * * for( i=0; i