Wow, that looks pretty nice.
I'm curious, what IDE and/or editor are you using?
Also, I think the gear ratio should include an explanation of what it means. And, also the battery. I noticed that the "Open circuit voltage" of ping's batteries are typically 51-52 volts even though the operating voltage is usually 48 volts, so that might be clarified as the formula is based on the "open circuit voltage".
Anyways, I'll come up with the formulas that both of us could use for the java and online application.
rho = (1.293*273.15/(Temperature+273.15))*Math.pow(2.71828183,-1.293*9.8*Altitude/101325); //where temperature is in C, and altitude is in meters. A conversion function might be written from F to C and "ft." to meters for imperial users.
I think kreuzotter meant 273.15 instead of 373, as 273.15 is the Kelvin temperature at sea level and you'd basically get P_sea_level != P_sea_level if you plugged in 0 for altitude and 0 degrees celsius, in Kelvin(273.15), so it's obvious the kelvin temperature for 0 degrees Celsius was meant as the numerator.
There was another one I was thinking of.... hmmmm....
Edit: Oh yes, that's right. A revamped formula for the grade portion of the power_needed function. The problem with the current one is that it's based on small-angle approximation which means it's pretty accurate for small angles(upwards to 20% slope) but it becomes increasingly inaccurate past that. So I'll find...errmm... I mean formulate a better one.
A quick one of the top of my head is... sin(arctan(grade/100)) if grade means "this many units up for every 100 units forward". If grade actually means that 100% means 90 degrees(straight up), then sin(grade/100) would replace grade/100. (I guess I need to investigate the "standard" definitions.)
I'm also curious, how easy is the application able to port to an applet? If you wouldn't mind. Of course, you'll be in the credits.