I am new to VEINS and trying to implement weighted p-persistence inside MyVeinsApp.cc. Distance between the sending node and receiving is used in that formula. I saw the 2 f
For the distance you obviously need the two positions. You can get the position of the current node by asking the mobility module and the position of the sender from the message you received. Then you can use the following method from Coord to calculate the distance between two points:
/**
* @brief Returns the distance to Coord 'a'.
*/
double distance(const Coord& a) const {
Coord dist(*this - a);
return dist.length();
}