added distance calculating function
Added day variable to gui to show the trace