well weight has everything to do with horsepower if you are going to attempt to dyno the car by OBD-II.. On an actual dyno, the car accelerates the rotation of a known mass and a force calculation is made. On the dyno, they are trying to make the only variable in the hands of the car the amount of force it can put out at the drive wheel.
For a very simple explination -- To calculate the horsepower given only vehicle speed, you have to calculate the acceleration by measuring changes in velocity over time, then multiply the acceleration by the mass of the vehicle to derive force (oh; and do a lot of unit conversions in there if you are doing lbs, mph, and HP) Remember F=ma? The reality is a bit more complicated since you end up really talking about rotational acceleration, etc. but the idea is the same..
This is essentially the methods that many 'dashboard dyno' products use. The accuracy of such a measurement is highly dependent on two things:
1) Knowing the correct mass of the vehicle, currently, including driver and gear and gasoline. A variation by only a few pounds could significantly affect the accuracy.
2) The accuracy and frequency of the measurements.
You should only need to collect two pieces of data from OBDII to make a good dyno graph out of this kind of data - RPM and speed. Polling only these two values should get you a couple of data points per second for each value. That should be enough data to get you into the ballpark of what your car is putting out, and should definately get you data good enough to be able to benchmark your car run-for-run against itself (ie to test performance modifications; etc.)
There is a good implementation of a dyno function in the CVS tree of freediag at
http://freediag.sourceforge.net/ -- compiling from CVS seems to be broken for me at this point, so I have not had a chance to test it, but If I ever get a chance to, I'll post about it here.
I will also note that adding a real accelerometer into the mix could improve your results greatly.. the dashboard products are doing this. On a Computer, you could probalby interface to one of the accelerometers from
http://www.phidgets.com/ to get better accuracy.