This commit is contained in:
Gustavo Oliveira Violato
2009-06-17 15:15:57 +00:00
parent a135c268aa
commit 3041a67420
2 changed files with 48 additions and 2 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ struct NpsFdm {
extern struct NpsFdm fdm;
extern void nps_fdm_init();
extern void nps_fdm_run_step(double* commands, double dt);
extern void nps_fdm_init(double dt);
extern void nps_fdm_run_step(double* commands);
#endif /* NPS_FDM */
+46
View File
@@ -0,0 +1,46 @@
#include <FGFDMExec.h>
#include <FGJSBBase.h>
#include <FGState.h>
#include "nps_fdm.h"
#include "airframe.h"
using namespace JSBSim;
void nps_fdm_feed_jsbsim(void);
void nps_fdm_fetch_state(void);
FGFDMExec* FDMExec;
void nps_fdm_init(double dt) {
// FDMExec = new FGFDMExec();
}
void nps_fdm_run_step(double* commands) {
nps_fdm_feed_jsbsim(double* commands);
/* run JSBSim */
nps_fdm_fetch_state();
}
void nps_fdm_feed_jsbsim(double* commands) {
#if 0
printf("Actuators Names:\n");
for (int i=0; i<SERVOS_NB; i++) {
printf("%s\n", ACTUATOR_COMMAND_NAMES[i]);
}
#endif
void nps_fdm_fetch_state(void) {
/* JSBSim to fdm */
}