X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2Fperformancedata.hxx;h=a8aef6400e3b46ec76585d8b54b3a50194b94c36;hb=d70e26d87b5294315ca6d67b8c11fabe51abbc4b;hp=65d64486ab71f891355c8a4fb20a01f78100d486;hpb=050221c30697d5abc9658f5b626418286895c16b;p=flightgear.git diff --git a/src/AIModel/performancedata.hxx b/src/AIModel/performancedata.hxx index 65d64486a..a8aef6400 100644 --- a/src/AIModel/performancedata.hxx +++ b/src/AIModel/performancedata.hxx @@ -5,6 +5,7 @@ #include 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;