/* ---------------------------------------------------------------------- */ 
/* coverageMapping.h                                                      */ 
/*                                                                        */ 
/* ---------------------------------------------------------------------- */ 
/*                                                                        */ 
/* (c) Copyright 2005  EdgeTech,                                          */ 
/*                                                                        */ 
/* This file contains proprietary information, and trade secrets of       */ 
/* EdgeTech, and may not be disclosed or reproduced without the prior     */ 
/* written consent of EdgeTech.                                           */ 
/*                                                                        */ 
/* EdgeTech is not responsible for the consequences of the use or misuse  */ 
/* of this software, even if they result from defects in it.              */ 
/*                                                                        */ 
/* header file                                                            */ 
/* ---------------------------------------------------------------------- */ 

#if !defined(__COVERAGE_MAPPING_H__INCLUDED_)

#define __COVERAGE_MAPPING_H__INCLUDED_

#define _USE_32BIT_TIME_T


/* ---------------------------------------------------------------------- */ 
/* includes                                                               */ 
/* ---------------------------------------------------------------------- */ 

#include <time.h>

#include "MessageOffsets.h"



/* ---------------------------------------------------------------------- */ 
/* Message Types                                                          */ 
/* ---------------------------------------------------------------------- */ 
/* sonarMessage field indicates the type of data to follow.               */ 
/* ---------------------------------------------------------------------- */ 

typedef enum
{
  /* -------------------------------------------------------------------- */ 
  /* Coverage messages                                                    */ 
  /* -------------------------------------------------------------------- */ 

  /* No message defined yet (No Data)                                     */ 
  COVERAGE_MESSAGE_NONE = MESSAGE_OFFSET_COVERAGE,           

  /* coverage data (coverageEntryType)                                    */ 
  COVERAGE_MESSAGE_ENTRY, 

  /* coverage data (coverageGrayscaleEntryType) (grayscale data)          */ 
  COVERAGE_MESSAGE_DATA, 

  /* coverage configuration data (coverageConfigurationType)              */ 
  COVERAGE_MESSAGE_CONFIGURATION,

} CoverageMessageType;


/* ---------------------------------------------------------------------- */ 
/* coverage entry message structure                                       */ 
/* ---------------------------------------------------------------------- */ 

typedef struct
{
  /* Time in seconds since the dawn of time                               */ 
  time_t             time;

  /* Millieconds today                                                    */ 
  unsigned long int  millisecondsToday;

  /* ping number                                                          */ 
  unsigned long int  pingNumber;

  /* The system type configuration that the data was collected with.      */ 
  /* i.e. configurations are MPX, Subbottom, 4200. See SystemEnumType     */ 
  long               systemType;

  /* Serial number of system that collected the data                      */ 
  unsigned long      serialNumber;

  /* center frequency in Hz                                               */ 
  float              centerFrequency;

  /* heading in degrees                                                   */ 
  float              heading;

  /* slant range of sonar data in meters                                  */ 
  float              slantRange;

  /* altitude in meters                                                   */ 
  float              altitude;

  /* ground range of sonar data in meters                                 */ 
  float              groundRange;

  /* speed in knots                                                       */ 
  float              speed;

  /* Temperature degrees C)                                               */ 
  float              waterTemperature;   

  /* array longitude in minutes, or X in meters                           */ 
  float              fish_lon_X;

  /* array latitude in minutes, or Y in meters                            */ 
  float              fish_lat_Y;

  /* ship longitude in minutes, or X in meters                            */ 
  float              ship_lon_X;

  /* ship latitude in minutes, or Y in meters                             */ 
  float              ship_lat_Y;

  /* Units of coordinates -                                               */ 
  /* 1 - length (x / y) in meters                                         */ 
  /* 2 - Minutes                                                          */ 
  short int          coordUnits;    

  /* data channels 0 - none, 1 - port, 2 - starboard, 3 - port & starboard*/ 
  short int          channels;

  /* Unique pulse identifier                                              */ 
  unsigned short int pulseID;    

  /* Vehicle ID                                                           */ 
  short int          subSystem;     

  /* reserved for future use                                              */ 
  long int           reserved[7];

}  CoverageEntryType;



/* ---------------------------------------------------------------------- */ 

#endif  /* Not __COVERAGE_MAPPING_H__INCLUDED_                            */ 


/* ---------------------------------------------------------------------- */ 
/*                      end coverageMapping.h                             */ 
/* ---------------------------------------------------------------------- */ 


