Area around a GPS track

I am looking for a tool to define an area around a GPS track. In JOSM there is such a function, but I need a file that allows me to punch out this area from a local OSM file on my computer with OSMCONVERT. At the moment I have created and modified for this purpose an outline file in GoogleEarth manually, but I would have to redefine it every time I changed the GPS track. And I hate double work! BTW The formats of GPS-track and “outline file” are not important at first.

I thought about writing such a tool myself, but the mathematics behind it is not trivial (for me, a lot of geometry:rolleyes:) . So before I start the extensive work of writing something I can use in Python (?), I’ll ask you here.

I have not used osmconvert but I see from a man page that you can use a polygon to define the area required
If you are familiar with Qgis you could upload the gpx to Qgis and apply a buffer around the track and save the area as a polygon then use the polygon in osmconvert