Because that is what a "log distance model" does: it needs a "path loss
at reference distance, L0.
See:
http://www.nsnam.org/doxygen-release/classns3_1_1_log_distance_propagation_loss_model.html
from:
http://www.nsnam.org/doxygen-release/index.html
>
> Thanks!
>
> Regards,
> Bin
> >
> Why in the snippet, log is first created as a pointer to
> LogDistancePropagationLossModel and then this pointer
> SetReferenceModel to
> FriisPropagationLossModel
>
> so what's the relationship between LogDistancePropagationLossMode and
> FriisPropagationLossModel here?
I explained it already: a log distance model calculates a log
attenuation over distance based on a reference distance d0 and a
reference loss at that reference distance L0. The 'reference' model is
the model used to calculate L0.
Mathieu
> The core of the confusion however brings up an interesting idea. It
> might be nice to simple be able to say that the loss is X dB at the
> reference distance, and be able to set X explicitly, i.e.
> LogDistancePropagationLossModel::SetReferenceLoss. This could be done
> instead of setting the reference model. What do you think Mathieu?
I would be happy to review and approve a patch to do so.
Mathieu
to track this issue:
http://www.nsnam.org/bugzilla/show_bug.cgi?id=395
I have just done this in http://code.nsnam.org/mathieu/ns-3-wifi. I will
close this bug once this code is merged back in ns-3-dev
regards,
Mathieu