[Olsr-users] Calculating LQ in 0.5.0

Sven-Ola Tuecke (spam-protected)
Tue Aug 28 14:22:38 CEST 2007


Bernd,

mmmtja. You can also do it the other way round. Means: not using the 
extended formula if 0!=winsize%4 because the user is the boss and he/she 
normally knows what to configure. So in link_set.c:1056 you may change

entry->loss_window_size < (2 * 4) ? norm : opt
-->
entry->loss_window_size < (2 * 4) || (0 != entry->loss_window_size % 4) ? 
norm : opt

While we're at it, I double-checked the function. Here's a comparison with a 
very small window size of 16 (norm means (t-l)/ws, opt means the optimized 
formula). The opt stuff is meant for winsize > 100 and I don't want to wait 
10 minutes until links are stable...

// Sven-Ola

Very good link:
---------------
norm:0.062500, opt:0.250000
norm:0.125000, opt:0.400000
norm:0.187500, opt:0.500000
norm:0.250000, opt:0.571429
norm:0.312500, opt:0.714286
norm:0.375000, opt:0.750000
norm:0.437500, opt:0.777778
norm:0.500000, opt:0.800000
norm:0.562500, opt:0.900000
norm:0.625000, opt:0.909091
norm:0.687500, opt:0.916667
norm:0.750000, opt:0.923077
norm:0.812500, opt:1.000000
norm:0.875000, opt:1.000000
norm:0.937500, opt:1.000000
norm:1.000000, opt:1.000000
norm:1.000000, opt:1.000000

Medium Link:
------------
norm:0.062500, opt:0.250000
norm:0.062500, opt:0.200000
norm:0.125000, opt:0.333333
norm:0.125000, opt:0.285714
norm:0.187500, opt:0.428571
norm:0.250000, opt:0.500000
norm:0.312500, opt:0.555556
norm:0.375000, opt:0.600000
norm:0.437500, opt:0.700000
norm:0.500000, opt:0.727273
norm:0.562500, opt:0.750000
norm:0.625000, opt:0.769231
norm:0.687500, opt:0.846154
norm:0.750000, opt:0.857143
norm:0.812500, opt:0.866667
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.812500, opt:0.812500
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.875000, opt:0.875000
norm:0.812500, opt:0.812500
norm:0.812500, opt:0.812500
norm:0.812500, opt:0.812500
norm:0.750000, opt:0.750000
norm:0.750000, opt:0.750000

"Bernd Petrovitsch" <(spam-protected)> schrieb im Newsbeitrag 
news:(spam-protected)
> On Mon, 2007-08-27 at 13:33 +0200, Sven-Ola Tuecke wrote:
> [...]
>> you are right. The formula has a design flaw if you use (LinkQualitySize 
>> %
>> 4) != 0. Because we're practical guys, nobody uses such a window size for
>> obvious reasons. Common values are 32, 100 or 128. For example, if you 
>> use
>> LQW = 111, I'm not 100% sure if the loss_bitmap stuff is correctly
>> implemented. So I would use something with 0 == (lqw % 8) anyhow.
>
> 100 % 8 == 4 BTW.
>
> [...]
>> to libmath-float-rounding-errors..? I recommend the attached changes.
>
> I'm not having a problem with rules like "window size % n == 0" but I
> think
> it would be better to tell the user explicitly that he/she uses an
> unsupported
> value and force him/her to fix it (and not change it silently). Simply
> adding
> a log message (if this is "corrected") is IMHO not enough - next to no
> one
> will see it.
>
> More or less the same holds for the "if we don't find a config file, we
> use some
> default config" approach in main.c.
> I can't find any useful reason to start the daemon with some hard coded
> values in a demo/example config - especially with a routing daemon.
> I would simply exit() there and be done.
>
> As for FreiFunkFirmware, I think it is safe to assume that the user
> interfaces
> can be expected to always generate a syntactically correct configuration
> file so
> this shouldn't hurt anyone.
>
> Bernd
> -- 
> Firmix Software GmbH                   http://www.firmix.at/
> mobil: +43 664 4416156                 fax: +43 1 7890849-55
>          Embedded Linux Development and Services
>
>
>
> -- 
> Olsr-users mailing list
> (spam-protected)
> http://lists.olsr.org/mailman/listinfo/olsr-users 





More information about the Olsr-users mailing list