The inductor and capacitor together may be imagined as the electrical equivalent of a pendulum with the resistor representing friction.
If you nudge a pendulum in time with its natural swing, it will sustain its maximum amplitude. The energy from your nudges will simply counterbalance the energy absorbed by friction. If you nudge it too often or not often enough, then although it will still swing, the amplitude of the swing will be considerably less. The further away the frequency of the nudges is from the pendulum's natural frequency of swing, the more the amplitude of the swing diminishes.
When a radio signal from a station is fed into a receiver's tuned circuit, the signal is diminished. The amount by which it is diminished depends on how far off the frequency of the incoming signal (the nudges) is from the natural frequency (or swing) of the tuned circuit. The signal is diminished least when the station's frequency is the same as the natural frequency of the tuned circuit. Then, the only thing diminishing the signal is the resistance (the friction).
So a tuned circuit always impedes the passage of an electrical signal to some extent. Its impedance Z to signals which oscillate at the tuned circuit's natural (or resonant) frequency is simply equal to its resistance R. The extra amount of impedance it imposes on signals which are not quite in tune with its resonant frequency is called its reactance. The amount of the reactance X depends on how far the incoming signal is off-tune and is calculated as follows:

The frequency w0 to which the receiver is tuned is varied by varying the value of the capacitor C. But in simulation, we do not know how the value of C is being varied. What we do know is the station's frequency and the receiver's tuned frequency. Knowing that the reactance of the tuned circuit to a signal with its resonant frequency is zero (impedance is resistance only), we can eliminate C as follows:

The graph above shows how the attenuation factor A varies with frequency.
A 'C' function which returns the signal attenuation divisor, A, given station frequency and receiver frequency is given below. It calculates the attenuation of a received signal when the receiver is (w0 - w) radians per second off tune as effected by 3 cascaded tuned circuits of Q = 100 as would be produced by the receiver's IF amplifier chain.
double DeTune(long sf, long rf) { //stn freq, rx freq
#define L .0000003422 //tuned circuit's inductance in Henries
#define R .01 //circuit resistance to give a Q = 100
double
w = (double)sf, //Compute the reactance X of single
w0 = (double)rf, // tuned circuit.
X = L * (w - w0 * w0 / w),
Z = X / R, //impedance of single tuned circuit
A = sqrt(1 + Z * Z); //attenuation of single tuned circuit
return(A * A * A); //attenuation of 3 cascaded circuits
}
The way in which the signal strength - and hence audio level - which is presented to the user is simulated is as follows:

When the receiver is slightly off-tune from a station, the carrier will be further away from the centre of the selectivity envelope than some of the sidebands. The carrier will therefore suffer greater attenuation than the sidebands. This results in the emphasis and distortion of the higher audio frequencies which is a familiar effect heard when a receiver is off-tune.
The DeTune() function does not cater for this effect, the simulation of which is left as an exercise and challenge for the reader!
For simulation we input the output of the controller's synchro straight into the computer via an AtoD SAMP (analogue-to-digital servo amplifier). We also input the position of the controller's band switch position as a logical input. The bands covered by the ADF receiver are as follows:

The ADF receiver's synchro input is expressed as an unsigned interger ranging from 0 to FFFF for one full turn of the synchro.
The frequency to which the ADF receiver is currently tuned can therefore be calculated as shown in the following 'C' function:
long ADFfrq( struct RxData *s ) {
int BandStart[] = {189, 396, 830}, //kHz
BandExtent[] = {221, 474, 990}, //kHz
syn = r->Syn, //current position of tuning synchro
wb = r->WB, //currently selected waveband
hi = r->SynHi[wb], /* synchro position for high frequency
limit of the selected band */
lo = r->SynLo[wb]; /* synchro position for low frequency
limit of the selected band */
if(syn < lo) syn = lo;
if(syn > hi) syn = hi;
return((long)(BandStart +
((syn - lo) / (hi - lo)) / BandExtent[wb]));
}
The extent of a frequency band is unlikely to cover a complete turn of the tuning synchro. In practice it will be less. Nor is it likely to start exactly at the synchro's zero position. It will start a little beyond. The values returned by the input word for the tuning synchro for a given receiver controller have to be determined by calibration and entered into a fixed data file which is loaded on start-up. When the simulation program is started, this data is put into each receiver's RxData structure. Part of that data are the synchro input values for the upper and lower limits of each band for each receiver onboard the aircraft.
There is also an inevitable element of non-linearity in the frequency scales which ideally we should correct. This is not included in the above function but it would also be dealt with in the above function if it were dealt with at all.
As well as an audio output, the ADF receiver has a synchro output which drives an ADF pointer on the aircraft's compass card showing the direction of the station as a compass bearing. This is how it navigates using the Non-Directional Beacons.
With a Radio Range Station, the pilot can tell which of the station's 4 quadrants he is in - north to east, east to south, south to west, west to north - according to whether he hears a Morse 'A' or a Morse 'N' being keyed. This allows the pilot to know roughly where he is in relation to the station even if the aircraft does not have direction-finding capability or if their ADF function is faulty.