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

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

#define AscendBehaviorName "ascend"


/*
CLASS 
Ascend

DESCRIPTION
Drive the vehicle to to the surface by dropping either, neither, or both
of the drop weights and then terminate.  Pitch control is used in the
Vertical plane.

Heading control can be used, otherwise the vehicle
will spiral with fixed rudder.

Terminate this behavior when the vehicle is above specified endDepth.


Attribute          Type            Meaning
---------          ----            -------
horizontalMode     HorizontalMode  Either "heading", "rudder", or "waypoint"
horizontal         Angle           Commanded horizontal value
pitch              Angle           Commanded pitch
speed              Float           Commanded speed
endDepth           Float           End behavior when shallower than this depth
dropDescentWeight  Boolean         Drop descent weight if "true"
dropAscentWeight   Boolean         Drop ascent weight if "true"

AUTHOR
Tom O'Reilly
*/
class Ascend : public Behavior {

public:

  Ascend();

  virtual ~Ascend();

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

  virtual Boolean shouldBehaviorStart( void );

protected:

  double _pitch;
  double _horizontal;
  double _speed;
  double _endDepth;
  Boolean _dropDescentWeight;
  Boolean _dropAscentWeight;

  DynamicControlIF::HorizontalMode _horizontalMode;
};



#endif
