]> git.mxchange.org Git - flightgear.git/blob - src/AIModel/performancedata.hxx
Improve transponder instrumentation: new version
[flightgear.git] / src / AIModel / performancedata.hxx
1 #ifndef PERFORMANCEDATA_HXX
2 #define PERFORMANCEDATA_HXX
3
4 #include <string>
5 #include <map>
6
7 class FGAIAircraft;
8 class SGPropertyNode;
9
10 /**
11 Data storage for aircraft performance data. This is used to properly simulate the flight of AIAircrafts.
12  
13         @author Thomas F�rster <t.foerster@biologie.hu-berlin.de>
14 */
15 class PerformanceData
16 {
17 public:
18     PerformanceData();
19     
20     PerformanceData(PerformanceData* clone);
21   
22     void initFromProps(SGPropertyNode* props);
23   
24     ~PerformanceData();
25
26     double actualSpeed(FGAIAircraft* ac, double tgt_speed, double dt, bool needMaxBrake);
27     double actualBankAngle(FGAIAircraft* ac, double tgt_roll, double dt);
28     double actualPitch(FGAIAircraft* ac, double tgt_pitch, double dt);
29     double actualHeading(FGAIAircraft* ac, double tgt_heading, double dt);
30     double actualAltitude(FGAIAircraft* ac, double tgt_altitude, double dt);
31     double actualVerticalSpeed(FGAIAircraft* ac, double tgt_vs, double dt);
32
33     bool gearExtensible(const FGAIAircraft* ac);
34
35     inline double climbRate        () { return _climbRate; };
36     inline double descentRate      () { return _descentRate; };
37     inline double vRotate          () { return _vRotate; };
38     inline double maximumBankAngle () { return _maxbank; };
39     inline double acceleration     () { return _acceleration; };
40     inline double deceleration     () { return _deceleration; };
41     inline double vTaxi            () { return _vTaxi; };
42     inline double vTakeoff         () { return _vTakeOff; };
43     inline double vClimb           () { return _vClimb; };
44     inline double vDescent         () { return _vDescent; };
45     inline double vApproach        () { return _vApproach; };
46     inline double vTouchdown       () { return _vTouchdown; };
47     inline double vCruise          () { return _vCruise; };
48     
49     double decelerationOnGround() const;
50 private:
51     double _acceleration;
52     double _deceleration;
53     double _climbRate;
54     double _descentRate;
55     double _vRotate;
56     double _vTakeOff;
57     double _vClimb;
58     double _vCruise;
59     double _vDescent;
60     double _vApproach;
61     double _vTouchdown;
62     double _vTaxi;
63
64     double _rollrate;
65     double _maxbank;
66 };
67
68 #endif