Calculating the relative gain between a test antenna and a reference antenna at a given receiver station starts by looking at the received signal power at the receiver station
Pr = Pt * (Gr * Gt)/Lp
where
Pr is the received signal power
Pt is the transmitted signal power
Gt is the transmitter antenna gain
Gr is the receiver antenna gain
Lp is the path loss
The SNR at the receiver station can be expressed as
SNR = Pr/Pn = Pt * (Gr * Gt)/(Lp * Pn)
where
Pn is the noise power at the receive station.
In a WSPR configuration we need to transmit through two different antennas. That can be accomplished two ways. One way is to have a separate transmitter for each antenna with each antenna transmitting on different call signs and frequencies. A popular and affordable unit is the Zach Tek standalone multi-band WSPR transmitter. Other units are on the market as well. Another option is to have a single transmitter/transceiver configured to run in Data Mode through a software package like WSJTX and feeeding two antennas via a switch. In this case only a single antenna can transmit at a time, so alternating transmissions cycles are needed between the antennas during the test run.
For reasons that will be explained later, I have chosen to go with the a single transceiver transmitting between two antennas. Thus I have two configurations with a single transceiver, but different antennas. With this decision, we can now return to the derivation to obtain relative antenna gain.
In the case of a single receiver, a single transmitter, and two antennas we can conclude that
Pt is the same for both antenna configurations (single transmitter transmitting at the same power)
Pn is the same as there is a single receiver
Gt is the same between configurations as there is a single reciver antenna
For the time being, lets also assume that the path loss, Lp, from the transmitting antenna to the receiver is the same for both antenna configurations. With these assumptions, we can look at the SNR for both the test and reference antenna configurations.
SNR(test) = Pt * (Gr *Gt(test))/(Lp*Pn)
SNR(ref) = Pt * (Gr * Gt(ref))/(Lp*Pn)
If we look at the ratio of the SNR terms and cancel out 'like' terms, we are left with
SNR(test)/SNR(ref) = Gt(test)/(Gt(ref)
Expressed in decibel terms, the relative gain is thus
Relative Gain (dB) = SNR(test)dB - SNR(ref)dB = Gt(test)dB - Gt(ref)dB.
Thus for a single transmitter switching between two antennas and a single receiver in the far-field, SNR data for each antenna at a point in time can be used to compute the relative gain of the test antenna to the reference antenna. Sounds easy right? Well, it can be challenging and this is mainly due to inherent variaibility in propagation that shows itself if the highly variable SNR data over time. More on this in the next section.
Lastly I want to return to the assumption that the path loss between the test and reference antenna systems is identical. In the case of field antennas, which are mostly wires and verticals, this may be an appropriate assumption. The dominant mode of path loss is ionospheric (D-Region) absorbtion loss. With similar radiation patterns, albeit shaped slightly differently depending on the antenna, the differencde in path loss is deemed indistinguishable.