~Airplane();
void iterate(float dt);
- void consumeFuel(float dt);
+ void calcFuelWeights();
ControlMap* getControlMap();
Model* getModel();
void addApproachControl(int control, float val);
void addCruiseControl(int control, float val);
+ void addSolutionWeight(bool approach, int idx, float wgt);
+
int numGear();
Gear* getGear(int g);
+ int numThrusters() { return _thrusters.size(); }
+ Thruster* getThruster(int n) {
+ return ((ThrustRec*)_thrusters.get(n))->thruster; }
+
int numTanks();
void setFuelFraction(float frac); // 0-1, total amount of fuel
float getFuel(int tank); // in kg!
+ float setFuel(int tank, float fuel); // in kg!
float getFuelDensity(int tank); // kg/m^3
float getTankCapacity(int tank);
int handle; float cg[3]; float mass; };
struct Control { int control; float val; };
struct WeightRec { int handle; Surface* surf; };
+ struct SolveWeight { bool approach; int idx; float wgt; };
void runCruise();
void runApproach();
void compileContactPoints();
float normFactor(float f);
void updateGearState();
+ void setupWeights(bool isApproach);
Model _model;
ControlMap _controls;
Vector _rotors;
+ Vector _solveWeights;
+
Vector _cruiseControls;
State _cruiseState;
float _cruiseP;