I can answer your second question:
When I started first time the app,I get big value (for example 5536km.)
This is the distance from (0,0) (aequator) to your current location.
It seems that lastLon and lastLat have the initial value of 0.
So you must avoid that lastLon and lastLat is invalid.
Explicitly check for not imnitialized.