How to calculate RSSI for ns3-mmwave module

42 views
Skip to first unread message

Vedant Deshmukh

unread,
Jan 15, 2025, 7:35:28 AM1/15/25
to ns-3-users
Ptr<MmWaveHelper> ptr_mmWave = CreateObject<MmWaveHelper>();
    NodeContainer enbNodes;
    NodeContainer ueNodes;
    NodeContainer jammerNode;
    enbNodes.Create(1);
    ueNodes.Create(3);
    jammerNode.Create(1);

    InternetStackHelper internet;
    internet.Install(jammerNode);
   


    // Set positions for eNB
    Ptr<ListPositionAllocator> enbPositionAlloc = CreateObject<ListPositionAllocator>();
    enbPositionAlloc->Add(Vector(enbX, enbY, enbZ));

 Ptr<ThreeGppRmaChannelConditionModel> losCondModel = CreateObject<ThreeGppRmaChannelConditionModel>();
   Ptr<ThreeGppRmaPropagationLossModel> gppModel = CreateObject<ThreeGppRmaPropagationLossModel>();
   //Ptr<ChannelCondition> x1 = losCondModel->ComputeChannelCondition(ueMobilityModel, enbMobilityModel);
     gppModel->SetChannelConditionModel(losCondModel);

 
   Ptr<MobilityModel> enbMobilityModel = enbNodes.Get(0)->GetObject<MobilityModel>();
  for (uint32_t i = 0; i < ueNodes.GetN(); ++i)
  {
    Ptr<MobilityModel> ueMobilityModel = ueNodes.Get(i)->GetObject<MobilityModel>();
    Ptr<MobilityModel> enbMobilityModel = enbNodes.Get(0)->GetObject<MobilityModel>(); // Assuming one eNB

    // Compute and log the channel condition (optional)s
    //Ptr<ChannelCondition> channelCondition = losCondModel->ComputeChannelCondition(ueMobilityModel, enbMobilityModel);
   // NS_LOG_UNCOND("Channel Condition for UE " << i << ": "<< (channelCondition->IsLos() ? "LOS" : "NLOS"));
   }
   
   
    ptr_mmWave->AttachToClosestEnb(ueNetDev, enbNetDev);
    ptr_mmWave->EnableTraces();

    // Activate a data radio bearer
    enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
    EpsBearer bearer(q);
    ptr_mmWave->ActivateDataRadioBearer(ueNetDev, bearer);


For the above code, using Enable traces we get metrics in txt files like RxPackettrace,txt having DL/UL, time, frame, cellId rnti, tbSize, mcs rv, SINR(dB), corrupt, TBler


Without using wifihelper can we get RSSI Value? Any form of suggestion and help would be appreciated
Reply all
Reply to author
Forward
0 new messages