Re: TX power levels are not always correct on any releases after 2020.10.16
Posted: Fri Oct 30, 2020 7:38 am
Unforunately even between 1W and 5W the power output vs drive is not linear
Originally, I used a linear relationship between 1W and 5W as it worked reasonably well on the GD-77, but the RD-5R has a totally different PA circuit with only 1 stage of PA FET followed by a band pass filter.
So I had to change all the radio to use a table of values for each power level
static const float fractionalPowers[3][7] = { {0.59,0.73,0.84,0.93,0.60,0.72,0.77},// VHF
{0.62,0.75,0.85,0.93,0.49,0.64,0.71},// 220Mhz
{0.62,0.75,0.85,0.93,0.49,0.64,0.71}};// UHF
This is a bit dificult to read, because it doesnt have the values for 1W and 5W, as they would be wastes space.
So below 1W the value calcultion is
txPower = trxPowerSettings.lowPower * fractionalPowers[trxCurrentBand[TRX_TX_FREQ_BAND]][powerLevel];
and for 2W , 3W and 4W the calcualtion is
int stepPerWatt = (trxPowerSettings.highPower - trxPowerSettings.lowPower)/( 5 - 1);
txPower = (((powerLevel - 3) * stepPerWatt) * fractionalPowers[trxCurrentBand[TRX_TX_FREQ_BAND]][powerLevel-1]) + trxPowerSettings.lowPower;
where power level is 0 for 50mW and 9 for 5W.
These values were fairly accurate on a couple of my GD-77 radios, but are obviously not accurate for your radio.
And we don't have a way of allowing operators to enter their own values, as 99.9% of operators won't bother to do this.
Originally, I used a linear relationship between 1W and 5W as it worked reasonably well on the GD-77, but the RD-5R has a totally different PA circuit with only 1 stage of PA FET followed by a band pass filter.
So I had to change all the radio to use a table of values for each power level
static const float fractionalPowers[3][7] = { {0.59,0.73,0.84,0.93,0.60,0.72,0.77},// VHF
{0.62,0.75,0.85,0.93,0.49,0.64,0.71},// 220Mhz
{0.62,0.75,0.85,0.93,0.49,0.64,0.71}};// UHF
This is a bit dificult to read, because it doesnt have the values for 1W and 5W, as they would be wastes space.
So below 1W the value calcultion is
txPower = trxPowerSettings.lowPower * fractionalPowers[trxCurrentBand[TRX_TX_FREQ_BAND]][powerLevel];
and for 2W , 3W and 4W the calcualtion is
int stepPerWatt = (trxPowerSettings.highPower - trxPowerSettings.lowPower)/( 5 - 1);
txPower = (((powerLevel - 3) * stepPerWatt) * fractionalPowers[trxCurrentBand[TRX_TX_FREQ_BAND]][powerLevel-1]) + trxPowerSettings.lowPower;
where power level is 0 for 50mW and 9 for 5W.
These values were fairly accurate on a couple of my GD-77 radios, but are obviously not accurate for your radio.
And we don't have a way of allowing operators to enter their own values, as 99.9% of operators won't bother to do this.