How to Calculate Distance from a WiFi network using Taifun Wifi Extension


@Taifun can you please guide me how to make use of TaifunWIFI.connectioninfo to calculate distance , For calculating distance we basically need signal strength and frequency ,idk how to implement that in app inventor .


to calculate the distance from your device to where?
any more information, about what exactly you like to calculate and how that could be done?
any link to an example calculation?


I want to calculate the distance from wifi router i.e. calculating distance from any wifi network available.
For that signal strength and frequency is used.
Formula used is this
distance = 10 ^ ((27.55 - (20 * log10(frequency)) + signalstrength)/20)

now i need frequency, ConnectionInfo in WiFi extension gives all the info i want only will be really helpful if anyone can tell me how to do this.
(I just started using app inventor i don’t know much )


what about extacting the frequency then from there?
see also tip 4 about how to use Do it here

and for log10, see Tim’s answer here



That’s the problem i don’t know how to extract the frequency from connectioninfo.


so which information exactly do you get from the ConnectionInfo method? any example?


i get this from connectioninfo method.


What is this ?


i think you should read the thread.
…i need only frequency value so that i can use it in distance calculation but connectioninfo gives me all the info i.e. ssid ,bssid ,rssi ,net id and other info including frequency … problem is how to extract only frequency


How to parse a result


Thanks @Taifun. Finally i have an app to calculate distance from WiFi network. :smile:


hi Sourabh_Jain, can you share the blocks, please