public
Created

  • Download Gist
gistfile1.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
diff --git a/iPhoneTrackingAppDelegate.m b/iPhoneTrackingAppDelegate.m
index 1d22ecb..4af2bcf 100644
--- a/iPhoneTrackingAppDelegate.m
+++ b/iPhoneTrackingAppDelegate.m
@@ -146,7 +146,7 @@
return NO;
}
 
- const float precision = 100;
+ const float precision = 10000;
NSMutableDictionary* buckets = [NSMutableDictionary dictionary];
 
NSString* queries[] = {@"SELECT * FROM CellLocation;", @"SELECT * FROM WifiLocation;"};
@@ -176,12 +176,12 @@
continue;
}
 
- const float weekInSeconds = (7*24*60*60);
+ const float weekInSeconds = (360);
const float timeBucket = (floor(unixTimestamp/weekInSeconds)*weekInSeconds);
 
NSDate* timeBucketDate = [NSDate dateWithTimeIntervalSince1970:timeBucket];
 
- NSString* timeBucketString = [timeBucketDate descriptionWithCalendarFormat:@"%Y-%m-%d" timeZone:nil locale:nil];
+ NSString* timeBucketString = [timeBucketDate descriptionWithCalendarFormat:@"%Y-%m-%d-%H" timeZone:nil locale:nil];
 
const float latitude_index = (floor(latitude*precision)/precision);
const float longitude_index = (floor(longitude*precision)/precision);

Could you tell me or point me to how to, or where I can learn how to implement this code? I'm very interested to see the results of this app with greater precision, but am something of a novice currently and can't seem to get it working! Any help would be appreciated! Thanks!

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.