function speed(p, Kv, v) {
	var rpm, mph;

	rpm = (Kv * v);
	mph = (((p * rpm) / 12) * 60) / 5280;
	mph = Math.round(mph);
	return mph;
};

function wingarea(root, tip) {

};

function wingloading (area, weight) {

};

// Takes a weight and the units and returns
// the weight in pounds
function getPounds(weight, units)
{
	switch (units)
	{
		case "pounds":
		case "lb":
			return weight;
		case "oz":
			return weight/16.0;
		case "grams":
		case "g":
			return weight/453.59237;
	}
};

// Given the weight, units, and watt per pound range required
// it will return the number of watts needed. watts_per_pound
// should be a trink in the format "low:high" where low and high
// are numbers that represent the low and high values for the range
function getWattsRequired(weight, weight_units, watts_per_pound)
{
	// first convert the units into pounds
	var pounds = getPounds(weight, weight_units);

	// split up the watts range
	var bounds_array = watts_per_pound.split(":");

	// calculate the low and high range by
	// multipling the weight in pounds by the
	// amount of watts required per pound
	var lowWatts = pounds * bounds_array[0];
	var highWatts = pounds * bounds_array[1];

	// build the range
	var range = Math.round(lowWatts) + "-" + Math.round(highWatts);

	return range;
};
