赞
踩
- // node self mobility
- Ptr<MobilityModel> mobility = this->m_node->GetObject<MobilityModel>();
- Vector v_NodePosition = mobility->GetPosition();
- Vector v_NodeVelocity = mobility->GetVelocity();
- Vector _n;
- _n.x=v_NodePosition.x+v_NodeVelocity.x;
- _n.y=v_NodePosition.y+v_NodeVelocity.y;
- // last hop mobility
- Ptr<Packet> p_copy = p->Copy();
- FwGeoTag geotag;
- p_copy->RemovePacketTag(geotag);
- uint32_t n_LastHopNodeId = geotag.GetNodeId();
- Vector v_LastHopPosition = geotag.GetPosition();
- Vector v_LastHopVelocity = geotag.GetVelocity();
- Vector _d2;
- _d2.x=v_LastHopPosition.x+v_LastHopVelocity.x;
- _d2.x=v_LastHopPosition.y+v_LastHopVelocity.y;
- Ptr<Packet> packet = p->Copy();
-
- try
- {
- // get last hop's node id
- uint32_t n_From = -1;
- string str_From;
- stringstream ss2;
- ss2 << f

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。