Why the CLBeacons array is sorted the way it is?

Hi, i have a question regarding the following scenario

▿ 5 elements

• [0] : CLBeacon (uuid:<__NSConcreteUUID 0x15e538e50> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:16516, minor:47861, proximity:2 +/- 0.72m, rssi:-61)
• [1] : CLBeacon (uuid:<__NSConcreteUUID 0x15e5a9aa0> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:34112, minor:9750, proximity:2 +/- 1.20m, rssi:-56)
• [2] : CLBeacon (uuid:<__NSConcreteUUID 0x15e5abe60> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:47271, minor:23384, proximity:2 +/- 1.20m, rssi:-59)
• [3] : CLBeacon (uuid:<__NSConcreteUUID 0x15e5aaf80> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:3106, minor:27742, proximity:2 +/- 1.32m, rssi:-61)
• [4] : CLBeacon (uuid:<__NSConcreteUUID 0x15e5c0820> B9407F30-F5F8-466E-AFF9-25556B57FE6D, major:36730, minor:32422, proximity:3 +/- 11.98m, rssi:-77)

the first beacon rssi has lower rssi reading than the second one but its accuracy is higher, why ?
is it due to unstable readings from the second beacon making it less accurate than the first one although it has a higher rssi measurement ?

so to summarise it : is the list sorted based on accuracy and not pure rssi ?

Yes, it’s sorted based on accuracy, so that the likely-closer beacons are first.

“Accuracy” takes into account the broadcasting power of the beacon. For example, if you have two beacons one meter away from the phone, one set to max +4 dBm power, one to -30 dBm, they will have vastly different RSSIs, but should have more-or-less the same accuracy.