[Ns-developers] [ns3] Vector and different coordinates system

Tom Henderson tomh at tomh.org
Thu Apr 19 22:45:52 PDT 2012


On 04/19/2012 11:05 AM, Federico Guerra wrote:
> Hi Tom,
> I also fear that the mobilityModel could be really coupled with the
> coordinate system.
>
> In geographical coords (or spherical coords, is the same) even a simple
> model that makes you move
> from point A to point B at the same altitude (so along the same
> spherical surface) should not use the standard cartesian distance, but
> would use the
> distance along a great circle.
>
> As Nicola pointed out before even a simple rectangle position allocator
> won't work that well with geographical coords.
>
> I think that this example could be found for other coordinates as well.
>
> So I think that the easiest solution would be to stick with Vector,
> since I would have to rewrite the most of the MobilityModels anyway.
> Actually for the first version I would write the bare minimum, and I
> would add new models in the future.
>
> The ideal solution, since I have to rewrite the mobilitymodel, and since
> this models would work only with geographical coords (or spherical coords),
> would be to introduce, as Mathieu already pointed out, a new
> SphericalMobilityModel base class, that extends MobilityModel, and that
> introduces something like:
>
> virtual SphericalVector GetPosition( ) = 0;
>
> and make all the new MobModels inherit and implements this new function.
> But I agree that this solution would be a code bloat.

Federico, would you mind clarifying above what you now plan to do 
(described above) as the bare minimum vs. what you view as ideal?

I'm sensing from the above that you are not planning to introduce 
SphericalMobilityModel but just develop a cartesian version of what you 
need.

- Tom



More information about the Ns-developers mailing list