/****************************************************************************/
/* Copyright (c) 2003 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : MtiLog.h                                                      */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 09/01/2006                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _MTILOG_H
#define _MTILOG_H

#include "DataLogWriter.h"
#include "DoubleData.h"

class MtiDriver;

#define MtiLogName "Mtilog"

/*
CLASS 
MtiLog

DESCRIPTION
Logs Mti Motion sensor data through the DataLogWriter interface.

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

  MtiLog *log = new MtiLog(this);

  [...other stuff...]

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

</pre>
AUTHOR
Rich Henthorn
*/
class MtiLog : public DataLogWriter {

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  MtiLog(MtiDriver *mti, DataLog::FileFormat fileFormat); 

  ~MtiLog();

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 CTD 
  // object.
  MtiDriver *_mti;


private:

  DoubleData *_accX;
  DoubleData *_accY;
  DoubleData *_accZ;

  DoubleData *_gyrX;
  DoubleData *_gyrY;
  DoubleData *_gyrZ;

  DoubleData *_magX;
  DoubleData *_magY;
  DoubleData *_magZ;

  DoubleData *_q0;
  DoubleData *_q1;
  DoubleData *_q2;
  DoubleData *_q3;

};

#endif
