Jump to content

Recommended Posts

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.
 

 

Link to comment
https://forums.phpfreaks.com/topic/311713-euclidean-distance-algorithm-in-php/
Share on other sites

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.

@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)

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?

@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.

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.

@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. 

algo1.png.16ceec15af26ae6cee1aa8859e4622cf.png

Edited by -franciskane-
added an attachment

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.