added latency tracking and fixed GPS bug