Improve network proximity thresholds
This commit is contained in:
@@ -135,8 +135,8 @@ func (l *Location) EstimateNetworkProximity(to *Location) (proximity float32) {
|
|||||||
toCoords := haversine.Coord{Lat: to.Coordinates.Latitude, Lon: to.Coordinates.Longitude}
|
toCoords := haversine.Coord{Lat: to.Coordinates.Latitude, Lon: to.Coordinates.Longitude}
|
||||||
_, km := haversine.Distance(fromCoords, toCoords)
|
_, km := haversine.Distance(fromCoords, toCoords)
|
||||||
|
|
||||||
if km <= 50 && accuracy <= 100 {
|
if km <= 100 && accuracy <= 100 {
|
||||||
// Give a flat out ten for highly accurate coordinates within 50km.
|
// Give the full value for highly accurate coordinates within 100km.
|
||||||
proximity += weightCoordinateDistance
|
proximity += weightCoordinateDistance
|
||||||
} else {
|
} else {
|
||||||
// Else, take a percentage.
|
// Else, take a percentage.
|
||||||
|
|||||||
Reference in New Issue
Block a user