With the exception of using fairly sophisticated methods for processing data signals or using an accelerometer and dead calculation (which is very inaccurate), a GPS device cannot measure its own speed. In this regard, the speed data provided by the GPS module is interpolated using the same method that you want to use. These two probably have similar accuracy, except for minor errors introduced in accordance with any algorithms that are used by both the manufacturer and the manufacturer of GPS chips.
There are more advanced filtering / data processing methods for interpolating speed over several points, not just the very last two. In all likelihood, your GPS chip already implements one of them, and therefore will be more accurate than your more rudimentary implementation.
David pfeffer
source share