Hi Pascal, we have had someone in the past try something similar. They wanted to measure the slope of sidewalk while moving. As far as we know, this is not possible because the accelerometer measures acceleration in all directions and would be picking of these variations in speed as you ride around and it would skew the figures.
You could take the measurements if you were at a constant speed or if you were not moving at all.
If you find a solution, please let us know.
Mark --OzzMaker.com --