2020-01-17 21:40:26 +00:00
|
|
|
/************************************************************
|
|
|
|
PURPOSE:
|
|
|
|
( Simulate a Lander. )
|
|
|
|
LIBRARY DEPENDENCIES:
|
2020-06-05 01:21:24 +00:00
|
|
|
((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;
|
2020-01-23 20:26:50 +00:00
|
|
|
IntegLoop dyn_integloop(0.1) dyn;
|
2020-01-17 21:40:26 +00:00
|
|
|
|
|
|
|
void create_connections() {
|
2020-01-23 20:26:50 +00:00
|
|
|
dyn_integloop.getIntegrator(Runge_Kutta_4, 6);
|
2020-01-17 21:40:26 +00:00
|
|
|
}
|