/**---------------------------------------------------------------------------
 ** 
 ** scan.h -- 
 ** 
 ** Author          : Pierre Jaccard
 ** Created On      : 1999/07/15 15:20:21
 ** Last Modified By: Pierre Jaccard
 ** Last Modified On: 1999/07/16 20:00:00
 ** Update Count    : 7
 ** Directory       : /home/pego/pcd1/codas3c/gfi/src/libs/nav/
 ** Version         : 0.0
 ** Status          : Unknown
 ** ---------------------------------------------------------------------- ** 
 ** DESCRIPTION: 
 ** 
 **    See associated file scan.c
 ** 
 ** ---------------------------------------------------------------------- ** 
 ** REVISIONS: 
 ** ---------------------------------------------------------------------- ** 
 ** CHANGES: 
 **------------------------------------------------------------------------**/

#ifndef gfilib_nav_scan_already_included
#define gfilib_nav_scan_already_included

#include "geninc.h"
#include "use_db.h"
#include "nav.h"
#include "gfimisc.h"

typedef struct
{
	double start;
	double stop;
} SCAN_NAV_TIME_TYPE;

typedef struct
{
	DOUBLE_LL_TYPE start;
	DOUBLE_LL_TYPE stop;
} SCAN_NAV_POS_TYPE;

typedef struct
{
	double mean;
	double sdev;
	int    npts;
} SCAN_NAV_STAT_TYPE;

typedef struct
{
	SCAN_NAV_STAT_TYPE  heading;
	SCAN_NAV_STAT_TYPE  pitch;
	SCAN_NAV_STAT_TYPE  roll;
} SCAN_NAV_PRH_TYPE;

typedef struct
{
	SCAN_NAV_STAT_TYPE course;
	SCAN_NAV_STAT_TYPE speed;
} SCAN_NAV_SPEED_TYPE;

typedef struct
{
	USHORT number;
	SCAN_NAV_TIME_TYPE time;
	SCAN_NAV_POS_TYPE  pos;
	SCAN_NAV_PRH_TYPE  prh;
	SCAN_NAV_SPEED_TYPE spd;
} SCAN_NAV_LINE_TYPE;

#if PROTOTYPE_ALLOWED

int write_scan_nav_line(FILE *fp, SCAN_NAV_LINE_TYPE *scan, int year_base);
int read_scan_nav_line(FILE *fp, SCAN_NAV_LINE_TYPE *scan, int year_base);
int init_scan_nav_line(SCAN_NAV_LINE_TYPE *scan, int flag);

#else

int write_scan_nav_line();
int read_scan_nav_line();
int init_scan_nav_line();

#endif  /* PROTOTYPE_ALLOWED */

#endif /* gfilib_nav_scan_already_included */
