I’m wondering how elevation gain is calculated. For instance, if I start at 500 feet and hike a trail that crosses a peak of 1000’ then goes back down to 500’ and then up to another peak of 1500’ what is my total elevation gain? Is it the simply the highest point minus the starting point (i.e. 1500’-500’=1000’ gain) or is it the total of the two climbs over the two peaks less the lowest points (i.e. 1000’-500’ + 1500’-500’= 1500’)? Hope that makes sense.