Assign SSID to connect to by distance

After reading through a bunch of resources, I ended up using the distance
metric to pick SSID. I was unable to implement this function for calculation
within the MACs or the channels, meaning I had to implement it from the main
program.

Although it is slower than expected, it works as intended and has the virtue
that it doesn't go connecting to places randomly. I can probably improve the
selection but for now it is enough for the primary experiment runs.

Tomorrow will be a fun day.