/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : CrossbowAHRSServer.h                                          */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*-----------------------------------------------------------------------*
  CLASS: CrossbowAHRSServer

  DESCRIPTION: Server for AHRS-style data from the Crossbow

  $Id: CrossbowAHRSServer.h,v 1.2 2000/02/07 23:52:41 pean Exp $
  *-----------------------------------------------------------------------*/

#ifndef _CrossbowAHRSServer_H
#define _CrossbowAHRSServer_H

#include "AHRSIF_SK.h"
#include "AHRSOutput.h"

class CrossbowAHRSServer : public AHRSIF_SK {
     
public:
     
     CrossbowAHRSServer();
     ~CrossbowAHRSServer();
     
protected:
     
     //-----------------------------------------------------------------------
     // Get all three axes (all in deg)
     // [output] heading: heading
     // [output] roll: roll
     // [output] pitch: pitch
     virtual long attitude(double *roll, double *pitch, double *heading,
			   long *time );

     //-----------------------------------------------------------------------
     // Get roll value and rate (deg and deg/S)
     // [output] roll: roll
     // [output] rollRate: roll rate
     virtual long roll(double *roll, double *rollRate,
		       long *time );

     //-----------------------------------------------------------------------
     // Get pitch value and rate (deg and deg/S)
     // [output] pitch: pitch
     // [output] pitchRate: pitch rate
     virtual long pitch(double *pitch, double *pitchRate,
			long *time );

     //-----------------------------------------------------------------------
     // Get heading value and rate (deg and deg/S)
     // [output] heading: heading
     // [output] headingRate: heading rate
     virtual long heading(double *heading, double *headingRate,
			  long *time );

     //-----------------------------------------------------------------------
     // Get all three axis rates (all in deg/S)
     // [output] rollRate: Roll rate
     // [output] pitchRate: Pitch rate
     // [output] headingRate: Yaw rate
     virtual long angRates(double *rollRate, 
			   double *pitchRate, 
			   double *headingRate,
			   long *time );

     //-----------------------------------------------------------------------
     // Get everything
     // [output] roll, pitch, heading
     // [output] rollRate, pitchRate, headingRate
     virtual long all(double *roll, 
		      double *pitch, 
		      double *heading, 
		      double *rollRate, 
		      double *pitchRate, 
		      double *headingRate,
		      long *time );

     /////////////////////////////////////////////////////////
     // Get heading value and rate
     // [output] value: Heading in degrees
     // [output] time: Sampling time
//  virtual long heading(double *value, double *rate, long *time);

     virtual int spawnAuxTasks();

     AHRSOutput *_output;
     AHRSOutput::Data _outputData;

};

#endif
