On Thu, Feb 18, 2010 at 1:40 PM, Lukáš Turek <8an@xxxxxxxxxxx> wrote: > On 18.2.2010 03:13 Luis R. Rodriguez wrote: >> coverage = (distance + 449) / 450; >> coverage/450 = distance + 499 >> (coverage/450) - 499 = distance > > Inverting the formula like this doesn't make much sense... > > The addition of 449 is there to round the resulting number up, because the > coverage class limits maximum distance and if it was rounded down as normal > integer division does, the resulting ACK timeout would be too low. > > However, if you subtract 449 in the inverted formula, you get something like a > minimum distance for the coverage class - which doesn't mean anything, > because higher ACK timeout and slot time works for smaller distances too. > Maximum distance is what's interesting to the user. So the correct > calculation is just multiplying the coverage class by 450 as I'm doing in > print_phy_handler(): > > printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); Thanks I'll fix and resend. Luis -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html