XBee Pro series2 RSSI localization system

Hi, I’m new to the xbee and arduinos. In my project, I’m using four xbee pros (series 2) to build a WSN localization system. Three of them act as the reference and the other one is for tracking. Each node is attached to an arduino. I’m using the xbee-arduino library. http://code.google.com/p/xbee-arduino/

In my project, the tracked node will receive three messages from the reference node. Thus I want to know the sender’s address of each message. How can I do it? I found the function getRemoteAddress64 (). But I don’t know how to use it. What is the primary expression of getRemoteAddress64 ()?

In addition, series 2 cannot get the rssi value from the packet. I figured out two ways to obtain that value. One is sending AT command request and the other is measuring the value of RSSI pin. Both two ways are included in my code. Some one can check wether they are right for me? And I’m wondering which one will be better? Or is there any other ways to get RSSI value?

Final question, RSSI is not a highly reliable method to estimate the locations. So I want to get the data transmission time as well. In my code, I repeat broadcasting messages and counts the times of the broadcasting in order to get the time. I’m not sure wether it is a right way… Can anyone help me with that? Really thanks!!!

The attachments are my codes. Thank you again!!!

TN.ino (2.38 KB)

RN.ino (3.19 KB)