1
0
Fork 0
flightgear/src/AIModel/performancedata.hxx
durk 1613d7e63e Thomas Foerster: Prepare for the inclusion of aircraft specific performance
data for AI traffic. Default performance classes are still available as a
backup. This database will allow the calculation of aircraft-specific
take-off speed and estimate runway lenght requirements. Further added
rudimentary support for take-off and landing rotation of AIAircraft.
2007-06-28 07:47:20 +00:00

64 lines
1.9 KiB
C++

#ifndef PERFORMANCEDATA_HXX
#define PERFORMANCEDATA_HXX
#include <string>
#include <map>
class FGAIAircraft;
/**
Data storage for aircraft performance data. This is used to properly simulate the flight of AIAircrafts.
@author Thomas Förster <t.foerster@biologie.hu-berlin.de>
*/
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();
double actualSpeed(FGAIAircraft* ac, double tgt_speed, double dt);
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);
inline double climbRate() { return _climbRate; };
inline double descentRate() { return _descentRate; };
inline double vRotate() { return _vRotate; };
inline double maximumBankAngle() { return _maxbank; };
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;
};
#endif