range mapping algorithm

Take a script, leave a script - Like the penny tray only different

Postby streaker69 » Thu Nov 24, 2005 7:52 pm

DreadedOne509 wrote:Read, and re-read post #7, and you made some valid points regarding direction and possible obstructions that could reduce the signal strength seen by NS thereby causing an inherent inaccuracy in the result.

However, with some 'knowns' you could reduce the amount of error by triangulating the information that is easily garnered by NS.

Image In this example the NS1 is the first of 3
readings from within NS. NS2, and NS3 are the subsequent readings
with matching suspected AP locations in relation to the unknown actual AP location.

Notice that there is an obstruction blocking the NS1 reading making it appear much further away than it actually is, where as NS2, and NS3 have no such obstructions and their suspected location is much closer to the actual location of the AP. Using a triangulation formulae to plot location would be much closer to the truth than if you were just using NS1 information.

Yes, I understand that it would be almost impossible to get 100% accuracy, but with triangulaion you could get a lot more accurate than the current guesses.


You're forgetting about multipath issues with this particular band.
Treat your gun like your genitals, only whip it out when it's absolutely necessary.
User avatar
streaker69
 
Posts: 11867
Joined: Thu Jul 08, 2004 10:09 am
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA

Postby DreadedOne509 » Thu Nov 24, 2005 8:08 pm

streaker69 wrote:You're forgetting about multipath issues with this particular band.


Very valid point, and I did not consider multipath propagation in the above example thus making what could be a fairly simple formulae into a much more complex one.

That's where considering signal strength and SNR ratio could reduce the error in plotting the actual location of the AP though.

The average placement of an AP in a residential setting could cause multipath propagation from everything from a rocker on the front porch to junior and his new braces in the living room you may recieve 100's of weaker multipath signals that could be discarded, while keeping n amounts of other stronger signals to use in the triangulation. If you take 10 readings for the same AP, and discard the weakest 7, you still have enough info to at least get a little closer I would think.
DreadedOne509
Mini Stumbler
 
Posts: 5
Joined: Thu Nov 24, 2005 3:28 am

Postby streaker69 » Thu Nov 24, 2005 8:10 pm

DreadedOne509 wrote:Very valid point, and I did not consider multipath propagation in the above example thus making what could be a fairly simple formulae into a much more complex one.

That's where considering signal strength and SNR ratio could reduce the error in plotting the actual location of the AP though.

The average placement of an AP in a residential setting could cause multipath propagation from everything from a rocker on the front porch to junior and his new braces in the living room you may recieve 100's of weaker multipath signals that could be discarded, while keeping n amounts of other stronger signals to use in the triangulation. If you take 10 readings for the same AP, and discard the weakest 7, you still have enough info to at least get a little closer I would think.


Sounds like an awful lot of work, for what porpoise?
Treat your gun like your genitals, only whip it out when it's absolutely necessary.
User avatar
streaker69
 
Posts: 11867
Joined: Thu Jul 08, 2004 10:09 am
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA

Postby DreadedOne509 » Thu Nov 24, 2005 8:17 pm

Not sure, began by reading some of the previous posts in this thread, that got me to thinking, and it went to hell from there.

I'm still learning the limitations, and abilities of my current hardware, and software and am absolutely fascinated by wireless technologies in regard to computing so I get carried away sometimes.

My father is an electrical engineer with many years of experience in radio (you name it, he's probably done it), guess a little of it has rubbed off on me.
Still think it would be possible to get a better angle on AP location using triagulation though, just not sure on how it could be implemented within NS.

Give me some time, and I'll either post a success here, or I'll quietly eat crow...
DreadedOne509
Mini Stumbler
 
Posts: 5
Joined: Thu Nov 24, 2005 3:28 am

Postby streaker69 » Thu Nov 24, 2005 8:19 pm

DreadedOne509 wrote:Not sure, began by reading some of the previous posts in this thread, that got me to thinking, and it went to hell from there.

I'm still learning the limitations, and abilities of my current hardware, and software and am absolutely fascinated by wireless technologies in regard to computing so I get carried away sometimes.

My father is an electrical engineer with many years of experience in radio (you name it, he's probably done it), guess a little of it has rubbed off on me.
Still think it would be possible to get a better angle on AP location using triagulation though, just not sure on how it could be implemented within NS.

Give me some time, and I'll either post a success here, or I'll quietly eat crow...


By all means, give it a shot. If you get it to work, we'd all be interesting in seeing the results. If not, let us know as well, we won't bust your chops for trying.
Treat your gun like your genitals, only whip it out when it's absolutely necessary.
User avatar
streaker69
 
Posts: 11867
Joined: Thu Jul 08, 2004 10:09 am
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA

Postby wrzwaldo » Thu Nov 24, 2005 8:23 pm

DreadedOne509 wrote:Not sure, began by reading some of the previous posts in this thread, that got me to thinking, and it went to hell from there.

I'm still learning the limitations, and abilities of my current hardware, and software and am absolutely fascinated by wireless technologies in regard to computing so I get carried away sometimes.

My father is an electrical engineer with many years of experience in radio (you name it, he's probably done it), guess a little of it has rubbed off on me.
Still think it would be possible to get a better angle on AP location using triagulation though, just not sure on how it could be implemented within NS.

Give me some time, and I'll either post a success here, or I'll quietly eat crow...








Mmmmmmmmmmmmmmmm Crow
wrzwaldo
 
Posts: 8995
Joined: Sun Dec 14, 2003 12:43 pm

Postby Gcrom » Tue Mar 13, 2007 10:13 am

Check out http://signaldisplay.com/RF_locator.exe.
It triangulates using three points.
I need a similar program/formula in excel or with command line parameters...

the formula used by RF_locator-found on another page:
-----------------------------------------------
The solution found to the equations for three sensors (x,y and amplitude) can be reduced to the following C-code which is valid in one plane. All variables below are type float in C:

Main(){

Float a, b, vdet1, vdet2, vdet3, d, g, h, x, y

Float angle, scale, intensity

a = vdet1/vdet2;

b = vdet1/vdet3;



// constant d is distance between sensors and origin. In this case,

// the sensors are located at (2,0), (-2,0), and (0,2). Change d for your

// application, i.e. for sensors 4 inches from origin use d=4

d = 2;

g = 4*(a*a) – 8*b + 4 + 8*b*b – 8*a*b;

// g is an intermediate variable

h = 2 + 2*a + 2*sqrt(2*a – 1 – a*a + 4*b – 4*b*b + 4*a*b)

// h is an intermediate variable

x = -h*(a - 1)*d/g

y = h*(a - 2*b + 1)*d/g

angle = atan2(y,x)*360/6.28; // angle to source

//I is the intensity of the source.

scale = 3; // scale is adjusted based on constants k in the formula

intensity = vdet1*(4*d*d*h)/(g*scale);

}
Gcrom
Mini Stumbler
 
Posts: 2
Joined: Tue Mar 13, 2007 8:46 am

Postby Gcrom » Tue Mar 13, 2007 10:17 am

Correction --http://signaldisplay.com/RF_Locator.exe
Gcrom
Mini Stumbler
 
Posts: 2
Joined: Tue Mar 13, 2007 8:46 am

Postby wrzwaldo » Tue Mar 13, 2007 10:21 am

Why not just correct the link in your original post?

You also need to read the posts in the "Welcome Desk", including the rules.
wrzwaldo
 
Posts: 8995
Joined: Sun Dec 14, 2003 12:43 pm

Postby Barry » Tue Mar 13, 2007 11:54 am

Is today "day of the living dead" day?
Never do anything you don't want to explain to the paramedics.
User avatar
Barry
 
Posts: 5713
Joined: Sat Dec 28, 2002 11:10 pm
Location: Ohio

Postby wrzwaldo » Tue Mar 13, 2007 12:05 pm

Barry wrote:Is today "day of the living dead" day?


Looks like it. Damn it, I didn't get the memo!
wrzwaldo
 
Posts: 8995
Joined: Sun Dec 14, 2003 12:43 pm

Re: range mapping algorithm

Postby Hayden20 » Thu Jan 12, 2012 3:08 am

here i am sharing something about general algorithm. Let v = the normalized vector starting at a, pointing to b. I'll assume a is not equal to b. Then we have v = b-a/|b-a| = (x2-x1, y2-y1) / Sqrt((x2-x1)^2+(y2-y1)^2). I assume you know the height h and width w of the triangle. The upper vertex of the triangle is then a + h v, using vector math.

The lower left vertex is slightly more complicated. Let w be the vector perpendicular to v. A property of perpendicular vectors in the plane is that their coordinates are just flipped, with one negated, with a scaling factor between them. Take v=(v1, v2), using the above formulae for v1 and v2. Then u = the vector perpendicular to v = (-v2, v1). Since v is a unit vector, so is u. The lower left vertex of the triangle is then simply a + u * w/2, and the lower right vertex is a - u * w/2.

You can do all of this in terms of angles and trig functions, but this is much neater, and doesn't suffer from singularities that you have to special case out.


A note on vector math: do everything component-by-component. c*(d,e) = (c*d, c*e); (f,g)+(h,i) = (f+h,g+i). Using these properties and the formulae above you should be able to code it up without much trouble.
__________________
Hayden20
Mini Stumbler
 
Posts: 2
Joined: Thu Jan 12, 2012 2:03 am

Re: range mapping algorithm

Postby Barry » Thu Jan 12, 2012 3:38 pm

Hayden20 wrote:here i am sharing something about general algorithm. Let v = the normalized vector starting at a, pointing to b. I'll assume a is not equal to b. Then we have v = b-a/|b-a| = (x2-x1, y2-y1) / Sqrt((x2-x1)^2+(y2-y1)^2). I assume you know the height h and width w of the triangle. The upper vertex of the triangle is then a + h v, using vector math.

The lower left vertex is slightly more complicated. Let w be the vector perpendicular to v. A property of perpendicular vectors in the plane is that their coordinates are just flipped, with one negated, with a scaling factor between them. Take v=(v1, v2), using the above formulae for v1 and v2. Then u = the vector perpendicular to v = (-v2, v1). Since v is a unit vector, so is u. The lower left vertex of the triangle is then simply a + u * w/2, and the lower right vertex is a - u * w/2.

You can do all of this in terms of angles and trig functions, but this is much neater, and doesn't suffer from singularities that you have to special case out.


A note on vector math: do everything component-by-component. c*(d,e) = (c*d, c*e); (f,g)+(h,i) = (f+h,g+i). Using these properties and the formulae above you should be able to code it up without much trouble.
__________________


Dude, these threads are waaaaay dead.
User avatar
Barry
 
Posts: 5713
Joined: Sat Dec 28, 2002 11:10 pm
Location: Ohio

Previous

Return to Scripts

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest