Random thought. Could you compare acceleration going uphill, downhill, and on a level street to estimate mass, somehow keeping the RPM the same on the engine?
You would have to know the rolling resistance of the tires, aero load, and the exact amount of horsepower the engine is outputting to the wheels. It is impractical, once you consider engine wear, air density, and probably a few other factors required to get a correct reading.