X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2Fmodels%2FFGFCS.h;h=6b97297d5ab0f6dba17052aa2f00d4d3dbc8ae27;hb=416ba93a417c4cadde025ba4d7bbcce71d613372;hp=8aa9ca9ffc750ce63083663079a29b293bf9d84b;hpb=70be1629e61d9b751a2f73df30b83bb1be6ca4fe;p=flightgear.git diff --git a/src/FDM/JSBSim/models/FGFCS.h b/src/FDM/JSBSim/models/FGFCS.h index 8aa9ca9ff..6b97297d5 100644 --- a/src/FDM/JSBSim/models/FGFCS.h +++ b/src/FDM/JSBSim/models/FGFCS.h @@ -4,7 +4,7 @@ Author: Jon S. Berndt Date started: 12/12/98 - ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) ------------- + ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) ------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software @@ -38,19 +38,20 @@ SENTRY INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ +#include #include #include -#include -#include -#include -#include +#include "models/flight_control/FGFCSComponent.h" +#include "models/FGModel.h" +#include "models/FGLGear.h" +#include "input_output/FGXMLFileRead.h" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -#define ID_FCS "$Id$" +#define ID_FCS "$Id: FGFCS.h,v 1.35 2011/04/05 20:20:21 andgi Exp $" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FORWARD DECLARATIONS @@ -167,7 +168,7 @@ CLASS DOCUMENTATION @property gear/tailhook-pos-norm @author Jon S. Berndt - @version $Revision$ + @version $Revision: 1.35 $ @see FGActuator @see FGDeadBand @see FGFCSFunction @@ -277,8 +278,6 @@ public: double GetDaLPos( int form = ofRad ) const { return DaLPos[form]; } - /// @name Aerosurface position retrieval - //@{ /** Gets the right aileron position. @return aileron position in radians */ double GetDaRPos( int form = ofRad ) @@ -346,21 +345,16 @@ public: bool GetPropFeather(int engine) const { return PropFeather[engine]; } //@} - /** Retrieves the State object pointer. - This is used by the FGFCS-owned components. - @return pointer to the State object */ - FGState* GetState(void) { return State; } - /** Retrieves all component names for inclusion in output stream - @param delimeter either a tab or comma string depending on output type + @param delimiter either a tab or comma string depending on output type @return a string containing the descriptive names for all components */ - string GetComponentStrings(string delimeter); + std::string GetComponentStrings(const std::string& delimiter) const; /** Retrieves all component outputs for inclusion in output stream - @param delimeter either a tab or comma string depending on output type + @param delimiter either a tab or comma string depending on output type @return a string containing the numeric values for the current set of component outputs */ - string GetComponentValues(string delimeter); + std::string GetComponentValues(const std::string& delimiter) const; /// @name Pilot input command setting //@{ @@ -406,12 +400,12 @@ public: /** Sets the throttle command for the specified engine @param engine engine ID number - @param cmd throttle command in percent (0 - 100)*/ + @param cmd normalized throttle command (0.0 - 1.0)*/ void SetThrottleCmd(int engine, double cmd); /** Sets the mixture command for the specified engine @param engine engine ID number - @param cmd mixture command in percent (0 - 100)*/ + @param cmd normalized mixture command (0.0 - 1.0)*/ void SetMixtureCmd(int engine, double cmd); /** Set the gear extend/retract command, defaults to down @@ -461,12 +455,12 @@ public: /** Sets the actual throttle setting for the specified engine @param engine engine ID number - @param cmd throttle setting in percent (0 - 100)*/ + @param cmd normalized throttle setting (0.0 - 1.0)*/ void SetThrottlePos(int engine, double cmd); /** Sets the actual mixture setting for the specified engine @param engine engine ID number - @param cmd mixture setting in percent (0 - 100)*/ + @param cmd normalized mixture setting (0.0 - 1.0)*/ void SetMixturePos(int engine, double cmd); /** Sets the steering position @@ -537,8 +531,8 @@ public: @return true if succesful */ bool Load(Element* el, SystemType systype); - ifstream* FindSystemFile(string system_filename); - string FindSystemFullPathname(string system_filename); + std::ifstream* FindSystemFile(const std::string& system_filename); + std::string FindSystemFullPathname(const std::string& system_filename); void AddThrottle(void); void AddGear(void); @@ -546,30 +540,30 @@ public: FGPropertyManager* GetPropertyManager(void) { return PropertyManager; } + bool GetTrimStatus(void) const { return FDMExec->GetTrimStatus(); } + private: double DaCmd, DeCmd, DrCmd, DsCmd, DfCmd, DsbCmd, DspCmd; double DePos[NForms], DaLPos[NForms], DaRPos[NForms], DrPos[NForms]; double DfPos[NForms], DsbPos[NForms], DspPos[NForms]; double PTrimCmd, YTrimCmd, RTrimCmd; - vector ThrottleCmd; - vector ThrottlePos; - vector MixtureCmd; - vector MixturePos; - vector PropAdvanceCmd; - vector PropAdvance; - vector PropFeatherCmd; - vector PropFeather; - vector SteerPosDeg; + std::vector ThrottleCmd; + std::vector ThrottlePos; + std::vector MixtureCmd; + std::vector MixturePos; + std::vector PropAdvanceCmd; + std::vector PropAdvance; + std::vector PropFeatherCmd; + std::vector PropFeather; + std::vector SteerPosDeg; double LeftBrake, RightBrake, CenterBrake; // Brake settings double GearCmd,GearPos; double TailhookPos, WingFoldPos; - typedef vector FCSCompVec; + typedef std::vector FCSCompVec; FCSCompVec Systems; FCSCompVec FCSComponents; FCSCompVec APComponents; - FCSCompVec sensors; - vector interface_properties; void bind(void); void bindModel(void); void bindThrottle(unsigned int);