Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. double LocationUE2d (NodeContainer ue, NodeContainer gnb)
  2. {
  3. cout<<"At: "<<Simulator::Now().GetSeconds()<<" Seconds"<<endl;
  4.  
  5. Vector posGNB=gnb.Get (i)->GetObject<ConstantPositionMobilityModel> ()->GetPosition();
  6. Vector posUE=ue.Get (i)->GetObject<ConstantPositionMobilityModel> ()->GetPosition();
  7.  
  8. double dis2;
  9. dis2 = sqrt( pow((posUE.x - posGNB.x), 2.0) + pow((posUE.y - posGNB.y),2.0);
  10.  
  11. return dis2;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement