And by the way, all of the methods of calculating altitude, and gain during a ride, have their issues. Barometric pressure and GPS fluctuate while you stay in one place, and topo info can get confused by such things as bridges crassing a ravine. As an engineer in my club who gave a longer explanation said: "pick the one that gives you best number for the day, and leave it at that!"