EEVblog Electronics Community Forum

Products => Computers => Programming => Topic started by: Ed.Kloonk on January 24, 2022, 11:29:57 pm

Title: [solved]GPX file with points every second. Too many. Need every 3s or 4s instead
Post by: Ed.Kloonk on January 24, 2022, 11:29:57 pm
Do you know how to use gpsbabel to make it drop the number of points in a gpx file to a minimum time not maximum?

Target program is suffering indigestion. Needs points spaced out to 3 or 4 seconds (and drop any in between)

The position,time=x param isn't what I want.

Found this. Someone asked the same thing. Didn't provide a solution tho.
https://sourceforge.net/p/gpsbabel/mailman/gpsbabel-misc/thread/FF91E642-5E22-46BC-9BD9-15085B53DE4F%40mac.com/#msg28161398

Title: Re: GPX file with points every second. Too many. Need every 3s or 4s instead
Post by: ve7xen on January 25, 2022, 12:05:54 am
The 'resample' filter was added in gpsbabel 1.8.0 released a few days ago. Not exactly what you're asking for, but allow you to reduce the sample rate by a factor (decimate).
Title: Re: GPX file with points every second. Too many. Need every 3s or 4s instead
Post by: Ed.Kloonk on January 25, 2022, 12:11:36 am
The 'resample' filter was added in gpsbabel 1.8.0 released a few days ago. Not exactly what you're asking for, but allow you to reduce the sample rate by a factor (decimate).

Thanks. Will check it out.
Title: Re: GPX file with points every second. Too many. Need every 3s or 4s instead
Post by: Ed.Kloonk on January 25, 2022, 03:44:34 am
Finally got it to do what I wanted.

I had to basically run two passes because I was using  track,fix=3d as well as the position,time=3, prolly because the input file came from a multi day, multi gpx file abomination.

New and previous version produced byte for byte outputs. v1.8.0 vs v1.7.0

For anyone who cares:
gpsbabel v1.8.0 (linux) now uses qmake and no longer ./configure && make   
https://www.gpsbabel.org/htmldoc-1.8.0/Source.html (https://www.gpsbabel.org/htmldoc-1.8.0/Source.html)