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

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

#define LowAltitudeFollowingBehaviorName "lowAltitudeFollowing"
#define MEDIANSIZE  11       //Must be an odd number.
#define NRANGES  50
#define NoMinimumAltitude -99999.
#define NoAbortAltitude -999999.
#define NoDeltaDepth -99999.
#define INVALID_ALTITUDE 1000.

/*
CLASS 
LowAltitudeFollowing

DESCRIPTION
Shuts off propulsion if the vehicle is too close to the bottom.


AUTHOR
R. McEwen
*/
class LowAltitudeFollowing : public Behavior {

public:

  LowAltitudeFollowing();
  virtual ~LowAltitudeFollowing();

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

protected:
  double _minAltitude;
  double _abortAltitude;
  Boolean _altitudeStop;
  double _deltaDepth;
  double _restartDepth;
  Boolean _stopProp;
  double _elevator;
  long _propOnCntr, _propOffCntr;

};



#endif
