mirror of
https://github.com/nasa/trick.git
synced 2024-12-26 00:01:09 +00:00
58 lines
1.9 KiB
Plaintext
58 lines
1.9 KiB
Plaintext
|
/************************TRICK HEADER*************************
|
||
|
PURPOSE:
|
||
|
(This S_define works with the jet simulation (RUN_jet_event, Run_jet_call, RUN_jet_read, & RUN_jet_nofire input files))
|
||
|
LIBRARY DEPENDENCIES:
|
||
|
(
|
||
|
(cannon/aero/src/cannon_init_aero.c)
|
||
|
(cannon/aero/src/cannon_force_gravity.c)
|
||
|
(cannon/aero/src/cannon_force_drag.c)
|
||
|
(cannon/aero/src/cannon_force_lift.c)
|
||
|
(cannon/aero/src/cannon_force_cross.c)
|
||
|
(cannon/aero/src/cannon_collect_forces.c)
|
||
|
(cannon/aero/src/cannon_integ_aero.c)
|
||
|
(cannon/aero/src/cannon_impact_aero.c)
|
||
|
(cannon/aero/src/cannon_force_jet.c)
|
||
|
(cannon/aero/src/cannon_aero_default_data.c)
|
||
|
)
|
||
|
*************************************************************/
|
||
|
|
||
|
#include "sim_objects/default_trick_sys.sm"
|
||
|
|
||
|
##include "cannon/aero/include/cannon_aero.h"
|
||
|
##include "cannon/aero/include/cannon_jet_proto.h"
|
||
|
|
||
|
class CannonSimObject : public Trick::SimObject {
|
||
|
|
||
|
public:
|
||
|
CANNON_AERO baseball;
|
||
|
|
||
|
CannonSimObject() {
|
||
|
|
||
|
("default_data") cannon_aero_default_data( &baseball ) ;
|
||
|
|
||
|
("initialization") cannon_init_aero( &baseball ) ;
|
||
|
|
||
|
("derivative") cannon_force_gravity( &baseball ) ;
|
||
|
("derivative") cannon_force_drag( &baseball ) ;
|
||
|
("derivative") cannon_force_lift( &baseball ) ;
|
||
|
("derivative") cannon_force_cross( &baseball ) ;
|
||
|
("derivative") cannon_collect_forces( &baseball ) ;
|
||
|
("integration") trick_ret = cannon_integ_aero( &baseball ) ;
|
||
|
|
||
|
(0.1, "effector") cannon_force_jet( &baseball ) ;
|
||
|
|
||
|
("dynamic_event") cannon_impact_aero( &baseball ) ;
|
||
|
}
|
||
|
} ;
|
||
|
|
||
|
CannonSimObject dyn ;
|
||
|
|
||
|
IntegLoop dyn_integloop (0.01) dyn ;
|
||
|
|
||
|
collect dyn.baseball.force_collect = {
|
||
|
dyn.baseball.force_gravity[0],
|
||
|
dyn.baseball.force_drag[0],
|
||
|
dyn.baseball.force_magnus[0],
|
||
|
dyn.baseball.force_cross[0],
|
||
|
dyn.baseball.force_jet[0]} ;
|