[Olsr-dev] Maximal LQ less than 1 on Ethernet
Hannes Gredler
(spam-protected)
Thu Jun 19 10:56:29 CEST 2008
Henning Rogge wrote:
> I just did a few experiments to discover the reason why the LQ of perfect
> links (switched ethernet) does not go up to 1.
>
> The reason seems to be a combination of three points:
> - we use a exponential moving average in the default LQ calculation
> - we save the LQ values directly in the 1 byte network format
> - we use a fixed point math system in the default LQ calculation
>
> This two points creates a rounding problem that prevent the LQ value to rise
> above certain values.
>
> The exponential depends on the following formula, with default alpha as 0.05:
>
> new_LQ = old_LQ * (1 - alpha) + measured_lq * alpha
>
> the second part of this formula seems to get small enough that we cannot store
> it in a 1 byte value.
>
> So we have to stop using the exponential average or change the number formats
> for LQ calculation, but I'm not completely sure about the effects of both
> sollutions.
what about a simple roundup()
if (measured_lq >= old_LQ) && measured_lq >= 0.999)
/hannes
More information about the Olsr-dev
mailing list