36 errorC = neighborCache->par(
"vivaldiErrorConst");
37 coordC = neighborCache->par(
"vivaldiCoordConst");
38 dimension = neighborCache->par(
"vivaldiDimConst");
40 showPosition = neighborCache->par(
"vivaldiShowPosition");
46 for (uint32_t i = 0; i <
dimension; i++) {
61 std::cout <<
"Vivaldi::processCoordinates() called with rtt = "
68 if (!dynamic_cast<const VivaldiCoordsInfo*>(&nodeInfo)) {
69 throw cRuntimeError(
"Vivaldi coords needed!");
85 double delta =
calcDelta(rtt, dist, weight);
96 (delta * (SIMTIME_DBL(rtt) - dist)) *
98 (dist * 1000))) * 1000);
102 (delta * (SIMTIME_DBL(rtt) - dist)));
115 relErr = fabs(dist - rtt) / rtt;
118 return (relErr *
errorC * weight) +
138 assert(coords.size() > 1);
143 info->setCoords(i, coords[i]);
145 info->setError(coords[i++]);
148 info->setHeightVector(coords[i]);
166 ->getDisplayString().setTagArg(
"p", i,