I am trying to calculate the distance between two locations in miles however the result that I am getting is incorrect.
The reason I think its incorrect is because I put locations (latitude and longitude) on this website and I get the distance in miles as 0.055
. Here are the details from my code
PointField A : (-122.1772784, 47.7001663)
PointField B : (-122.1761632, 47.700408)
Distance : 0.001141091551967795
However, according to the website, the distance should be
Distance: 0.055 miles
Here is how I am calculating the distance.
This is my model
class modelEmp(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True)
location = models.PointField(srid=4326,max_length=40, blank=True, null=True)
objects = GeoManager()
and this is how I calculate the distance
result = modelEmpInstance.location.distance(PointFieldBLocation)
where result = 0.001141091551967795
Any suggestions on what I might be doing wrong here and why my result is different from the website?