[Ns-developers] Antenna Model Patch

Pavel Boyko boyko at telum.ru
Tue Jan 10 13:19:33 PST 2012


Hi Brian,

> I don't see how you are fitting the orientation models into the mobility
models though.

Both are assumed to be (independently) aggregated with the same Node.
Aggregation is the preferred ns-3 way to extend functionality of the
existing objects and classes. Take a look at
http://www.nsnam.org/docs/release/3.13/manual/html/object-model.html#aggre
gation and how GetObject() is used in the VelocityOrientationModel to
access MobilityModel of the same node from the OrientationModel.

Best regards,
Pavel

-----Original Message-----
From: Panneton, Brian C CTR (US) [mailto:brian.c.panneton.ctr at mail.mil] 
Sent: Tuesday, January 10, 2012 8:54 PM
To: Pavel Boyko; 'Nicola Baldo'; ns-developers at ISI.EDU
Subject: RE: [Ns-developers] Antenna Model Patch

Pavel, 

In my patch (posted after my posting of 1 and 2), I integrated the
orientation into the current mobility models. It seems in your update you
are changing the base MobilityModel to an OrientationModel. I don't see
how you are fitting the orientation models into the mobility models
though. If you could shed some light on this that would be great.

For the time being it might be easier to just let the mobility model set
the orientation using the DoSetOrientation() similar to how I implemented
it.

Thanks,
Brian
________________________________________
From: Pavel Boyko [boyko at telum.ru]
Sent: Tuesday, January 10, 2012 7:58 AM
To: Panneton, Brian C CTR (US); 'Nicola Baldo'; ns-developers at ISI.EDU
Subject: RE: [Ns-developers] Antenna Model Patch

Hi Brian,

Please take a look at http://codereview.appspot.com/4130048/ -- it seems
to be aligned with your item 1). I did not develop that proposal any
further.

Best regards,
Pavel

-----Original Message-----
From: ns-developers-bounces at ISI.EDU [mailto:ns-developers-bounces at ISI.EDU]
On Behalf Of Panneton, Brian C CTR (US)
Sent: Friday, January 06, 2012 2:09 AM
To: Nicola Baldo; ns-developers at ISI.EDU
Subject: Re: [Ns-developers] Antenna Model Patch

All, please let me know your thoughts on the following.

Two things came to mind while I was changing my code. (It might be easier
to implement this kind of stuff now instead of down the line once more
complexities are built in)

1) Mobility Orientation:

This could almost be its own model. You can have many different way's you
want to orient your node. You could have a node moving in one direction,
but facing the opposite way (ie: someone walking backwards). You could
have the node always facing a particular point (ie: keeping you eyes on an
item on a table that you are walking around). You could have the node
always facing North regardless of the direction of travel. This could also
be used for antennas. You may want your antenna to always face a satellite
or the antenna is fixed always pointing in the direction relative to the
node.

By separating the Orientation from the Mobility, we allow mobility model
designers to not have to consider the orientation. For example, the random
walk mobility model would have to decided where its orientation is. By
default I would assume it should be oriented in the direction of travel,
however I could see use cases for different orientations.

This change would make both Mobility and Antenna choose an Orientation or
accept the default. Certain models can have different defaults. The logic
would be added to AntennaModel class and MobilityModel class.

2) In regards to "volunteers to add antenna support to WiMax", since
ideally you could use any antenna for any of the wireless models, I
propose that we create a WirelessPhy of which all Phys extend. Thus the
wifi-phy, lte-phy, wimax-phy, etc would extend it. The abstract base
WirelessPhy would contain your SetAntenna/GetAntenna. Thus you can use the
same antenna models for wimax that you could for wifi. Granted, it might
not be the best idea to do so but it will allow you that option. The
extended phys can set a default if one does not set the antenna
themselves.

Please give your opinions on these two topics, and I can integrate them
into my patch. I'll try to get it ready for tomorrow.

Thanks,
Brian Panneton
________________________________________
From: ns-developers-bounces at ISI.EDU [ns-developers-bounces at ISI.EDU] on
behalf of Panneton, Brian C CTR (US) [brian.c.panneton.ctr at mail.mil]
Sent: Thursday, January 05, 2012 2:50 PM
To: Nicola Baldo; ns-developers at ISI.EDU
Subject: Re: [Ns-developers] Antenna Model Patch

Hi All,

Comments inline below. (prefixed with a * since my email does not add the
>'s by itself.)

Once I make the changes, I will post the new patch.

Thanks,
Brian
________________________________________
From: ns-developers-bounces at ISI.EDU [ns-developers-bounces at ISI.EDU] on
behalf of Nicola Baldo [nbaldo at cttc.es]
Sent: Thursday, January 05, 2012 1:50 PM
To: ns-developers at ISI.EDU
Subject: Re: [Ns-developers] Antenna Model Patch

Hi Brian,

thank you for your contribution. Please find some comments inline below.

On 01/05/2012 05:57 PM, Panneton, Brian C CTR (US) wrote:
> I have a draft patch which is based upon Nicola's branch/rev:
>
> http://code.nsnam.org/nbaldo/ns-3-antenna/rev/30080a27a039
>
> I was hoping for some feedback on it.
>
> To give a brief overview:
>
> - Added orientation to AntennaModel
> - Moved the Angles struct from AntennaModel class to Tools
> --- This allows us to use Angles for antenna models as well as 
> mobility models

I took inspiration from your patch and singled out Angles on a separate
file in my code as well. I am still not sure it is really needed to move
it to a separate directory. In any case,  I'd rather put it in the "core"
directory (where Vector also is) rather than in "tools".

*Core would be a good place for it.

> - Added mobility orientation
> - Made GetGainDb incorporate node orientation and antenna orientation

I guess your use case is to have vehicles moving with a fixed antenna on
the top, right?

*That is correct.

I've seen that you added mobility orientation in the abstract base class
MobilityModel. Note that for example the Position is not in this base
MobilityModel class, but in subclasses. I guess for coherence a similar
approach should be used for orientation (comments from other developers
welcome here).

*That makes sense. I will change that to keep it in line with Positions.

> --- This calls DoGetGainDb with the combined Angles
> - All derviced models must implement DoGetGainDb(Angles a)

Do I understand correctly that then AntennaModel::DoGetGainDb works with a
coordinate system rotated to the orientation of the node?

*That is also correct.

> - Added very simple constant-gain-antenna-model
> --- This can be added or does not need to be. I just added it for 
> testing

I don't see this in your patch, I guess this will come in your update

*My patch missed adding all of the files. : (  The
constant-gain-antenna-model seems very similar to your new cosine model,
so I may just use that.

> - Added support for antennas in Wifi-Phy to show how I think it could 
> all work together.

I've seen, that's nice! Do you have any example program showing how it
works?

*I can post some code with the actual update to shed some light on how I
am using it.

> --- This will probably need to be elevated to a higher level, so all 
> Wireless Phys (LTE, Wimax) have access to it.

Today I just updated my repos at
http://code.nsnam.org/nbaldo/ns-3-antenna , it now includes support for
wireless PHYs based on the Spectrum framework (with tests and examples).
The integration with the PHYs in the spectrum module is completed. Basic
compatibility with the legacy ns-3 LTE module is also included. My next
step is to integrate it with the LENA LTE code.

I am not personally interested in working to add antenna support for wifi,
but having seen your patch, you're already on the right way to do it, so
that's great :-)

If somebody volunteers to add antenna support to WiMax some day it would
be great, but frankly speaking I won't mind at all if it does not happen.

Regards,

Nicola









More information about the Ns-developers mailing list