/** * Computes and returns the maximum number of turns the given unit could * fly at safe thrust given its fuel payload. Aerospace fighters consume * 1 fuel point per thrust point spent up the the maximum safe thrust, * whereas conventional fighters with turbine engines consume 0.5 fuel * points per thrust point spent up to the maximum safe thrust. * See Strategic Operations pg 34. * * @param aero * @return */ public static float calculateMaxTurnsAtSafe(Aero aero){ int fuelPoints = aero.getFuel(); float fuelPerTurn; if (aero.hasETypeFlag(Entity.ETYPE_CONV_FIGHTER) && aero.hasEngine() && (aero.getEngine().getEngineType() == Engine.COMBUSTION_ENGINE)) { fuelPerTurn = aero.getWalkMP() * 0.5f; } else if (aero.getWalkMP() == 0) { fuelPerTurn = 0.2f; } else { fuelPerTurn = aero.getWalkMP(); } return fuelPoints/fuelPerTurn; }
aero.getHeatType() == Aero.HEAT_DOUBLE ? aero.getOHeatSinks() + " [" + (aero.getOHeatSinks() * 2) + "]" : aero.getOHeatSinks()); setModelData("fuelPoints", aero.getFuel()); setModelData("fuelMass", aero.getFuelTonnage()); setModelData("hsMass", NumberFormat.getInstance().format(testAero.getWeightHeatSinks()));
retVal += MekHqXmlUtil.indentStr(indentLvl+1) + "<fuel left=\"" + String.valueOf(a.getFuel()) + "\"/>\n";
cost += (200 * getFuel()) / 80.0;
int fuelPoints = aero.getFuel(); float fuelPerTurn; if (aero.hasETypeFlag(Entity.ETYPE_CONV_FIGHTER)) {
blk.writeBlockData("omnipodheatsinks", ((Aero)t).getPodHeatSinks()); blk.writeBlockData("fuel", ((Aero)t).getFuel());