VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aircraftFuelConsumptionModel.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfutil/vrfutilDefines.h"
13 
14 #include <vector>
15 
16 
29 {
30 public:
32  static DtAircraftFuelConsumptionModel* Create(
34 
36 
39 
41  virtual bool isValid() const;
42 
53  virtual bool addDataPoints(
55  double startMass, double endMass,
56  std::ostream* errorStream = 0) = 0;
57 
60  virtual double calculateEfficiency(
61  double range, double speed, double startMass, double endMass) const;
62 
64  virtual double calculateRange(
65  double speed, double altitude, double startMass, double endMass) const;
66 
68  virtual double interpolateEfficiency(double speed, double altitude) const = 0;
69 
74  virtual double fuelConsumed(
75  double range, double speed, double altitude, double mass) const;
76 
78  virtual bool shouldConsumeFuel() const;
79 
81  virtual void setShouldConsumeFuel(bool shouldConsume);
82 
83 protected:
84 
86 };
87 
91 {
92 public:
93  virtual bool addDataPoints(const DtRwAircraftEngineEfficiencyDataPointList& datapoints,
94  double startWeight, double endWeight,
95  std::ostream* errorStream = 0);
96 
97  virtual double interpolateEfficiency(double speed, double altitude) const;
98 
99  virtual double fuelConsumed(double range, double speed, double altitude, double mass) const;
100 
101  virtual double calculateRange(
102  double speed, double altitude, double startMass, double endMass) const;
103 
105  virtual bool shouldConsumeFuel() const;
106 };
107 
110 {
111 public:
113 
114  bool isValid() const;
115 
117  virtual bool addDataPoints(const DtRwAircraftEngineEfficiencyDataPointList& datapoints,
118  double startWeight, double endWeight,
119  std::ostream* errorStream = 0);
120 
121  virtual double interpolateEfficiency(double speed, double altitude) const;
122 
123 protected:
124  double myEfficiency;
125 };
126 
131 {
132 public:
134 
135  virtual bool isValid() const;
136 
138  virtual bool addDataPoints(const DtRwAircraftEngineEfficiencyDataPointList& datapoints,
139  double startWeight, double endWeight,
140  std::ostream* errorStream = 0);
141 
142  virtual double interpolateEfficiency(double speed, double altitude) const;
143 
144 protected:
146  double myGridPoints[2][2];
147 
148  double myMinAltitude, myMaxAltitude;
149  double myMinSpeed, myMaxSpeed;
150  double myXDYD;
151 
153 };
double myMinAltitude
Definition: aircraftFuelConsumptionModel.h:148
double myEfficiency
Definition: aircraftFuelConsumptionModel.h:124
virtual double interpolateEfficiency(double speed, double altitude) const =0
Interpolate an engine efficiency at a given speed and altitude.
bool myValidFlag
Definition: aircraftFuelConsumptionModel.h:152
double myXDYD
Definition: aircraftFuelConsumptionModel.h:150
Implements the Breguet range equation V(L/D) Range = ---—*ln(Wi/Wf) g*SFC V = Velocity L/D = Lift/Dra...
Definition: aircraftFuelConsumptionModel.h:28
virtual bool shouldConsumeFuel() const
Returns true if the model should currently consume fuel.
double myMinSpeed
Definition: aircraftFuelConsumptionModel.h:149
virtual bool isValid() const
Allows system to be configured but still warn user that something may be wrong.
virtual double fuelConsumed(double range, double speed, double altitude, double mass) const
Calculate the fuel consumed over a given range.
virtual double calculateRange(double speed, double altitude, double startMass, double endMass) const
Calculates the range at specific conditions.
virtual bool addDataPoints(const DtRwAircraftEngineEfficiencyDataPointList &datapoints, double startMass, double endMass, std::ostream *errorStream=0)=0
Configure the model with a set of data points. Each data point has a range, altitude, and speed. Combined with the startMass and endMass, can be used to determine an engine efficiency.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
bool myShouldConsumeFuel
Definition: aircraftFuelConsumptionModel.h:85
Uses no fuel.
Definition: aircraftFuelConsumptionModel.h:89
Uses bilinear interpolation to interpolate an efficiency. Must be supplied with exactly four data poi...
Definition: aircraftFuelConsumptionModel.h:129
Uses a single efficiency number (i.e. doesn&#39;t do any interpolation).
Definition: aircraftFuelConsumptionModel.h:109
Definition: rwAircraftEngineEfficiency.h:66

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)