More

How to generate missing points in GPS trajectories?

How to generate missing points in GPS trajectories?


I have some GPS trajectories that include gps locations recorded on variable frequencies (every 1 min ,5 min , 20 min,etc.)using a geographic projection WGS84. In my work, i need a fine-grained GPS collection (e.g. 30 sec) to be able to recognize accurately users' activities grom their GPS traces.

I thought then to generate the missing GPS points between two known points (for instance, when the points frequency is every 5 minutes, i need to generate the 8 missing points that should be recorded the frequency was every 30 second). Note that i have to estimate the speed of the missing GPS points in my interpolation . Could you suggest some mathematical estimation or an existing tool that can answer my issue?


GPSBabel has a function for this. To take a GPX input file and interpolate points so that each is 30 seconds apart:

gpsbabel -i gpx -f INPUT.gpx -x interpolate,time=30 -o gpx -F OUTPUT.gpx

Arguments:

  • -i gpx: input file type is GPX
  • -f INPUT.gpx: filename is INPUT.gpx
  • -x interpolate,time=30: apply a filter (x), using interpolation, interpolating any points > 30s apart;
  • -o gpx: output type is GPX;
  • -F OUTPUT.gpx: output filename is OUTPUT.gpx

Where trackpoints are less than 30s apart, it will ignore that section; where > 30s, it will interpolate at 30s intervals.