From ee9a81fd5606681bd496ec439a17906405d77819 Mon Sep 17 00:00:00 2001 From: tony Date: Fri, 22 Feb 2002 13:26:31 +0000 Subject: [PATCH] Added parameter for abs value of elevator, rudder, and aileron positions --- src/FDM/JSBSim/FGJSBBase.h | 3 +++ src/FDM/JSBSim/FGState.cpp | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/src/FDM/JSBSim/FGJSBBase.h b/src/FDM/JSBSim/FGJSBBase.h index 0bdbc92ba..570c9af42 100644 --- a/src/FDM/JSBSim/FGJSBBase.h +++ b/src/FDM/JSBSim/FGJSBBase.h @@ -114,8 +114,11 @@ enum eParam { FG_BI2VEL, FG_CI2VEL, FG_ELEVATOR_POS, + FG_AELEVATOR_POS, FG_AILERON_POS, + FG_AAILERON_POS, FG_RUDDER_POS, + FG_ARUDDER_POS, FG_SPDBRAKE_POS, FG_SPOILERS_POS, FG_FLAPS_POS, diff --git a/src/FDM/JSBSim/FGState.cpp b/src/FDM/JSBSim/FGState.cpp index 2dc11a08e..148ac74cd 100644 --- a/src/FDM/JSBSim/FGState.cpp +++ b/src/FDM/JSBSim/FGState.cpp @@ -118,8 +118,11 @@ FGState::FGState(FGFDMExec* fdex) RegisterVariable(FG_BI2VEL, " BI2Vel " ); RegisterVariable(FG_CI2VEL, " CI2Vel " ); RegisterVariable(FG_ELEVATOR_POS, " elevator_pos " ); + RegisterVariable(FG_AELEVATOR_POS, " |elevator_pos| " ); RegisterVariable(FG_AILERON_POS, " aileron_pos " ); + RegisterVariable(FG_AAILERON_POS, " |aileron_pos| " ); RegisterVariable(FG_RUDDER_POS, " rudder_pos " ); + RegisterVariable(FG_ARUDDER_POS, " |rudder_pos| " ); RegisterVariable(FG_SPDBRAKE_POS, " speedbrake_pos " ); RegisterVariable(FG_SPOILERS_POS, " spoiler_pos " ); RegisterVariable(FG_FLAPS_POS, " flaps_pos " ); @@ -231,10 +234,16 @@ double FGState::GetParameter(eParam val_idx) { return scratch*scratch; case FG_ELEVATOR_POS: return FCS->GetDePos(); + case FG_AELEVATOR_POS: + return fabs(FCS->GetDePos()); case FG_AILERON_POS: return FCS->GetDaPos(); + case FG_AAILERON_POS: + return fabs(FCS->GetDaPos()); case FG_RUDDER_POS: return FCS->GetDrPos(); + case FG_ARUDDER_POS: + return fabs(FCS->GetDrPos()); case FG_SPDBRAKE_POS: return FCS->GetDsbPos(); case FG_SPOILERS_POS: