]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/performancedata.hxx
Don't duplicate userpos in in AIObjects.
[flightgear.git] / src / AIModel / performancedata.hxx
index 65d64486ab71f891355c8a4fb20a01f78100d486..a8aef6400e3b46ec76585d8b54b3a50194b94c36 100644 (file)
@@ -5,6 +5,7 @@
 #include <map>
 
 class FGAIAircraft;
+class SGPropertyNode;
 
 /**
 Data storage for aircraft performance data. This is used to properly simulate the flight of AIAircrafts.
@@ -14,22 +15,15 @@ Data storage for aircraft performance data. This is used to properly simulate th
 class PerformanceData
 {
 public:
-    PerformanceData(double acceleration,
-                    double deceleration,
-                    double climbRate,
-                    double descentRate,
-                    double vRotate,
-                    double vTakeOff,
-                    double vClimb,
-                    double vCruise,
-                    double vDescent,
-                    double vApproach,
-                    double vTouchdown,
-                    double vTaxi);
-    PerformanceData(const std::string& filename);
+    PerformanceData();
+    
+    PerformanceData(PerformanceData* clone);
+  
+    void initFromProps(SGPropertyNode* props);
+  
     ~PerformanceData();
 
-    double actualSpeed(FGAIAircraft* ac, double tgt_speed, double dt);
+    double actualSpeed(FGAIAircraft* ac, double tgt_speed, double dt, bool needMaxBrake);
     double actualBankAngle(FGAIAircraft* ac, double tgt_roll, double dt);
     double actualPitch(FGAIAircraft* ac, double tgt_pitch, double dt);
     double actualHeading(FGAIAircraft* ac, double tgt_heading, double dt);
@@ -43,7 +37,16 @@ public:
     inline double vRotate          () { return _vRotate; };
     inline double maximumBankAngle () { return _maxbank; };
     inline double acceleration     () { return _acceleration; };
+    inline double deceleration     () { return _deceleration; };
+    inline double vTaxi            () { return _vTaxi; };
+    inline double vTakeoff         () { return _vTakeOff; };
+    inline double vClimb           () { return _vClimb; };
+    inline double vDescent         () { return _vDescent; };
+    inline double vApproach        () { return _vApproach; };
+    inline double vTouchdown       () { return _vTouchdown; };
+    inline double vCruise          () { return _vCruise; };
     
+    double decelerationOnGround() const;
 private:
     double _acceleration;
     double _deceleration;