Mailing list archive (omnetpp-l at omnetpp.org)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omnetpp-l] Re: mobility - basicmobility.c



looks like a have to use LineSegmentsMobilityBase instead

On May 27, 12:08 am, Peter O <peterob... at xxx> wrote:
> Hi,
>
> I'm trying to make a mobility module which will move each periodic time by
> fix distance. Can anyone tell me where I can find more information about why
> the self-message is send in one period still 60 times?
>
> After initialization of mobility module there is scheduleAt() function that
> send message to itself, then movement is suppose to start. But why/who send
> this message 60x?
>
> handleSelfMsg() from basicMobility is telling:
> /**
>  * The only self message possible is to indicate a new movement. If
>  * the host is stationary this function is never called.
>  *
>  * every time a self message arrives makeMove is called to handle the
>  * movement. Afterward updatePosition updates the position with the
>  * blackboard and the display.
>
> But who is planing that another self-msg?
>
> My output looks like : (but it stops when Event number is 99).
>
> ** Event #39  T=1.715189364971  sim.host[1].linearMobility (LinearMobility,
> id=21), on selfmsg `move' (cMessage, id=16)
> stepping forward. step #=1 startPos: (2,250)
> destination reached.
>  HostMove  startPos.x: 2 startPos.y: 250 direction.x: 1 direction.y: 0
> startTime: 1.715189364971 speed: 1
> start setTargetPosistion:  HostMove  startPos.x: 2 startPos.y: 250
> direction.x: 1 direction.y: 0 startTime: 1.715189364971 speed: 1
>  new targetPos: (3,250)
> distance=1 totalTime=1 numSteps=1stepSize: (1,0)
> stepSize: (1,0)target: (1,0)
> end setTargetPosistion:  HostMove  startPos.x: 2 startPos.y: 250
> direction.x: 1 direction.y: 0 startTime: 1.715189364971 speed: 1
> **
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omnetpp at xxx
To unsubscribe from this group, send email to omnetpp+unsubscribe at xxx
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en
-~----------~----~----~----~------~----~------~--~---


Home | Main Index | Thread Index