Converting GPX to TXT files by using GPSBabel to first convert it to csv files.
GPSBabel converts the Lat Long WSG 84 system to the UTM coordinate system, allowing simple calculations with meters.
Works on windows, linux and mac (only tested on mac though).
Change the bottom command with your full path to GPSBabel and if preferred you can change the data and output folder.
GPSBabel creators