-
Notifications
You must be signed in to change notification settings - Fork 4
Description
I noticed in set_med_coord.c, euclidean_distance() makes the following call:
ebpf_sqrt((a * a) + (b * b), 6)
whereas in compare_med.c, the difference of the squares of a and b is used. The former looks correct to me, but not the latter, based on my understanding of Euclidean distance.
Also, from reading the documentation in libxbgp/docs/source/rfc_implementing.rst, it seems you are using the latitude and longitude of the routers in question. I think computing the spherical distance, instead of Euclidean distance, would yield more accurate results.
As an aside, I have concerns about using geographical data in general for making network management decisions. At the very least, I hope you will add some text to the documentation advising users of this feature of the risks involved.