[Olsr-users] Calculating LQ in 0.5.0 (Was: olsrd-0.5.0: LQ larger than 1.0)

Joerg Pommnitz (spam-protected)
Fri Jun 1 11:19:15 CEST 2007


Hello all,
can somebody explain the thinking behind the new formula for calculating the link quality? In 0.4.10 it is 
calculated this way:

  entry->loss_link_quality =
    (float)(entry->total_packets - entry->lost_packets) /
    (float)(entry->loss_window_size);

while in 0.5.0 the formula changed to:

  entry->loss_link_quality =
    (float)(entry->total_packets - entry->lost_packets) /
    (float)(entry->loss_window_size < (2 * 4) ? entry->loss_window_size:
    4 * ((entry->loss_window_size / 4 - 1) * entry->total_packets + entry->loss_window_size) / entry->loss_window_size);

The new formula looks much more complicated and I'd like to learn the reasoning behind it. I'm 
especially curious about the magic numbers in there (and what is this 2*4 doing???): Where did 
they come from and what do they mean?
 -- 
 
Thanks and kind regards
 
       Joerg
 






      __________________________________  Yahoo! Clever: Sie haben Fragen? Yahoo! Nutzer antworten Ihnen. www.yahoo.de/clever




More information about the Olsr-users mailing list