From: Erik H. <eh...@us...> - 2016-05-18 07:21:19
|
Update of /cvsroot/jsbsim/JSBSim/src/models In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23559/models Modified Files: FGFCS.cpp FGFCS.h Log Message: Add SetDsCmd and GetDsCmd back to FCS (so all commands are accessable from the same place) Index: FGFCS.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/models/FGFCS.cpp,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -r1.95 -r1.96 *** FGFCS.cpp 16 May 2016 18:19:57 -0000 1.95 --- FGFCS.cpp 18 May 2016 07:21:16 -0000 1.96 *************** *** 84,87 **** --- 84,88 ---- systype = stFCS; + gr = fdmex->GetGroundReactions(); DaCmd = DeCmd = DrCmd = DfCmd = DsbCmd = DspCmd = 0; PTrimCmd = YTrimCmd = RTrimCmd = 0.0; Index: FGFCS.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/models/FGFCS.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -r1.51 -r1.52 *** FGFCS.h 16 May 2016 18:19:57 -0000 1.51 --- FGFCS.h 18 May 2016 07:21:16 -0000 1.52 *************** *** 45,48 **** --- 45,49 ---- #include "models/FGModel.h" #include "models/FGLGear.h" + #include "models/FGGroundReactions.h" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *************** *** 225,228 **** --- 226,233 ---- double GetDrCmd(void) const { return DrCmd; } + /** Gets the steering command. + @return steering command in range from -1.0 - 1.0 */ + double GetDsCmd(void) const { return gr->GetDsCmd(); } + /** Gets the flaps command. @return flaps command in range from 0 to 1.0 */ *************** *** 382,385 **** --- 387,394 ---- void SetDrCmd(double cmd) { DrCmd = cmd; } + /** Sets the steering command + @param cmd steering command in percent*/ + void SetDsCmd(double cmd) { gr->SetDsCmd( cmd ); } + /** Sets the flaps command @param cmd flaps command in percent*/ *************** *** 565,568 **** --- 574,578 ---- SystemType systype; int ChannelRate; + FGGroundReactions *gr; typedef std::vector <FGFCSChannel*> Channels; |