I've already added something similar to that a few version ago. To quote my "under the hood" document:
Reception range analysis
From version MB155, SoftRF collects summary data about the distance and reception RSSI of aircraft that either just entered or just left reception range. The data is stored in a file "range.txt" in the flash file system (SPIFFS on the T-Beam, FATFS on the T-Echo.) This file is plain text with the following structure (14 lines total):
1 # version number
9.4,3.226,1234 # range (km), log2(range), number of samples - for "oclock=0" (straight ahead)
... # similarly for each "oclock" 1 through 11
-91.4,2.58 # average RSSI, mean square deviation
The file is read, new data appended during the flight, and a new version of the file is written after landing. If a flight log is being recorded, the range statistics are also written as "LPLTAN,..." comment lines in the IGC file. Samples are only taken if airborne, of other aircraft that are airborne, and at least 1km away and not at too high or low a vertical angle. ADS-B traffic is not sampled. The range averaging is done on a log scale, but the range numbers as plain km appear as the first item in each line in the file. If, after enough data has been collected, the range is much lower in some directions than others, the antenna placement may not be ideal. If the RSSI average is much higher (less negative) than -100, there is radio noise in the cockpit making SoftRF reception less sensitive. E.g., a USB power converter may generate such noise. If the RSSI mean square deviation is large, such noise may be intermittent, perhaps caused by a device that is only sometimes carried along or turned on. To forget the old data and start over collecting new range data, delete the file range.txt.