Euclidean distance for localization in wireless sensor network using NS2

Status
Not open for further replies.

teukie

Newbie level 3
Joined
Jun 2, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
hi,, now i'm doing my final project about localization in wireless sensor network and for get estimation position of node i used euclidean distance to get distance between anchor node and unknown node but i still confused how to make a program to get euclidean distance when we use ns2 for simulatated ??? please tell me how can i create and get euclidean distance using network simulator 2,, thanks,,,
 

you need to X and Y coordinates of sensor with respect of your coordinate system to find out euclidean distance...

Good Luck
 

yes sir,, but the problem for me i can't write the right formula of euclidean distance in NS2.. can you tell me the script?? thanks...
 

ok basic formula for euclidean distance is ((x1-x2)^2+(y1-y2)^2)^(1/2) let say origin at (0,0) then euclidean distance will be ((x^2+y^2)^(1/2))

good luck
 

thanks sir,, i will try..^^
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…