I am trying to find out the distance between two list of locations(lat,long). I have them all stored in separate arrays lat1, lon1, lat2, lon2. The first set is the ones I am reading of a gps system and the second is a reference. They both have over 1000 rows.
What I want to do is. Calculate distance between lat1, lon1 for all points of lat2, lon2 Then move to 2nd row of lat1, lon1 again calculate for all rows of lat2, lon2 and keep repeating.
So every calculation of the lat1, lon1 should be performed for every point of lat2, lon2.
I have to finally take a decision based on the output distance being <4
Could someone help with this please. Really appreciate this.