I'm building an application that uses data from GPS units on board vehicles and displays it on a map. A lat/long is recorded every .5 seconds and a session can be many hours... this can add up to be a lot of data. The vehicles travel in a straight line the majority of the time but the data needs to be very accurate when a vehicle turns a corner, hence the high recording frequency. I'm storing the lat/longs as a POINT in a PostGIS/PostgreSQL database (This isn't set in stone).
I'm trying to find a way of reducing the dataset when displaying it on the map while still maintaining accuracy.
I have come up with a few options:
Group the data into 2 second blocks and average the lat/longs in each group. This is really easy to do but has too much information when traveling in straight lines and not enough when turning corners.
Group points together which are a certain distance (a vehicles length?) and time (4 seconds?... to ensure it won't be group if a vehicle moves over the same point half an hour later)
Calculate splines of the data (I don't know very much about this option).
Perhaps PostGIS already provides this functionality? I'm simply looking for someone to point me in the right direction.