/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : Undock.h                                                      */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _UNDOCK_H
#define _UNDOCK_H

#include "ourTypes.h"
#include "Behavior.h"
#include "MathP.h"

#define UndockBehaviorName "undock"

/*
CLASS 
Undock

DESCRIPTION
Attempts to achieve a position using the specified direction
of approach.


AUTHOR
McEwen/O'Reilly
*/
class Undock : public Behavior {

public:

  Undock();
  virtual ~Undock();

  virtual void execute( void );
  virtual Boolean validInput( void );

  virtual Boolean shouldBehaviorStart( void );

protected:

  short  _consecutiveGood;
  double _endDepth;
  double _abortDepth;
  double _speed;
  double _startTimeSecs;
  double _thrustDuration;
  double _elevator;
  Boolean _abortOnTimeout;
  Boolean _first;
  Boolean _firstValid;
  Boolean _dvlNewData;
  Boolean _consecAbsent;
  int     _netCtr;
  DvlIF::Data _dvlData;
  enum ProbeStateEnum  { Down, Raising, Up, Lowering, Unknown };
  ProbeStateEnum _probeState;
  enum NetworkStatusEnum { Present, Absent  };
  NetworkStatusEnum _networkStatus;

};



#endif
