/****************************************************************************/
/* Copyright (c) 2020 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : ObsAvoidLog.h                                              */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 09/22/2020                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _ObsAvoidLog_H
#define _ObsAvoidLog_H

#include "DataLogWriter.h"
#include "FloatData.h"
#include "IntegerData.h"
#include "ShortData.h"

//#include "ObsAvoid.h"

#define ObsAvoidLogName "oa"

/*
CLASS
ObsAvoidLog

DESCRIPTION
Logs ObsAvoid data through the DataLogWriter interface.

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

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

  [...other stuff...]

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

</pre>
AUTHOR
*/
class ObsAvoidLog : public DataLogWriter {

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  ObsAvoidLog(DataLog::FileFormat fileFormat=BinaryFormat);

  ~ObsAvoidLog();

  struct oaLog
  {
     double pingtime;
     double roll;
     double pitch;
     double yaw;
     double depthCmdOut;
  };

  virtual void setFields( oaLog *oaData );

protected:

  void init(void);

private:

//  FloatData   *_dt_altitude;

  DoubleData *_pingtime;
  DoubleData *_roll, *_pitch, *_yaw;
  DoubleData *_depthCmdOut;
};

#endif
