Skip to content

Instantly share code, notes, and snippets.

@michyprima
michyprima / gpxsmooth.py
Last active October 11, 2021 15:55 — forked from jdeblese/gpxsmooth.py
Path smoothing script for GPX files (py3 + fixes)
import math
import numpy
import sys, os
from lxml import etree
Re = 6371000 # Earth radius in meters
# Extract the latitute and longitude as a tuple in radians from a <trkpt> element
def extract(trkpt) :