What is the structure of a generic (or device independent) physical location? My guess is it might be a struct with two long fields, or something similar.
Also, given one destination location, and two candidate locations, is there a simple algorithm for determining which candidate is closest to the destination? I'm not really looking for a library or service that handles all of this, though that could be an option (in Java), rather I want some very simple low level concepts that I can actually manipulate myself.
Thanks!
Edit Given the intricasies of the calculations noted by f1sh - is there a nice small Java library that handles haversine calculations?