Most gauges are probes that are set at different levels in the tank. As the tank fills, the fluid acts as a conductor between the lowest probe and the higher probes. Sounds like a good plan and in an ideal world it would be.
Unfortunately instead of a tall skinny tank with wide spaced probes, many TT tanks are short and squat affairs prone to slaushing, so the probe spacing is not very wide and often shorted by debris or moisture that has bridged the probe gap. Add to this the fact that the TT or the tank or both may not be level, which will only add to the error.
My black water tank was constantly reading FULL, so I took the advice of some on the board and dumped in a 22 lb. bag of ice before I hit the road. Crude but effective, it scrubbed what ever was bridging the probes. I really do not want to know. :E
As previously mentioned, unless you are willing to tinker and calibrate, most folks find it easiest to just consider the readings only an approximate indication of tank status.