Quantcast
Channel: GSAK Forum
Viewing all articles
Browse latest Browse all 75110

Distance/Nearby Related Macro by lignumaqua - 2013-11-29

$
0
0
This Sqlite query run against your found database should help:

SQL
select a.foundbymedate, min(g_Distance(a.latitude,a.longitude,b.latitude,b.longitude,'K')) as Dist from caches as a, caches as b where a.rowid>b.rowid and a.foundbymedate = b.foundbymedate and a.foundbymedate in (select foundbymedate from caches group by foundbymedate having count(foundbymedate)>49) group by a.foundbymedate order by dist desc


If this is run in the GSAK SQLite manager you will get a list of the dates you found 50 or more caches and the minimum distance in km between any two caches on that day. (Note: it assumes that it is run against a database with only Found caches)

user posted image

In my case, the minimum distance is 0.37 km.

However - if the challenge allows you to pick any 50 finds out of a day where you have more, then this won't help pick those 50. That's a very tough problem! For example, the first day in that list I actually found 105 caches. Would it be possible to pick a set of 50 out of that 105 which met the requirement? Possibly... blink.gif There are 2,800,460,682,733,954,509,476,682,792,960 possible combinations of 50 caches from 105 so some strategy other than brute force would be needed to test them all! ph34r.gif


user posted image

Viewing all articles
Browse latest Browse all 75110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>