From 1333cd4c97ea17dce2eaca3c85b1e5a3dda044cc Mon Sep 17 00:00:00 2001 From: Gautier Hattenberger Date: Thu, 18 Mar 2010 10:05:31 +0000 Subject: [PATCH] fix node name to get simulation time --- sw/simulator/sim_ac_fw.c | 6 +++--- sw/simulator/sim_ac_jsbsim.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sw/simulator/sim_ac_fw.c b/sw/simulator/sim_ac_fw.c index 0ee1fa7fbc..0f1de1a5d3 100644 --- a/sw/simulator/sim_ac_fw.c +++ b/sw/simulator/sim_ac_fw.c @@ -90,7 +90,7 @@ void autopilot_event_task(void) { void print(FGFDMExec* FDMExec) { FGPropertyManager* cur_node; double cur_value, factor=1; - const char* state[] = {"sim-time-sec", + const char* state[] = {"simulation/sim-time-sec", /*"position/lat-gc-deg","position/long-gc-deg","position/h-sl-meters", "ic/lat-gc-deg","ic/long-gc-deg","ic/h-sl-ft", "velocities/v-north-fps","velocities/v-east-fps","velocities/v-down-fps","velocities/vg-fps",*/ @@ -100,7 +100,7 @@ void print(FGFDMExec* FDMExec) { //"fcs/throttle-cmd-norm","fcs/aileron-cmd-norm","fcs/elevator-cmd-norm"}; int i=0; - cur_node = FDMExec->GetPropertyManager()->GetNode("sim-time-sec"); + cur_node = FDMExec->GetPropertyManager()->GetNode("simulation/sim-time-sec"); cur_value = cur_node->getDoubleValue(); cout << state[i] << " " << cur_value << endl; @@ -175,7 +175,7 @@ void copy_outputs_from_jsbsim(FGFDMExec* FDMExec) { double course = get_value(FDMExec, "attitude/heading-true-rad"); double gspeed = get_value(FDMExec, "velocities/vg-fps") * FT2M; double climb = get_value(FDMExec, "velocities/v-down-fps") * (-FT2M); - double time = get_value(FDMExec, "sim-time-sec"); + double time = get_value(FDMExec, "simulation/sim-time-sec"); sim_use_gps_pos(lat, lon, alt, course, gspeed, climb, time); sim_update_sv(); gps_period = 0.; diff --git a/sw/simulator/sim_ac_jsbsim.c b/sw/simulator/sim_ac_jsbsim.c index 41f25a258e..193437fd77 100644 --- a/sw/simulator/sim_ac_jsbsim.c +++ b/sw/simulator/sim_ac_jsbsim.c @@ -184,8 +184,8 @@ void jsbsim_init(void) { FDMExec = new JSBSim::FGFDMExec(); /* Set simulation time step */ - FDMExec->GetState()->Setsim_time(0.); - FDMExec->GetState()->Setdt(DT); + FDMExec->Setsim_time(0.); + FDMExec->Setdt(DT); cout << "Simulation delta " << FDMExec->GetDeltaT() << endl; FDMExec->DisableOutput();