Speed geolocation

i am trying to build gpstracker with speed movement feature.
Does anyone has example of the implementation of speed ???