I'm writing a smart phone app and one of it's functions is to calculate power of the vehicle that the phone is travelling in. The user enters the total weight of the vehicle and the app uses the accelerometer to get the acceleration rate and the GPS to get the velocity. My working out is below but I'm getting some odd results but I think its a code problem not a power calculation problem. Can some one tell me if the my formula is correct?
a = accelerometerReading; // In m/s/s
F = (m * a)/1000; // F (kN) = m (kg) * a (m/s/s)
P = F * v; // P (kW) = F (kN) * v (m/s)
I tested the app in a Hyundai Accent which should weight approx. 1220kg's and have about 55kw of power at the wheels. I have a known maximum acceleration of 6.7m/s/s, correct me if I'm wrong but i assume maximum acceleration wouldn't necessarily coincide with maximum power however I have made that assumption in the working out below? If I input some of the knowns and guess the velocity at time of maximum power it seems to calculate correctly but my app is spitting out 171kW which is clearly wrong.
m 1220 kg
a 6.762 m/s/s
F = (1220 * 6.762) / 1000 = 8.24964kN
v 6.7 m/s
P = 8.24964 * 6.7 = 55.272588kW