mirror of
https://github.com/nasa/trick.git
synced 2025-01-05 04:44:16 +00:00
14a75508a3
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.
58 lines
2.2 KiB
D
58 lines
2.2 KiB
D
/********************************* TRICK HEADER *******************************
|
|
PURPOSE:
|
|
(Ball model state integrator default initialization data.)
|
|
REFERENCE:
|
|
(((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))
|
|
PROGRAMMERS:
|
|
(((Your Name) (Company Name) (Date) (Trick tutorial)))
|
|
*******************************************************************************/
|
|
|
|
#define NUM_STEP 12 /* use up to 12 intermediate steps:
|
|
8th order RK Fehlberg */
|
|
#define NUM_VARIABLES 4 /* x,y position state and x,y velocity state */
|
|
|
|
/* Unconstrained arrays must be sized */
|
|
INTEGRATOR.state = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv = alloc(NUM_STEP) ;
|
|
INTEGRATOR.state_ws = alloc(NUM_STEP) ;
|
|
|
|
INTEGRATOR.deriv[0] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[1] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[2] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[3] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[4] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[5] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[6] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[7] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[8] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[9] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[10] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.deriv[11] = alloc(NUM_VARIABLES) ;
|
|
|
|
INTEGRATOR.state_ws[0] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[1] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[2] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[3] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[4] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[5] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[6] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[7] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[8] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[9] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[10] = alloc(NUM_VARIABLES) ;
|
|
INTEGRATOR.state_ws[11] = alloc(NUM_VARIABLES) ;
|
|
|
|
INTEGRATOR.num_state = NUM_VARIABLES ;
|
|
INTEGRATOR.option = Runge_Kutta_2 ; /* 2nd order Runge Kutta */
|
|
INTEGRATOR.init = True ;
|
|
INTEGRATOR.first_step_deriv = Yes ;
|
|
|
|
#undef NUM_STEP
|
|
#undef NUM_VARIABLES
|
|
|