
/*
   FILE:  transect.h

	  Structures and declarations common to more than one 
	  transect format.

*/

#include <dbext.h>
#include <adcp.h>

#define OK 0
#define MAX_BINS 128

typedef struct
{
   SHORT 	u, 		/* ew_smoothed_vel */
  		v;		/* ns_smoothed_vel */
   LONG 	x,		/* ew_displacement, range = -2,147,483,648 to 2,147,483,647 cm */
   		y; 		/* ns_displacement, range = -2,147,483,648 to 2,147,483,647 cm */
   ULONG 	distance;	/* distance_travelled, range = 0 to 4,294,967,295 cm */
   LONG 	lat,		/* mean_latitude, range = -2,147,483,648 to 2,147,483,647  */
   		lon;		/* mean_longitude, range = -2,147,483,648 to 2,147,483,647  */
   USHORT 	filter_width;	/* nav_filter_width, range = 0 to 65535 s */
}  TRANSECT_NAV_TYPE;  

#define TRANSECT_NAV_SIZE 26	/* without alignment padding */

typedef struct
{
   CONFIGURATION_1_TYPE  conf1;
   ANCILLARY_1_TYPE      anc1;
   ANCILLARY_2_TYPE      anc2;
   ACCESS_VARIABLES_TYPE acc;
   BOTTOM_TRACK_TYPE     bt;
   NAVIGATION_TYPE       nav;
   DEPTH_RANGE_TYPE      depth_range;
   FLOAT                 depth[MAX_BINS];
   UBYTE                 pf[MAX_BINS];
   UBYTE                 bc_nbytes;  /* block comments */
   UBYTE                 blkvar_has_changed; /* flag to start new block */
   CHAR                 *bc;   /* direct commands */
}  DB_ENSEMBLE_TYPE;
