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

KvhCompassLog::KvhCompassLog( KvhCompassDriver *driver,
			      DataLog::FileFormat format )
  : DataLogWriter( KvhCompassLogName, format, AutoTimeStamp )
{
  setMnemonic("kvhCompass");

  addField( (_yaw        = new AngleData("yaw")) );
  addField( (_yawRate    = new AngleData("yawRate")) );

  _driver = driver;
}  

KvhCompassLog::~KvhCompassLog()
{
  delete _yaw;
  delete _yawRate;
}

void KvhCompassLog::setFields()
{
  _yaw->setValue(   _driver->_output->data.heading   );
  _yawRate->setValue(   _driver->_output->data.headingRate   );

}
