module KerbalDyn::Part::Mixin::FuelTank
Public Instance Methods
dry_mass()
click to toggle source
# File lib/kerbaldyn/part/mixin/fuel_tank.rb, line 16 def dry_mass return self['dryMass'].to_f end
fuel()
click to toggle source
Fuel capacity in m^3 to match mks requirement, even though the game seems to display liters.
Note that 1 m^3 = 1000 liters
# File lib/kerbaldyn/part/mixin/fuel_tank.rb, line 10 def fuel return (self['fuel'] || self['internalFuel']).to_f / 1000.0 end
Also aliased as: internal_fuel, capacity
fuel_density()
click to toggle source
Calculated density in kg/m^3.
Note that 1 m^3 = 1000 liters
# File lib/kerbaldyn/part/mixin/fuel_tank.rb, line 28 def fuel_density return self.fuel_mass / self.capacity end
fuel_mass()
click to toggle source
The mass of the fuel.
# File lib/kerbaldyn/part/mixin/fuel_tank.rb, line 21 def fuel_mass return self.mass - self.dry_mass end