Commit 70f536a0 authored by Bartosz Podrygajlo's avatar Bartosz Podrygajlo

Correct PRACH preamble tx power calculation.

Removed arbitrary offset of 30dB.
Changed sign for pathloss: pathloss calculated in compute_nr_SSB_PL is the difference between transmitted and received power.
Transmission power for preamble should compensate the pathloss, therefore power should increase with pathloss.
parent 82bd07eb
......@@ -45,7 +45,7 @@ int16_t get_prach_tx_power(NR_UE_MAC_INST_t *mac)
{
RA_config_t *ra = &mac->ra;
int16_t pathloss = compute_nr_SSB_PL(mac, mac->ssb_measurements.ssb_rsrp_dBm);
int16_t ra_preamble_rx_power = (int16_t)(ra->prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER - pathloss + 30);
int16_t ra_preamble_rx_power = (int16_t)(ra->prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER + pathloss);
return min(ra->prach_resources.RA_PCMAX, ra_preamble_rx_power);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment