Note: This page describes the development version of GPSBabel. It may substantially differ from the latest released GPSBabel.

Resample Track (resample)

The resampling filter can be used to change the sample rate of a track. It is intended to be used with track points that have been sampled at a constant rate. It can be used to change the sample rate by a rational factor. It can also be used to smooth a track with or without changing the sample rate. The filter works across the antimeridian.

Example 4.24. Interpolation with the resampling filter

This examples doubles the sample rate. The data is filtered after interpolation regardless of the order of the options.

gpsbabel -t -i unicsv -f data.csv -x resample,interpolate=2,average=2 -o unicsv,utc=0 -F fast.csv


Example 4.25. Decimation with the resampling filter

This examples reduces the sample rate by a factor of 4. The data is filtered before decimation regardless of the order of the options.

gpsbabel -t -i unicsv -f data.csv -x resample,average=4,decimate=2 -o unicsv,utc=0 -F slow.csv


Example 4.26. Averaging with the resampling filter

This examples averages the adjacent points. A running average filter of length two samples is applied in the forward and reverse directions.

gpsbabel -t -i unicsv -f data.csv -x resample,average=2 -o unicsv,utc=0 -F smooth.csv


decimate option

Decimate, decrease sample rate by a factor of n.

This options is used to decrease the sample rate. The value of this option is an integer factor to decrease the sample rate by. If using this option the minimum value is two. Normally decimation would also use averaging, but it is not required. This option may be useful in the case of very long tracks that were sampled at an inappropriately high rate.

interpolate option

Interpolate, increase sample rate by a factor of n.

This options is used to increase the sample rate. The value of this option is an integer factor to increase the sample rate by. If using this option the minimum value is two. If using this option the average option must be used with average value greater than or equal to the interpolate value. It is recommended to use an average value that is an integer multiple of the interpolate value.

average option

Running average of n points.

This options is used to control the amount of filtering. The value of this option is the length of the running average filter that is used to smooth the data. The running average filter is applied once in the forward direction and once in the backwards direction. If using this option the minimum value is two.