1
0
Fork 0
flightgear/src/FDM/JSBSim/FGFCS.h

127 lines
4 KiB
C
Raw Normal View History

1999-02-05 21:26:01 +00:00
/*******************************************************************************
1999-02-05 21:26:01 +00:00
Header: FGGFCS.h
Author: Jon S. Berndt
Date started: 12/12/98
1999-02-05 21:26:01 +00:00
------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
1999-02-05 21:26:01 +00:00
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
1999-02-05 21:26:01 +00:00
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
1999-02-05 21:26:01 +00:00
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.
1999-02-05 21:26:01 +00:00
Further information about the GNU General Public License can also be found on
the world wide web at http://www.gnu.org.
1999-02-05 21:26:01 +00:00
HISTORY
--------------------------------------------------------------------------------
12/12/98 JSB Created
********************************************************************************
1999-02-05 21:26:01 +00:00
SENTRY
*******************************************************************************/
#ifndef FGFCS_H
#define FGFCS_H
/*******************************************************************************
INCLUDES
*******************************************************************************/
2000-04-24 23:49:06 +00:00
#ifdef FGFS
# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <vector>
# else
# include <vector.h>
# endif
#else
# include <vector>
# include <string>
#endif
#include <string>
2000-04-24 23:49:06 +00:00
#include "filtersjb/FGFCSComponent.h"
1999-02-05 21:26:01 +00:00
#include "FGModel.h"
2000-04-24 23:49:06 +00:00
#include "FGConfigFile.h"
1999-02-05 21:26:01 +00:00
/*******************************************************************************
CLASS DECLARATION
*******************************************************************************/
class FGFCS : public FGModel {
2000-04-24 23:49:06 +00:00
private:
float DaCmd, DeCmd, DrCmd, DfCmd, DsbCmd, DspCmd;
float DaPos, DePos, DrPos, DfPos, DsbPos, DspPos;
float PTrimCmd;
2000-04-24 23:49:06 +00:00
float ThrottleCmd[MAX_ENGINES];
float ThrottlePos[MAX_ENGINES];
vector <FGFCSComponent*> Components;
1999-02-05 21:26:01 +00:00
public:
FGFCS(FGFDMExec*);
~FGFCS(void);
bool Run(void);
inline float GetDaCmd(void) { return DaCmd; }
inline float GetDeCmd(void) { return DeCmd; }
inline float GetDrCmd(void) { return DrCmd; }
inline float GetDfCmd(void) { return DfCmd; }
inline float GetDsbCmd(void) { return DsbCmd; }
inline float GetDspCmd(void) { return DspCmd; }
inline float GetThrottleCmd(int ii) { return ThrottleCmd[ii]; }
inline float GetPitchTrimCmd(void) { return PTrimCmd; }
inline float GetDaPos(void) { return DaPos; }
inline float GetDePos(void) { return DePos; }
inline float GetDrPos(void) { return DrPos; }
inline float GetDfPos(void) { return DfPos; }
inline float GetDsbPos(void) { return DsbPos; }
inline float GetDspPos(void) { return DspPos; }
inline float GetThrottlePos(int ii) { return ThrottlePos[ii]; }
inline FGState* GetState(void) { return State; }
2000-04-24 23:49:06 +00:00
float GetComponentOutput(int idx);
string GetComponentName(int idx);
inline void SetDaCmd(float tt) { DaCmd = tt; }
inline void SetDeCmd(float tt) { DeCmd = tt; }
inline void SetDrCmd(float tt) { DrCmd = tt; }
inline void SetDfCmd(float tt) { DfCmd = tt; }
inline void SetDsbCmd(float tt) { DsbCmd = tt; }
inline void SetDspCmd(float tt) { DspCmd = tt; }
inline void SetPitchTrimCmd(float tt) { PTrimCmd = tt; }
void SetThrottleCmd(int ii, float tt);
inline void SetDaPos(float tt) { DaPos = tt; }
inline void SetDePos(float tt) { DePos = tt; }
inline void SetDrPos(float tt) { DrPos = tt; }
inline void SetDfPos(float tt) { DfPos = tt; }
inline void SetDsbPos(float tt) { DsbPos = tt; }
inline void SetDspPos(float tt) { DspPos = tt; }
void SetThrottlePos(int ii, float tt);
2000-04-24 23:49:06 +00:00
bool LoadFCS(FGConfigFile* AC_cfg);
string FCSName;
1999-02-05 21:26:01 +00:00
};
2000-04-24 23:49:06 +00:00
#include "FGState.h"
2000-01-10 21:07:00 +00:00
#endif