![]() |
JSBSim Flight Dynamics Model 1.0 (23 February 2013)
An Open Source Flight Dynamics and Control Software Library in C++
|
00001 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00002 00003 Header: FGFCSComponent.h 00004 Author: Jon S. Berndt 00005 Date started: 05/01/2000 00006 00007 ------------- Copyright (C) ------------- 00008 00009 This program is free software; you can redistribute it and/or modify it under 00010 the terms of the GNU Lesser General Public License as published by the Free Software 00011 Foundation; either version 2 of the License, or (at your option) any later 00012 version. 00013 00014 This program is distributed in the hope that it will be useful, but WITHOUT 00015 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00016 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00017 details. 00018 00019 You should have received a copy of the GNU Lesser General Public License along with 00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00021 Place - Suite 330, Boston, MA 02111-1307, USA. 00022 00023 Further information about the GNU Lesser General Public License can also be found on 00024 the world wide web at http://www.gnu.org. 00025 00026 HISTORY 00027 -------------------------------------------------------------------------------- 00028 00029 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00030 SENTRY 00031 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00032 00033 #ifndef FGFCSCOMPONENT_H 00034 #define FGFCSCOMPONENT_H 00035 00036 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00037 INCLUDES 00038 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00039 00040 #include "FGJSBBase.h" 00041 #include "math/FGPropertyValue.h" 00042 #include <string> 00043 #include <vector> 00044 00045 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00046 DEFINITIONS 00047 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00048 00049 #define ID_FCSCOMPONENT "$Id: FGFCSComponent.h,v 1.21 2013/01/26 17:06:50 bcoconni Exp $" 00050 00051 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00052 FORWARD DECLARATIONS 00053 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00054 00055 namespace JSBSim { 00056 00057 class FGFCS; 00058 class Element; 00059 00060 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00061 CLASS DOCUMENTATION 00062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00063 00087 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00088 CLASS DECLARATION 00089 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00090 00091 class FGFCSComponent : public FGJSBBase 00092 { 00093 public: 00095 FGFCSComponent(FGFCS* fcs, Element* el); 00097 virtual ~FGFCSComponent(); 00098 00099 virtual bool Run(void); 00100 virtual void SetOutput(void); 00101 double GetOutput (void) const {return Output;} 00102 std::string GetName(void) const {return Name;} 00103 std::string GetType(void) const { return Type; } 00104 virtual double GetOutputPct(void) const { return 0; } 00105 00106 protected: 00107 FGFCS* fcs; 00108 FGPropertyManager* PropertyManager; 00109 FGPropertyNode_ptr treenode; 00110 std::vector <FGPropertyNode_ptr> OutputNodes; 00111 FGPropertyNode_ptr ClipMinPropertyNode; 00112 FGPropertyNode_ptr ClipMaxPropertyNode; 00113 std::vector <FGPropertyValue*> InputNodes; 00114 std::vector <std::string> InputNames; 00115 std::vector <float> InputSigns; 00116 std::vector <double> output_array; 00117 std::string Type; 00118 std::string Name; 00119 double Input; 00120 double Output; 00121 double clipmax, clipmin; 00122 double delay_time; 00123 unsigned int delay; 00124 int index; 00125 float clipMinSign, clipMaxSign; 00126 double dt; 00127 bool IsOutput; 00128 bool clip; 00129 00130 void Delay(void); 00131 void Clip(void); 00132 virtual void bind(); 00133 virtual void Debug(int from); 00134 }; 00135 00136 } //namespace JSBSim 00137 00138 #include "../FGFCS.h" 00139 00140 #endif 00141