Skip to content

Instantly share code, notes, and snippets.

View michyprima's full-sized avatar

Michele Primavera michyprima

View GitHub Profile
@michyprima
michyprima / gpxsmooth.py
Last active August 27, 2024 18:22 — 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) :