#ifndef _PANTILTATTITUDE_H
#define _PANTILTATTITUDE_H
static char PanTiltAttitude_h_id[] = "$Header: /usr/tiburon/unix/gui/tmacs/RCS/PanTiltAttitude.h,v 1.5 1997/06/05 14:41:50 oreilly Exp $";

/*
$Log: PanTiltAttitude.h,v $
Revision 1.5  1997/06/05 14:41:50  oreilly
Increased tilt range to +/- 50 deg

 * Revision 1.4  97/04/30  20:10:58  20:10:58  oreilly (Thomas C. O'Reilly)
 * *** empty log message ***
 * 
 * Revision 1.3  97/03/20  12:36:14  12:36:14  oreilly (Thomas C. O'Reilly)
 * *** empty log message ***
 * 
 * Revision 1.2  96/10/28  09:13:50  09:13:50  oreilly (Thomas C. O'Reilly)
 * *** empty log message ***
 * 
*/


#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include "DmGuiObject.h"
#include "PanTiltAttitudeGraph.h"
#include "Math.h"
#include "DmInputDetector.h"
#include "State.h"
#include "DynamicLabel.h"

#define DefaultPanRange (180. * Math::RadsPerDeg)
#define DefaultTiltRange (100. * Math::RadsPerDeg)

class PanTiltAttitude : public DmGuiObject
{
  public:
  
  PanTiltAttitude(const char *name, Widget parent, int period);
  ~PanTiltAttitude();

  virtual const char *className()
  {
    return "PanTiltAttitude";
  }
  
  void updateGui(DM_Item handle = 0);
  
  protected:
  
  DmAttitudeObject *_dmAttitude;
  DmFlt32Object *_dmPan[4];
  DmFlt32Object *_dmTilt[4];
  
  
  PanTiltAttitudeGraph *_graph;
  DynamicLabel *_pan[4];
  DynamicLabel *_tilt[4];
  DynamicLabel *_pitch;
  DynamicLabel *_roll;
  
  float _graphHalfWidth;
  float _yOffset;

  Flt32 _prevPan[4];
  Flt32 _prevTilt[4];
  
  Flt32 _prevPitch;
  Flt32 _prevRoll;
};


#endif
