[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [4353] fix simulation with new version of JSBSim
From: |
Gautier Hattenberger |
Subject: |
[paparazzi-commits] [4353] fix simulation with new version of JSBSim |
Date: |
Fri, 27 Nov 2009 13:41:57 +0000 |
Revision: 4353
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4353
Author: gautier
Date: 2009-11-27 13:41:56 +0000 (Fri, 27 Nov 2009)
Log Message:
-----------
fix simulation with new version of JSBSim
Modified Paths:
--------------
paparazzi3/trunk/sw/simulator/sim_ac_fw.c
paparazzi3/trunk/sw/simulator/sim_ac_jsbsim.c
Modified: paparazzi3/trunk/sw/simulator/sim_ac_fw.c
===================================================================
--- paparazzi3/trunk/sw/simulator/sim_ac_fw.c 2009-11-27 13:41:03 UTC (rev
4352)
+++ paparazzi3/trunk/sw/simulator/sim_ac_fw.c 2009-11-27 13:41:56 UTC (rev
4353)
@@ -28,6 +28,9 @@
#include "main_fbw.h"
#include "jsbsim_hw.h"
+#include <iostream>
+using namespace std;
+
using namespace JSBSim;
/* Datalink Ivy function */
@@ -46,6 +49,11 @@
int argc __attribute__ ((unused)), char *argv[]){
parse_dl_setting(argv);
}
+static void on_DL_GET_SETTING(IvyClientPtr app __attribute__ ((unused)),
+ void *user_data __attribute__ ((unused)),
+ int argc __attribute__ ((unused)), char *argv[]){
+ parse_dl_get_setting(argv);
+}
static void on_DL_BLOCK(IvyClientPtr app __attribute__ ((unused)),
void *user_data __attribute__ ((unused)),
int argc __attribute__ ((unused)), char *argv[]){
@@ -61,6 +69,7 @@
IvyBindMsg(on_DL_PING, NULL, "^(\\S*) DL_PING");
IvyBindMsg(on_DL_ACINFO, NULL, "^(\\S*) DL_ACINFO (\\S*) (\\S*) (\\S* (\\S*)
(\\S*) (\\S*)) (\\S*) (\\S*)");
IvyBindMsg(on_DL_SETTING, NULL, "^(\\S*) DL_SETTING (\\S*) (\\S*) (\\S*)");
+ IvyBindMsg(on_DL_GET_SETTING, NULL, "^(\\S*) DL_GET_SETTING (\\S*) (\\S*)");
IvyBindMsg(on_DL_BLOCK, NULL, "^(\\S*) BLOCK (\\S*) (\\S*)");
IvyBindMsg(on_DL_MOVE_WP, NULL, "^(\\S*) MOVE_WP (\\S*) (\\S*) (\\S*) (\\S*)
(\\S*)");
@@ -125,8 +134,8 @@
run_model = true;
//set_value(FDMExec, "propulsion/set-running", 1);
// set initial speed
- FDMExec->GetIC()->SetAltitudeFtIC((GROUND_ALT+50.0) / FT2M);
- FDMExec->GetIC()->SetVgroundFpsIC(40./FT2M);
+ FDMExec->GetIC()->SetAltitudeAGLFtIC(5.0 / FT2M);
+ FDMExec->GetIC()->SetVgroundFpsIC(20./FT2M);
FDMExec->RunIC();
th = 0.;
}
Modified: paparazzi3/trunk/sw/simulator/sim_ac_jsbsim.c
===================================================================
--- paparazzi3/trunk/sw/simulator/sim_ac_jsbsim.c 2009-11-27 13:41:03 UTC
(rev 4352)
+++ paparazzi3/trunk/sw/simulator/sim_ac_jsbsim.c 2009-11-27 13:41:56 UTC
(rev 4353)
@@ -25,9 +25,13 @@
#include "sim_ac_jsbsim.h"
#include <stdlib.h>
+#include <stdio.h>
#include <glib.h>
#include <getopt.h>
+#include <iostream>
+using namespace std;
+
//#include <Ivy/ivy.h>
#include <Ivy/ivyglibloop.h>
@@ -210,8 +214,8 @@
// Use flight plan initial conditions
IC->SetLatitudeDegIC(NAV_LAT0 / 1e7);
IC->SetLongitudeDegIC(NAV_LON0 / 1e7);
- IC->SetAltitudeFtIC((GROUND_ALT+100) / FT2M);
- IC->SetTerrainAltitudeFtIC(GROUND_ALT / FT2M);
+ IC->SetAltitudeAGLFtIC(0.0 / FT2M);
+ IC->SetTerrainElevationFtIC(GROUND_ALT / FT2M);
IC->SetPsiDegIC(QFU);
IC->SetVgroundFpsIC(0.);
if (!FDMExec->RunIC()) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [4353] fix simulation with new version of JSBSim,
Gautier Hattenberger <=