On Saturday 18 July 2009 06:43:38 Sebastián D. Criado wrote:
In http://www.open-mesh.net/browser/trunk/vis/vis.c i saw the following calculation.
orig_node->tq_max/(float)neigh->tq_avg
for link quality (VIS label).
If this is correct, would not be so linear. Am I wrong?
The given code converts batman's own format into the format I mentioned earlier. Currently, batman uses a so called TQ value which expresses link quality as well and has its max value at 255. Performance considerations led to this kind of representation (you want to avoid float operations on embedded devices). Imagine a link quality of 66.6%:
255 (TQ max) * 66.6% = 170
255 / 170 [orig_node->tq_max/(float)neigh->tq_avg] = 1.5 (vis label)
100 / 1.5 [100 / $number] = 66.6% (link quality)
May be I should put that in the wiki somewhere ... :-)
Regards, Marek