Beacons Jumping when ranging

Is there anything in the API that takes a sample of readings and determines which beacon you are truly closest to?

for example sometimes it take about 8-10 readings before the closest beacon is correct.