head	1.3;
access;
symbols
	ST_10_5:1.2
	ST_10_4b:1.2
	ST_10_4:1.2
	ST_10_3:1.2
	ST10_HW:1.2
	ST_10_2:1.2
	ST_10_1:1.2
	ST_10_0:1.2
	AUTONOMY_BRANCH:1.2.0.2
	AUTONOMY:1.2
	AUTONOMY-2008_07_30:1.2;
locks; strict;
comment	@// @;


1.3
date	2008.10.13.16.47.49;	author rob;	state Exp;
branches;
next	1.2;

1.2
date	2008.07.15.19.23.16;	author headley;	state Exp;
branches;
next	1.1;

1.1
date	2008.06.12.19.36.03;	author rob;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Changed the name of the mnemonic to be different than the log file name.
@
text
@/****************************************************************************/
/* Copyright (c) 2008 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  : Camera Log Class                                              */
/* Filename : CameraLog.cc                                                  */
/* Author   : rsm                                                           */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 05/01/2008                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/

#include "CameraLog.h"
#include "CameraDriver.h"

/** Initializing constructor.
    @@param camera Camera instance
    @@param fileFormat Data log file format

*/
CameraLog::CameraLog(Camera *camera, 
		     DataLog::FileFormat fileFormat)
   : _driver(camera), _simServer(0),
    DataLogWriter(CameraLogName, fileFormat, AutoTimeStamp)
{
   init();
}
/** Initializing constructor.
    @@param camera Camera instance
    @@param fileFormat Data log file format    
*/
CameraLog::CameraLog(SimulatedCameraServer *camera, 
		     DataLog::FileFormat fileFormat)
  : _driver(0), _simServer(camera),
    DataLogWriter(CameraLogName, fileFormat, AutoTimeStamp)
{
   init();
}
/** Initialize camera log.*/
void CameraLog::init()
{
  setMnemonic("cam.data");

  addField( _num = new IntegerData("cam.number") );

  addField((_lat   = new DoubleData("cam.latitude")));
  addField((_lon   = new DoubleData("cam.longitude")));
  addField((_depth = new DoubleData("cam.depth")));
  addField((_dmg   = new DoubleData("cam.dmg")));
  _lat->setAsciiFormat("%5.8f");       
  _lon->setAsciiFormat("%5.8f");       

}
/**Default destructor */
CameraLog::~CameraLog()
{
}

/**set data fields */
void CameraLog::setFields()
{
   double lat, lon, depth, alt;

   if( _driver )
   {
      _num->setValue( _driver->_photoCntr );
      _lat->setValue( _driver->_position.latitude );
      _lon->setValue( _driver->_position.longitude );
      _depth->setValue( _driver->_position.z );
      _dmg->setValue( _driver->_dmg );
   }
   else if( _simServer )
   {
#if 0
      _num->setValue( (short)_simServer->_cameraOutput->data.FireCamera );
      _lat->setValue( lat );
      _lon->setValue( lon );
      _depth->setValue( depth );
#endif
   }

}

@


1.2
log
@adding camera control modules previously maintained under the biauv CVS repository.

The AUV camera drivers have been modified to use the camera control modules, and to include doxygen formatted comments
@
text
@d46 1
a46 1
  setMnemonic("camera.data");
d48 1
a48 1
  addField( _num = new IntegerData("camera.number") );
d50 4
a53 4
  addField((_lat   = new DoubleData("camera.latitude")));
  addField((_lon   = new DoubleData("camera.longitude")));
  addField((_depth = new DoubleData("camera.depth")));
  addField((_dmg   = new DoubleData("camera.dmg")));
@


1.1
log
@Initial commit.  Basic server/driver framework to call the camera control code.
@
text
@d1 16
a16 9
////////////////////////////////////////////////////////////////////////////////
//
// PURPOSE:  DropWeight Log Class.
// AUTHOR:   Rob McEwen.
// DATE:     04/2/6
// COMMENTS: 
//
////////////////////////////////////////////////////////////////////////////////
//
d20 5
d32 4
d43 1
a43 1

d46 1
a46 1
  setMnemonic("cam.data");
d48 1
a48 1
  addField( _num = new IntegerData("cam.number") );
d50 4
a53 4
  addField((_lat   = new DoubleData("cam.latitude")));
  addField((_lon   = new DoubleData("cam.longitude")));
  addField((_depth = new DoubleData("cam.depth")));
  addField((_dmg   = new DoubleData("cam.dmg")));
d58 1
a58 2


d63 1
a63 1

@

