#ifndef _GPSLOG_H
#define _GPSLOG_H

#include "DataLogWriter.h"
#include "DoubleData.h"
#include "IntegerData.h"
#include "CharData.h"
#include "ShortData.h"

class GPS;

#define GPSLogName "gps"

/*
CLASS 
GPSLog

DESCRIPTION
Logs GPS data through the DataLogWriter interface.

To use this class, instantiate an instance within a GPS object
and periodically invoke the write() method:
<pre>

  GPSLog *log = new GPSLog(this, DataLog::AsciiFormat);

  [...other stuff...]

  // Log the data
  log->write();

</pre>
AUTHOR
John O'Rieffel
*/
class GPSLog : public DataLogWriter {

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  // [input] navigation: GPS object. The setFields() method
  //         accesses this object as the source of the logged data.
  // [input] fileFormat: Specifies either DataLog::AsciiFormat or 
  //         DataLog::BinaryFormat.
  GPSLog(GPS *gps, DataLog::FileFormat fileFormat); 

  ~GPSLog();

protected:

  ///////////////////////////////////////////////////////////////////
  // Set values in record array elements. This virtual method is called
  // by DataLogWriter::write()
  virtual void setFields();

  ///////////////////////////////////////////////////////////////////
  // setFields() accesses the data to be logged from this GPS 
  // object.
  GPS *_gps;


 private:

		  
  IntegerData *_UTCTime;
  DoubleData *_lat;
  CharData *_NSHem;
  DoubleData *_longt;
  CharData *_EWHem;
  ShortData *_qual;
  ShortData *_numSat;
 // DoubleData *_hdop;
 // DoubleData *_antH;
 // DoubleData *_geoH;
 // ShortData *_dgpsDA;
  //ShortData *_dgpsRSID;

};

#endif
