I don't know how to do it for multiple beacons. I would like a UDP server on Windows to be able to distinguish between beacons so that I can complete this project: Tools to determine exact location when using ibeacons
Getposition code:
float xa = beacon1.locationX;
float ya = beacon1.locationY;
float xb = beacon2.locationX;
float yb = beacon2.locationY;
float xc = beacon3.locationX;
float yc = beacon3.locationY;
float ra = b1;
float rb = b2;
float rc = b3;
float S = (pow(xc, 2.) - pow(xb, 2.) + pow(yc, 2.) - pow(yb, 2.) + pow(rb, 2.) - pow(rc, 2.)) / 2.0;
float T = (pow(xa, 2.) - pow(xb, 2.) + pow(ya, 2.) - pow(yb, 2.) + pow(rb, 2.) - pow(ra, 2.)) / 2.0;
float y = ((T * (xb - xc)) - (S * (xb - xa))) / (((ya - yb) * (xb - xc)) - ((yc - yb) * (xb - xa)));
float x = ((y * (ya - yb)) - T) / (xb - xa);
CGPoint point = CGPointMake(x, y);
return point;
}
UPDATE:
bc, address = sock.recvfrom(4096) # buffer size
adres, sygnal = bc.split(b'|') # split
x = adres.decode(encoding="utf-8")
This is an answer for my question, thats how we can recognize our beacons.