How to set sonar threshold?

Can you provide the definition of the sonar threshold functions, and how they affect distance measurement accuracy?
I am trying to detect some 3x3x3 inches colored red/blue/green cubes and their distance. These blocks are used in this year’s Vex IQ high rise challenge.

setDistanceSNRThreshold(tSensors nDeviceIndex, const unsigned short nSNRValue)
setDistanceBrightnessThreshold(tSensors nDeviceIndex, const unsigned short nBrightnessValue)
setDistanceFilterFactor(tSensors nDeviceIndex, const unsigned short nFilterFactor)