Anyways, I was trying to get an accurate location and it kept giving me lat/long of 42 by 78. It was weird because it was saying the accuracy was like 1-28m. At first I thought it was because it kept selecting the network provider as more accurate as I was indoors. This got me running in and out of the house to try and get it to work.
But it wasn't working. Even when I explicitly chose the GPS as the location provider and set the accuracy to ACCURACY_FINE, it still was 42 by 78. After tons of frustration I looked at my logging code and I was casting the lat and long to int instead of a fucking double. Duh, it was being rounded. I could kill myself for not having noticed this and wasting so much time. I guess this is what I get for programming as entertainment at 2:41am on a saturday.
double lat = (double) (location.getLatitude()); double lng = (double) (location.getLongitude());
vs
int lat = (int) (location.getLatitude()); int lng = (int) (location.getLongitude());
At 2:41 am I know I wouldn't be able to think clear but that is just me.... Or maybe the fact that drinking is the only reason I would be up at that time would be a factor.....
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.
—Douglas Adams, "Last Chance To See".