2007-06-28 07:47:20 +00:00
|
|
|
|
#ifndef PERFORMANCEDATA_HXX
|
|
|
|
|
#define PERFORMANCEDATA_HXX
|
|
|
|
|
|
|
|
|
|
class FGAIAircraft;
|
2012-10-29 10:01:52 +00:00
|
|
|
|
class SGPropertyNode;
|
2007-06-28 07:47:20 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
Data storage for aircraft performance data. This is used to properly simulate the flight of AIAircrafts.
|
|
|
|
|
|
2009-01-30 18:48:44 +00:00
|
|
|
|
@author Thomas F<EFBFBD>rster <t.foerster@biologie.hu-berlin.de>
|
2007-06-28 07:47:20 +00:00
|
|
|
|
*/
|
|
|
|
|
class PerformanceData
|
|
|
|
|
{
|
|
|
|
|
public:
|
2012-10-29 10:01:52 +00:00
|
|
|
|
PerformanceData();
|
2021-02-22 04:27:43 +00:00
|
|
|
|
|
|
|
|
|
explicit PerformanceData(PerformanceData* clone);
|
|
|
|
|
|
2012-10-29 10:01:52 +00:00
|
|
|
|
void initFromProps(SGPropertyNode* props);
|
2020-09-02 18:49:33 +00:00
|
|
|
|
|
|
|
|
|
~PerformanceData() = default;
|
2007-06-28 07:47:20 +00:00
|
|
|
|
|
2011-11-12 17:42:59 +00:00
|
|
|
|
double actualSpeed(FGAIAircraft* ac, double tgt_speed, double dt, bool needMaxBrake);
|
2007-06-28 07:47:20 +00:00
|
|
|
|
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);
|
|
|
|
|
double actualAltitude(FGAIAircraft* ac, double tgt_altitude, double dt);
|
|
|
|
|
double actualVerticalSpeed(FGAIAircraft* ac, double tgt_vs, double dt);
|
|
|
|
|
|
|
|
|
|
bool gearExtensible(const FGAIAircraft* ac);
|
|
|
|
|
|
2020-09-02 18:49:33 +00:00
|
|
|
|
double climbRate() const { return _climbRate; };
|
|
|
|
|
double descentRate() const { return _descentRate; };
|
|
|
|
|
double vRotate() const { return _vRotate; };
|
|
|
|
|
double maximumBankAngle() const { return _maxbank; };
|
|
|
|
|
double acceleration() const { return _acceleration; };
|
|
|
|
|
double deceleration() const { return _deceleration; };
|
|
|
|
|
double vTaxi() const { return _vTaxi; };
|
|
|
|
|
double vTakeoff() const { return _vTakeOff; };
|
|
|
|
|
double vClimb() const { return _vClimb; };
|
|
|
|
|
double vDescent() const { return _vDescent; };
|
|
|
|
|
double vApproach() const { return _vApproach; };
|
|
|
|
|
double vTouchdown() const { return _vTouchdown; };
|
|
|
|
|
double vCruise() const { return _vCruise; };
|
|
|
|
|
double wingSpan() const { return _wingSpan; };
|
|
|
|
|
double wingChord() const { return _wingChord; };
|
|
|
|
|
double weight() const { return _weight; };
|
|
|
|
|
|
2012-10-01 16:18:36 +00:00
|
|
|
|
double decelerationOnGround() const;
|
2020-09-02 18:49:33 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@brief Last-resort fallback performance data. This is to avoid special-casing
|
|
|
|
|
logic in the AIAircraft code, by ensuring we always have a valid _performance pointer.
|
|
|
|
|
*/
|
|
|
|
|
static PerformanceData* getDefaultData();
|
|
|
|
|
|
2007-06-28 07:47:20 +00:00
|
|
|
|
private:
|
|
|
|
|
double _acceleration;
|
|
|
|
|
double _deceleration;
|
|
|
|
|
double _climbRate;
|
|
|
|
|
double _descentRate;
|
|
|
|
|
double _vRotate;
|
|
|
|
|
double _vTakeOff;
|
|
|
|
|
double _vClimb;
|
|
|
|
|
double _vCruise;
|
|
|
|
|
double _vDescent;
|
|
|
|
|
double _vApproach;
|
|
|
|
|
double _vTouchdown;
|
|
|
|
|
double _vTaxi;
|
|
|
|
|
|
|
|
|
|
double _rollrate;
|
|
|
|
|
double _maxbank;
|
2017-06-10 18:19:43 +00:00
|
|
|
|
|
|
|
|
|
// Data for aerodynamic wake computation
|
|
|
|
|
double _wingSpan;
|
|
|
|
|
double _wingChord;
|
|
|
|
|
double _weight;
|
2007-06-28 07:47:20 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|