/******************************************************************************/
/* Copyright 1992 MBARI                                                       */
/******************************************************************************/
/* Summary  : Trajectory Plan Module Definitions for Tiburon Control System   */
/* Filename : trajectory.h                                                    */
/* Author   : Janice Tarrant                                                  */
/* Project  : Tiburon                                                         */
/* Version  : Version 1.0                                                     */
/* Created  : 10/02/92                                                        */
/* Modified : 11/22/96                                                        */
/* Archived :                                                                 */
/******************************************************************************/
/* Modification History :                                                     */
/* $Header: trajectory.h,v 1.1 97/12/04 15:28:18 oreilly Exp $
 * $Log:        trajectory.h,v $
 * Revision 1.1  97/12/04  15:28:18  15:28:18  oreilly (Thomas C. O'Reilly)
 * Initial revision
 *
 *
 */
/******************************************************************************/

#ifndef ROV_CONTROL_TRAJECTORY_H
#define ROV_CONTROL_TRAJECTORY_H

#define NUM_ACM                 3       /* number of auto control mode flags  */
#define NUM_SETPOINTS           6       /* number of setpoints                */
#define AUTO_CONTROL_OVERRIDE 307       /* command to override auto control   */
                                        /* (30% of full joystick command)     */

                                        /* auto control mode flags            */
typedef enum { AUTO_POSITION, AUTO_Z, AUTO_HEADING } autoCtrlModes;

                                        /* auto control degrees of freedom    */
typedef enum { X_POSITION, Y_POSITION, Z_POSITION, HEADING } autoCtrlDof;

                                        /* trajectory setpoints               */
typedef enum { X_SETPOINT, Y_SETPOINT, DEPTH_SETPOINT, ALTITUDE_SETPOINT,
               GYRO_SETPOINT, KALMAN_HEADING_SETPOINT } trajSetpoints;

                                        /* auto position data manager items   */
typedef struct
{
    DM_Item dmiSensorX, dmiSensorY;
    DM_Item dmiSetpointX, dmiSetpointY;
    DM_Item dmiSetpointMovedX, dmiSetpointMovedY;
} autoPositionDmi;

                                        /* data manager error codes           */
typedef struct
{
    Errno x;                            /* x position                         */
    Errno y;                            /* y position                         */
    Errno z;                            /* z position                         */
    Errno heading;                      /* heading                            */
    Errno depth;                        /* depth                              */
    Errno altitude;                     /* altitude                           */
    Errno gyro;                         /* gyro                               */
    Errno kalmanHeading;                /* Kalman filter heading              */
    Errno kalmanHeadingDegrees;         /* Kalman filter heading (degrees)    */
    Errno autoControl[NUM_ACM];         /* auto control modes                 */
    Errno move[DOF];                    /* setpoint moved                     */
} dmStatus;

#endif
