here is proposed calculation of RMS: http://replaygain.hydrogenaudio.org/rms_energy.html
I don't know what foobar scanner is doing for DTS 5.1, and I rarelly use them, as they are stored on DVD/CD, but here is one example result:
DTS 5.1 CD itself [RGAG: +0.24 db, RGAP: 0.250000]
RGTG; RGTP
+0.24 dB; 0.250000
+0.18 dB; 0.250000
+0.21 dB; 0.250000
+0.25 dB; 0.250000
+0.22 dB; 0.250000
+0.15 dB; 0.250000
+0.26 dB; 0.250000
+0.34 dB; 0.250000
+0.32 dB; 0.250000
+0.27 dB; 0.250000
DTS 5.1 CD converted to 6ch FLAC [RGAG: +2.65 dB, RGAP: 0.693634]
RGTG; RGTP
+4.93 dB; 0.434052
+4.75 dB; 0.672180
+3.43 dB; 0.665527
+0.27 dB; 0.693634
+6.48 dB; 0.475281
+2.66 dB; 0.678558
+5.47 dB; 0.580597
+5.73 dB; 0.638672
+5.41 dB; 0.467438
+2.32 dB; 0.666077
DTS 5.1 downmixed to stereo FLAC with foo_dsp_downmix [RGAG: -1.69 dB, RGAP: 1.000000]
RGTG; RGTP
+0.50 dB; 0.529785
+0.42 dB; 0.820160
-0.56 dB; 0.727051
-4.10 dB; 1.000000
+2.37 dB; 0.534760
-1.91 dB; 0.999969
+0.83 dB; 0.725220
+1.64 dB; 0.691956
+0.73 dB; 0.714508
-1.82 dB; 0.844971
I guess that in first result foobar is processing it as noise (as DTS without decoder), but for second and third example I don't know what's happening, and obviously the third example works best in reality