2024-04-18 16:24:02 +00:00
|
|
|
/************************TRICK HEADER*************************
|
|
|
|
PURPOSE:
|
|
|
|
(S_define file for SIM_waterclock_numeric)
|
|
|
|
LIBRARY DEPENDENCIES:
|
|
|
|
(
|
|
|
|
(waterclock/src/waterclock_init.c)
|
|
|
|
(waterclock/src/waterclock_numeric.c)
|
|
|
|
(waterclock/src/waterclock_shutdown.c)
|
|
|
|
)
|
|
|
|
*************************************************************/
|
2024-05-23 15:12:27 +00:00
|
|
|
#define TRICK_NO_MONTE_CARLO
|
|
|
|
#define TRICK_NO_MASTERSLAVE
|
|
|
|
#define TRICK_NO_INSTRUMENTATION
|
|
|
|
#define TRICK_NO_REALTIMEINJECTOR
|
|
|
|
#define TRICK_NO_ZEROCONF
|
2024-04-18 16:24:02 +00:00
|
|
|
#include "sim_objects/default_trick_sys.sm"
|
2024-05-23 15:12:27 +00:00
|
|
|
|
2024-04-18 16:24:02 +00:00
|
|
|
##include "waterclock/include/waterclock_numeric.h"
|
|
|
|
|
|
|
|
class WaterClockSimObject : public Trick::SimObject {
|
|
|
|
|
|
|
|
public:
|
|
|
|
WATERCLOCK waterclock;
|
|
|
|
|
|
|
|
WaterClockSimObject() {
|
|
|
|
("default_data") waterclock_default_data( &waterclock ) ;
|
|
|
|
("initialization") waterclock_init( &waterclock ) ;
|
|
|
|
("derivative") waterclock_deriv( &waterclock ) ;
|
|
|
|
("integration") trick_ret= waterclock_integ( & waterclock ) ;
|
|
|
|
("shutdown") waterclock_shutdown( &waterclock ) ;
|
|
|
|
("dynamic_event") waterclock_tick_change( &waterclock ) ;
|
|
|
|
("dynamic_event") waterclock_overflow_timer( &waterclock ) ;
|
|
|
|
}
|
|
|
|
} ;
|
|
|
|
|
|
|
|
WaterClockSimObject dyn ;
|
|
|
|
|
|
|
|
IntegLoop dyn_integloop (0.01) dyn ;
|
|
|
|
void create_connections() {
|
|
|
|
dyn_integloop.getIntegrator(Runge_Kutta_4, 4);
|
|
|
|
}
|