Skip to main content

I walk and ski.  On the app and website for skiing it shows the descent labelled vertical. On the app and website for walking it shows the steps.  But neither the API nor the JSON I get from the activity end point has this metric.

Thoughts?  Where can I get it?

 

DAvid

You can calculate the total descent with total_ascent - end_height + start_height. The last two you can get for example from the activity streams.


The API exposes total_elevation_gain (ascent), elev_high, and elev_low, but does not provide total descent. Descent cannot be derived correctly from these fields: elev_high and elev_low are extrema anywhere along the route, not start/end altitude, and they are computed differently from total_elevation_gain. As a result, any calculation of descent from the summary data is systematically wrong for my hikes.

 

Is it possible to expose total_elevation_loss (descent) in the activity object so that ascent and descent can both be accessed without downloading full altitude streams?


@wlangera Just read the solution, you can get the elevation at the start and end from the elevation stream.


@wlangera Just read the solution, you can get the elevation at the start and end from the elevation stream.

Ok. I was confused on what stream data was. It works out, thanks.