-franciskane- Posted November 16, 2020 Share Posted November 16, 2020 I made a post a while back about this topic here: and I've clarified a few things with my friend. 1. The input from the project will be coming from a mobile app which will be using a qr code. The qr code contains the Room Number and the 2 Access Points for each room. When a user scans the qr code it will pass that info to the web app that has the algorithm and verify what room he/she is in the access point that was 'scanned'. 2. For the testing of the project we decided to use two rooms of the building of our alma mater and the access points were already defined based on tests: Room 413 has Access Point 1 that have the values of -67 dBm to -89 dBm and Access Point 2 that have the values of -40 dbm to -57 dBm while Room 415 has Access Point 1 that have the values of -30 dBm to -46 dBm and Access Point 2 that have the values of -75 dBm to -100 dBm 3. I already inputted the values and the rooms I've mentioned above in mysql to verify if the input from the qr code that was scanned it correct. but sadly we are stuck with the algorithm itself. Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/ Share on other sites More sharing options...
requinix Posted November 16, 2020 Share Posted November 16, 2020 And what's the question? Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582422 Share on other sites More sharing options...
gw1500se Posted November 16, 2020 Share Posted November 16, 2020 The algorithm is not difficult to implement in PHP but it seems the problem (for me) is what values to use. Between what values are you looking to test similarity? Point 1 and 2 of room 413 or point 1 of rooms 413 and 415? Each point can have only 1 value, not a range of values. Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582424 Share on other sites More sharing options...
-franciskane- Posted November 17, 2020 Author Share Posted November 17, 2020 @requinix We just need help with the algorithm itself. and how to use the values that were mentioned above. @gw1500se Room 413 and 415 will be tested independently. This was supposed to be implemented on the whole building but for now only 2 rooms will be used first. And AP 1 and 2 for each room will also be tested. (I apologize in advance if I answered your question differently, English is not my main language) Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582431 Share on other sites More sharing options...
requinix Posted November 17, 2020 Share Posted November 17, 2020 The Euclidean distance formula is simple, but with logarithmic scales it'll be weird. What you haven't done yet is give a description of what you want to do. Saying "I have these numbers and I want to use the 'Euclidean Distance Algorithm' with them" doesn't actually say anything. What are you trying to get out of this? Why are you calculating a "distance" with field strength measurements? Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582432 Share on other sites More sharing options...
-franciskane- Posted November 17, 2020 Author Share Posted November 17, 2020 @requinix The project is about attendance tracking through wifi fingerprinting based on a published paper that I posted in my original question months ago. The project aims to track the log in and log out time of the faculty members of a school and determine the accuracy of location estimation using QR code and WIFI RSS Fingerprinting. Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582434 Share on other sites More sharing options...
requinix Posted November 17, 2020 Share Posted November 17, 2020 Not sure how the QR code is supposed to help, but if you want to determine approximate location based on signal strengths, convert those signal strengths into distances from the AP (it's not enough to know -67 dBm but you have to know where that measurement happened), then apply standard triangulation math (which also requires knowing the location of the APs themselves). In other words, get some real world numbers, do the math on paper until you get the right answers, then translate that math into code. Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582435 Share on other sites More sharing options...
-franciskane- Posted November 17, 2020 Author Share Posted November 17, 2020 (edited) @requinixI think my friend has already done that part. that's why the code is the only thing missing. since the algorithm is already available from the published paper. Edited November 17, 2020 by -franciskane- added an attachment Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582436 Share on other sites More sharing options...
requinix Posted November 17, 2020 Share Posted November 17, 2020 There are three things about this thread that bother me: 1. You still haven't asked a specific question. As in, written a sentence that ends in a question mark. You've said things about algorithms and papers and Euclidean this and Euclidean that, but never asked a question. 2. "Euclidean distance" is a highly Google-able phrase that leads to a very simple (you probably already know what it is, even if you aren't aware of it yet) equation. 3. You're reading through a paper that involves... well, it's not that it has a lot of math in it, but that it's not casual reading material. Honestly, a lot of it is quite obvious if you give it a minute - what's "new" is the concept of using multiple measurements as a way of reducing errors. It's basically statistical regression. So how about you do everyone a favor and ask a specific question that demonstrates either (a) you do not have the necessary background information about how the math is supposed to work, and are looking for an explanation of it, or (b) you do have the necessary background information and are having a hard time with one or more specific aspects of translating that information into code. Above all, I want to see a sentence with a question mark. Bonus points for stating what Euclidean distance is, and more bonus points for posting the code you've written so far. Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582437 Share on other sites More sharing options...
gw1500se Posted November 17, 2020 Share Posted November 17, 2020 Just for the record here is the algorithm in PHP. $d=sqrt(pow($q2-$1q1,2)+pow($q4-$q3,2)+pow($q6-$q5,)+...); What you use for those values and how many is up to you. Quote Link to comment https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/#findComment-1582442 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.