WSF
WsfBrawlerFuel.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFBRAWLERFUEL_HPP
13#define WSFBRAWLERFUEL_HPP
14
15#include "wsf_brawler_export.h"
16
17#include "WsfFuel.hpp"
18
19class WSF_BRAWLER_EXPORT WsfBrawlerFuel : public WsfFuel
20{
21public:
22 WsfBrawlerFuel(WsfScenario& aScenario);
26 ~WsfBrawlerFuel() override;
27
28 WsfFuel* Clone() const override;
29 bool Initialize(double aSimTime) override;
30 bool Initialize2(double aSimTime) override;
31 bool ProcessInput(UtInput& aInput) override;
32
33 // The primary difference between WsfFuel and WsfBrawlerFuel is that the latter
34 // calculates the fuel consumption rate based on aero tables from a model file.
35 double CalcConsumptionRate() override;
36
37protected:
38 WsfBrawlerFuel(const WsfBrawlerFuel& aSrc);
39
40private:
41 // Function from BrawlerMover
42 bool LoadAeroConfig(std::string aAeroFileAbsolutePath);
43
44 // chkrng function from BrawlerMover
45 void CheckRange(double aValue, double aMinRange, double aMaxRange, const std::string& mErrorText);
46
47 // fflo function from BrawlerMover
48 double CalculateFuelFlow(const double& aThrottleSetting, const double& aMach, const double& aAlt_m);
49
50#define mmach1 (25) // mmach1
51#define mhts (21) // mhts
52#define undnum (-999.99e30) // undnum
53
54
55 double mPrevFuelFlow;
56 double mLastUpdate_s;
57 // BrawlerMover Equivalent variables
58 int mMachArraySize; // nmach1
59 int mAltArraySize; // <= nhts
60 double mFuelFlowAdjusted; // ff_adj
61 double mThrottleMaxValue; // throtm
62 double mMachValues[mmach1]; // mchval
63 double mHeightVector[mhts]; // htvec[mhts]
64 double mFlowIdle[mmach1 * mhts]; // floidl[mmach1 * mhts];
65 double mFlowMil[mmach1 * mhts]; // flomil[mmach1 * mhts];
66 double mFlowMax[mmach1 * mhts]; // flomax[mmach1 * mhts];
67 double mAcFuelCap{0.0};
68};
69
70#endif
#define mhts
Definition WsfBrawlerFuel.hpp:51
#define mmach1
Definition WsfBrawlerFuel.hpp:50
WsfBrawlerFuel(WsfBrawlerFuel &&)=default
WsfBrawlerFuel(WsfScenario &aScenario)
Definition WsfBrawlerFuel.cpp:21
WsfBrawlerFuel & operator=(WsfBrawlerFuel &&)=default
WsfBrawlerFuel & operator=(const WsfBrawlerFuel &)=delete
WsfFuel(WsfScenario &aScenario)
Definition WsfFuel.cpp:30
bool Initialize2(double aSimTime) override
Definition WsfFuel.cpp:177
bool Initialize(double aSimTime) override
Definition WsfFuel.cpp:127
virtual double CalcConsumptionRate()
Definition WsfFuel.cpp:592
bool ProcessInput(UtInput &aInput) override
Definition WsfFuel.cpp:210
WsfFuel * Clone() const override
Definition WsfFuel.cpp:93
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Copyrights Multiple, All Rights Reserved