trick/trick_sims/SIM_lander/S_define

30 lines
942 B
Plaintext
Raw Normal View History

2020-01-17 21:40:26 +00:00
/************************************************************
PURPOSE:
( Simulate a Lander. )
LIBRARY DEPENDENCIES:
((lander/src/Lander.cpp)
(PIDController/src/PIDController.cpp))
2020-01-17 21:40:26 +00:00
*************************************************************/
#include "sim_objects/default_trick_sys.sm"
##include "lander/include/Lander.hh"
class LanderSimObject : public Trick::SimObject {
public:
Lander lander;
LanderSimObject() {
("default_data") lander.default_data() ;
("initialization") lander.state_init() ;
("derivative") lander.state_deriv() ;
(0.1, "scheduled") lander.control() ;
("integration") trick_ret = lander.state_integ() ;
("post_integration") lander.check_ground_contact() ;
}
};
LanderSimObject dyn;
IntegLoop dyn_integloop(0.1) dyn;
2020-01-17 21:40:26 +00:00
void create_connections() {
dyn_integloop.getIntegrator(Runge_Kutta_4, 6);
2020-01-17 21:40:26 +00:00
}