Projects/Location Estimation based on Wifi Signal Strength

From Playful Exploration
Revision as of 22:16, 24 July 2016 by Peter (talk | contribs) (→‎References)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Goal

Implement an algorithm for the ESP8266 to determine it's own position in a Room/Appartmen/House based on the signal strength of surrounding Wifi networks.

Links

Experiment 1

In this experiment an ESP chip is recording the signal strength of all surrounding Wifi networks. Between 15:18 and 15:23 the ESP was moved between rooms causing the signal strength of the 6 Wifi networks to change. The values could possibly be feed into an algorithm for probabilistic location estimation in order for the ESP to self detect it's position in the room. In the experiment only 6 of the 45! wifi networks are graphically represented meaning there is plenty of information for an probabilistic algorithm to work with.

Code

print("Re-Init")
function listap(t) -- (SSID : Authmode, RSSI, BSSID, Channel)
    print("AP list ...")
    local l = ''
    for ssid,v in pairs(t) do
        local authmode, rssi, bssid, channel = string.match(v, "([^,]+),([^,]+),([^,]+),([^,]+)")
        l = l..'signal,mac='..wifi.ap.getmac()..',ssid='..bssid..' value='..rssi.."\n"
    end
    http.post("http://www.playfulexploration.com:8086/write?db=aplist", nil, l)
    tmr.start(0)
    print("... end AP list")
end
tmr.alarm(0, 1000, tmr.ALARM_SEMI, function() tmr.softwd(60) wifi.sta.getap(listap) end)

Recording

SSID-SingleStrenght.PNG