El 18/07/09 02:38, Marek Lindner escribió:
On Saturday 18 July 2009 06:43:38 Sebastián D. Criado wrote:
[...]
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)
Thank you very much Marek. I now understand it better
May be I should put that in the wiki somewhere ... :-)
Yes. Sure that will be helpful for more people
Saludos.-