Applicable Versions
NetSim Standard 
NetSim Pro


Applicable Releases
v10v11v12v13



DEVICE_DISTANCE(d1,d2) is the API to get the distance between any 2 devices. This declaration is found in Stack.h file. Expand 'External dependencies' in any project in NetSim.sln file to find the Stack.h file.


where d1 and d2 are the device id's


Example : 

double TX_RX_distance = DEVICE_DISTANCE(txid, rxid)

Where,

txid can be the Device ID of the transmitter node and

rxid can be the Device ID of the receiver node

between which the distance is to be identified.