/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : KvhInclinoLog.cc                                              */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#include "KvhInclinoLog.h"
#include "KvhInclinoDriver.h"

KvhInclinoLog::KvhInclinoLog( KvhInclinoDriver *driver,
			      DataLog::FileFormat format )
  : DataLogWriter( KvhInclinoLogName, format, AutoTimeStamp )
{
  setMnemonic("kvhInclin");

  addField( (_roll       = new AngleData("roll")) );
  addField( (_rollRate   = new AngleData("rollRate")) );
  addField( (_pitch      = new AngleData("pitch")) );
  addField( (_pitchRate  = new AngleData("pitchRateInc")) );

  _driver = driver;
}
  

KvhInclinoLog::~KvhInclinoLog()
{
  delete _roll;
  delete _rollRate;
  delete _pitch;
  delete _pitchRate;
}


void KvhInclinoLog::setFields()
{
  _roll->setValue(  _driver->_output->data.roll  );
  _pitch->setValue( _driver->_output->data.pitch );

  _rollRate->setValue(  _driver->_output->data.rollRate  );
  _pitchRate->setValue( _driver->_output->data.pitchRate );
}
