private static RoAandRoB GetRoAandRoBbyIndex3(int txNum, double roA) { RoAandRoB ob = new RoAandRoB(); if (txNum == 1) { ob.RoA = roA; ob.RoB = roA * 0.4; return ob; } ob.RoA = roA; ob.RoB = roA * 0.5; return ob; }
private static RoAandRoB GetRoAandRoB(RelayCellEx relayCellEx, double dataRePower) { int txNumber = relayCellEx.RelayCell.ParentRN.TxNumber; int pB = relayCellEx.RelayCell.PB; RoAandRoB ob = new RoAandRoB(); double roA = dataRePower / UnitTrans.dBto((double)relayCellEx.RelayCell.RSPower); switch (pB) { case 0: return GetRoAandRoBbyIndex0(txNumber, roA); case 1: return GetRoAandRoBbyIndex1(txNumber, roA); case 2: return GetRoAandRoBbyIndex2(txNumber, roA); case 3: return GetRoAandRoBbyIndex3(txNumber, roA); } return ob; }