-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFuelSystem.m
36 lines (30 loc) · 1.13 KB
/
FuelSystem.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
classdef FuelSystem
% FuelSystem Summary of this class goes here
% Detailed explanation goes here
properties
fuelWeight; % current fuel weight
fuelCapacity; % fuel carrying capacity
int = 1; % percent of fuel tanks that are integral
% computed properties
getFuelVolume; % get volume needed for fuel tank
getWeight; % get overall weigth of fuel system
end
methods
function F = FuelSystem(fc,initFW)
F.fuelCapacity = fc;
F.fuelWeight = initFW;
end
function getFuelVolume = get.getFuelVolume(F)
density = 6.073; % [lb/ US gal]
convertFactor = 0.13368; % [US gal / ft^3]
getFuelVolume = F.fuelCapacity / density * convertFactor;
end
function getWeight = get.getWeight(F)
getWeight = 2.49 * (F.getFuelVolume^.6 ...
* (1/(1+ F.int))^.3 ...
* 2^.13 ...
)^1.21 ...
+ F.fuelWeight;
end
end
end