There have been an attempt at modeling the VHF/UHF radio waves transmission/loss properties by implementing an existing atmospheric and ground/obstacle attenuation algorithm (Longley-Rice ITM algorithm) to XPlane with the libradio plugin by siselkov.
It computes the properties of the signal received
0: direct line of sight
5: single horizon, diffraction
6: single horizon, tropospheric scattering
9: double horizon, diffraction
10: double horizon, tropospheric scattering
Not sure if the direct obstacle is taken into account
AFAIK, DME is broadcasting in the UHF range, so it is less subject to attenuation/loss of precision of signal than VHF.
But all in all, I am wondering wether it’s worth the hassle.
This because if you create such an advanced DME receiver that more or less models the real transmission of signal, the other instruments won’t be affected accordingly, and won’t behave like the Dme (loss of signal, errors). This unless you conpletely override the standard radio system of the sim, much simpler for that matter, since the reception range is somewhat limited to the height of the aircraft. That would mean that the Nav radios should implement those algorithms as well.
The algorithm is called ITM irregular terrain model
https://www.its.bldrdoc.gov/media/50676/itm_alg.pdf