added function to continuously update device position