FlightGear next
FGThruster.h
Go to the documentation of this file.
1/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3 Header: FGThruster.h
4 Author: Jon S. Berndt
5 Date started: 08/23/00
6
7 ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
8
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
12 version.
13
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17 details.
18
19 You should have received a copy of the GNU Lesser General Public License along with
20 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 Further information about the GNU Lesser General Public License can also be found on
24 the world wide web at http://www.gnu.org.
25
26HISTORY
27--------------------------------------------------------------------------------
2808/24/00 JSB Created
29
30%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31SENTRY
32%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
33
34#ifndef FGTHRUSTER_H
35#define FGTHRUSTER_H
36
37/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38INCLUDES
39%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
40
41#include "FGForce.h"
43#include <string>
44
45/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46FORWARD DECLARATIONS
47%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
48
49namespace JSBSim {
50
51class Element;
53
54/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55CLASS DOCUMENTATION
56%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
57
72
73/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74CLASS DECLARATION
75%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
76
77class FGThruster : public FGForce {
78
79public:
81 FGThruster(FGFDMExec *FDMExec, Element *el, int num );
83 virtual ~FGThruster();
84
86
87 virtual double Calculate(double tt) {
88 Thrust = cos(ReverserAngle)*tt;
89 vFn(1) = Thrust;
90 return Thrust;
91 }
92 void SetName(std::string name) {Name = name;}
93 virtual void SetRPM(double rpm) {};
94 virtual void SetEngineRPM(double rpm) {};
95 virtual double GetPowerRequired(void) {return 0.0;}
96 double GetThrust(void) const {return Thrust;}
97 eType GetType(void) {return Type;}
98 std::string GetName(void) {return Name;}
99 void SetReverserAngle(double angle) {ReverserAngle = angle;}
100 double GetReverserAngle(void) const {return ReverserAngle;}
101 virtual double GetRPM(void) const { return 0.0; };
102 virtual double GetEngineRPM(void) const { return 0.0; };
103 double GetGearRatio(void) {return GearRatio; }
104 virtual std::string GetThrusterLabels(int id, const std::string& delimeter);
105 virtual std::string GetThrusterValues(int id, const std::string& delimeter);
106
107 virtual void ResetToIC(void);
108
122
123protected:
125 std::string Name;
126 double Thrust;
128 double GearRatio;
132 virtual void Debug(int from);
133};
134}
135//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
136#endif
JSBSim::FGFDMExec * FDMExec
Definition JSBSim.cpp:88
This class implements a 3 element column vector.
FGForce(FGFDMExec *FDMExec)
Constructor.
Definition FGForce.cpp:53
FGColumnVector3 vFn
Definition FGForce.h:310
virtual double GetEngineRPM(void) const
Definition FGThruster.h:102
virtual void Debug(int from)
virtual double Calculate(double tt)
Definition FGThruster.h:87
eType GetType(void)
Definition FGThruster.h:97
virtual double GetPowerRequired(void)
Definition FGThruster.h:95
virtual std::string GetThrusterValues(int id, const std::string &delimeter)
double GetGearRatio(void)
Definition FGThruster.h:103
virtual double GetRPM(void) const
Definition FGThruster.h:101
std::string Name
Definition FGThruster.h:125
virtual std::string GetThrusterLabels(int id, const std::string &delimeter)
std::string GetName(void)
Definition FGThruster.h:98
virtual void SetEngineRPM(double rpm)
Definition FGThruster.h:94
void SetName(std::string name)
Definition FGThruster.h:92
double GetReverserAngle(void) const
Definition FGThruster.h:100
virtual void ResetToIC(void)
virtual ~FGThruster()
Destructor.
virtual void SetRPM(double rpm)
Definition FGThruster.h:93
double GetThrust(void) const
Definition FGThruster.h:96
struct JSBSim::FGThruster::Inputs in
FGThruster(FGFDMExec *FDMExec, Element *el, int num)
Constructor.
void SetReverserAngle(double angle)
Definition FGThruster.h:99
const char * name
FGColumnVector3 AeroPQR
Definition FGThruster.h:113
FGColumnVector3 AeroUVW
Definition FGThruster.h:114