Search code examples
algorithmmathdictionarybluetoothtriangulation

How do you pin point the location of a user with 3 nodes, using Triangulation?


I am trying to find a user through their Bluetooth strength (RSSI value).

I have 3 Raspberry PIs, each gathering the signal strength of the user. Lets say the nodes returned:

node1 = 65
node2 = 70
node3 = 75

How would I find the user through triangulation and pin point them on a map, and output the RSSI value?

I have researched Trilateration and Ceva's Theorem but do not know how to implement them.

I am unsure on how to locate the nodes in an environment, do I give the main node a location of x=0 y=0, and what do I give the other two nodes?


Solution

  • Your approach is predicated on some flimsy assumptions.

    Trilateration is determining a position in space based on three (or four, if working in three dimensions) distance measurements to known locations. Triangulation is determining a position in space based on three angular (what direction is the signal coming from) measurements to known locations. The three Raspberry PI nodes are fixed in space, and you have some measurement system where your (x,y (z)) positions for each are known.

    What you have are three values of signal strength in some units of power (dBm, say) and you want that to be proxy for distance to a particular receiver. The problem is, unless you are doing this in a big empty room, it isn't a particularly good proxy. RF signals bounce off of some things, develop little interference nodes, shadows, and all sorts of fun stuff. Depending on how cluttered your environment is, this can make the accuracy of your trilateration result poor, or totally worthless.

    Assuming you are operating in an empty warehouse, first you have to pick some coordinate frame and make some measurements and assign locations to your nodes. Making one node zero simplifies one of your measurements, you just need to make relative measurements to the others. Make sure your X and Y axes are perpendicular.

    Then you will want to generate some data that correlates RSSI with distance. That is, walk a known distance away from the node and make a note of what the RSSI number is. If you're lucky, this measurement will be the same for each of your nodes. It might not be - not all radios are created equally. Also, not all antenna radiate power uniformly in each direction. Use that data and some handwaving to approximate distances from the known node locations; from there the rest of the implementation should be straight forward geometry (as the wiki no doubt has laid out).