def __init__(self, ident, x, y, z, antenna_count): self.ident = ident self.x = x self.y = y self.z = z self.pu = None self.stas = [] if antenna_count > 0: self.antennas = create_ULA(self, antenna_count, 0.5 * params.Pathloss.wavelength) else: self.antennas = [] # statistics variables (move these to bog_waus?) self.statistics_sta_sinr = [] self.sinr_intervals = [] self.sinr_interval_prev_t = None self.sinr_interval_sinr_t = None self.cwmin = params.Backoff.aCWmin self.cca_state = WAU.CCAState.CH_IDLE self.phy_state = WAU.PHYState.LISTEN self.statistics_wau_mcsindex = [] self.statistics_tx_events = [] self.statistics_ntotalbytes = 0 self.tx_changelinkdr_us = -1 self.tx_nbytes = -1 self.tx_power_mW = 0
def __init__(self, ident, x, y, z, antenna_count): self.ident = ident self.x = x self.y = y self.z = z if antenna_count > 0: self.antennas = create_ULA(self, antenna_count, 0.5*params.Pathloss.wavelength) else: self.antennas = [] self.tx_power_mW = bog_dBm2mW(params.STA.TotalTxPower_dBm) self.wau = None self.noise_figure_dB = params.STA.NoiseFigure_dB self.n_mW = bog_dBm2mW(get_noise_power(params.Frame.DATA_Bandwidth_MHz, self.noise_figure_dB))
plt.figure() for wau in WAUs: plt.scatter(wau.x, wau.y, marker='^', color='black', s=70) for sta in STAs: plt.scatter(sta.x, sta.y, marker='*', color='red') plt.xlabel(r'x (in meters)') plt.ylabel(r'y (in meters)') plt.title(r'Distribution of STAs in a sample D-MIMOO group') plt.show() n_WAUs = len(WAUs) for sta in STAs: sta.antennas = create_ULA(sta, params.General.nAntennas_STA, 0.5 * params.Pathloss.wavelength) for wau in WAUs: wau.antennas = create_ULA(wau, params.General.nAntennas_WAU, 0.5 * params.Pathloss.wavelength) chan_wau2sta = Channel(STAs, WAUs, params.Pathloss.breakpoint_distance, params.Pathloss.fc_GHz * 1e9, params.Pathloss.k_factor_dB, params.Pathloss.nlos_fading_stdev) chan_wau2sta = chan_wau2sta._H / np.sqrt( N_O) # Noise normalized channel gain matrix indices = [] main_indices = []