Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rssi to distance conversion #55

Closed
2 of 3 tasks
simonasaitta opened this issue Nov 20, 2019 · 7 comments
Closed
2 of 3 tasks

Rssi to distance conversion #55

simonasaitta opened this issue Nov 20, 2019 · 7 comments
Assignees
Labels
board Code concerning ESP32 firmware priority High priority task

Comments

@simonasaitta
Copy link
Collaborator

simonasaitta commented Nov 20, 2019

As continuation of issue #33 we need to do some tuning to this conversion. The position formula seems to correctly work now (99f1655) but not the conversion one.
We could try to:

  • keep changing the N and 1 meter value until we do get feasible results
  • find a new formula
  • experiment with the rssi values returned by the board to check out if they are reliable by being constant at same distances (or with a small error window)
@simonasaitta simonasaitta added board Code concerning ESP32 firmware priority High priority task labels Nov 20, 2019
@marcomicera marcomicera added this to the Hard requirements milestone Nov 20, 2019
@marcomicera marcomicera self-assigned this Nov 21, 2019
@marcomicera
Copy link
Owner

I was taking care of this but I found out a bug #56. I'll take care of that first, so we will have way more distance detections to work on.

@marcomicera marcomicera removed their assignment Nov 21, 2019
@marcomicera
Copy link
Owner

In the meantime, I've added some more useful printouts.

marcomicera added a commit that referenced this issue Nov 21, 2019
@marcomicera
Copy link
Owner

#56 has been fixed. I'm back on this.

@marcomicera marcomicera self-assigned this Nov 21, 2019
@marcomicera
Copy link
Owner

Here are my thoughts about the current formula.

My configuration

"boards": [
    {
        "mac": "...:68",
        "x": 0,
        "y": 50
    },
    {
        "mac": "...:c0",
        "x": 50,
        "y": 50
    }
],
"room_coordinates":[
    {"x": 0, "y": 0},
    {"x": 0, "y": 100},
    {"x": 100, "y": 0},
    {"x": 100, "y": 100}
]

My device "...:d1" is at x: 50, y: 0.

Some data

                   Board @(0,50)        Board @(50,50)
                      +---+                +---+
                      |:68|+--------------+|:c0|
                      +---+      50cm      +---+
                        +                    +
                        |                    |
                        |                    | 50cm
                70.71cm |                    | RSSI: -49/-41db
        RSSI: -68/-53db |                    | Avg. RSSI = -45db
      Avg. RSSI = -61db |                    |           +
                +       |                    +           |
                |       |                  +---+         |
                |       +-----------------+|:d1|         |
                |                          +---+         |
                |                       Device @(50,0)   |
                |                                        |
                |                                        |
                |                                        |
                v                                        v
      ONE_METER_RSSI should be -64db       ONE_METER_RSSI should be -51db

(Desmos example)
So basically the formula is not enough. I'll measure the average RSSI of various distances in order to derive some kind of relation between these two measures.

@simonasaitta
Copy link
Collaborator Author

Checkout this post

@marcomicera
Copy link
Owner

marcomicera commented Nov 21, 2019

Here's our current guess compared to real measurements.

             RSSI (at 1 meter)  -  RSSI (measured)       
             -------------------------------------       
                             10 * n
distance = 10                                     * 100

With RSSI (at 1 meter) = -52dBm and n = 2.

@suidpit
Copy link
Collaborator

suidpit commented Nov 23, 2019

The idea to definitely test this:

  • Let's measure, for each board, RSSI to one meter.
  • Set that to be the constant we use on the server for each board.
  • Change the position of the device (0.5 mts, 2.0 mts) and see if results on server are consistent.

@marcomicera marcomicera pinned this issue Jan 22, 2020
suprmat95 pushed a commit to suprmat95/followifier-1 that referenced this issue Feb 27, 2020
suprmat95 pushed a commit to suprmat95/followifier-1 that referenced this issue Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board Code concerning ESP32 firmware priority High priority task
Projects
None yet
Development

No branches or pull requests

3 participants