performance improvement, use vector for storing the gps samples