trick/trick_models/ball/L2/include/ball_state.h
Alex Lin 14a75508a3 Cleaning up once include variables and copyright cleanup.
Changed all header file once include variables to follow the same naming
convention and not start with any underscores.  Also deleted old
incorrect copyright notices.  Also removed $Id: tags from all files.

Fixes #14.  Fixes #22.
2015-03-23 16:03:14 -05:00

67 lines
2.9 KiB
C

/********************************* TRICK HEADER *******************************
PURPOSE:
(Ball model EOM state parameter definition.)
REFERENCES:
(((Bailey, R.W, and Paddock, E.J.)
(Trick Simulation Environment) (NASA:JSC #37943)
(JSC/Engineering Directorate/Automation, Robotics and Simulation Division)
(March 1997)))
ASSUMPTIONS AND LIMITATIONS:
((2 dimensional space)
(Translational EOM only)
(4 events for contact with floor ceiling and 2 walls))
PROGRAMMERS:
(((Your name) (Your Company) (Date) (Trick Tutorial)))
*******************************************************************************/
#ifndef BALL_STATE_H
#define BALL_STATE_H
#include "sim_services/Integrator/include/regula_falsi.h"
typedef struct { /* BSTATE_IN ------------------------------------------------*/
/*=== Initial Ball States ===*/
double mass ; /* kg Total mass */
double position[2] ; /* M X(horizontal),Y(vertical) position */
double speed ; /* M/s Linear speed */
double elevation ; /* r Trajectory angle with respect
to the horizontal */
/* DYNAMIC EVENT INPUTS */
double floor_y_pos ; /* M Horizontal floor location on Y axis */
double right_wall_x_pos ;/* M Vertical right wall location on X axis */
double ceiling_y_pos ; /* M Horizontal ceiling location on Y axis */
double left_wall_x_pos ; /* M Vertical left wall location on X axis */
REGULA_FALSI floor ; /* -- Dynamic event params for floor impact */
REGULA_FALSI right_wall ;/* -- Dynamic event params for right wall impact*/
REGULA_FALSI ceiling ; /* -- Dynamic event params for ceiling impact */
REGULA_FALSI left_wall ; /* -- Dynamic event params for left wall impact */
} BSTATE_IN ; /*--------------------------------------------------------------*/
typedef struct { /* BSTATE_OUT -----------------------------------------------*/
double position[2] ; /* M X(horizontal), Y(vertical) position */
double Frequency ; /* (Hz) Total mass */
double velocity[2] ; /* M/s X,Y velocity */
double acceleration[2] ; /* M/s2 X,Y acceleration */
double external_force[2] ; /* N Total external force on ball */
} BSTATE_OUT ; /*-------------------------------------------------------------*/
typedef struct { /* BSTATE_WORK ----------------------------------------------*/
void ** external_force ; /* ** N External forces, from 'collect' */
} BSTATE_WORK ; /*------------------------------------------------------------*/
typedef struct { /* BSTATE ---------------------------------------------------*/
BSTATE_IN input ; /* -- User inputs */
BSTATE_OUT output ; /* -- User outputs */
BSTATE_WORK work ; /* -- EOM workspace */
} BSTATE ; /*-----------------------------------------------------------------*/
#endif