Wireless communication signals have become popular alternatives for indoor positioning and navigation due to lack of navigation satellite signals in such environments. The signal characteristics determine the method used for positioning as well as the positioning accuracy. Ultra-wideband (UWB) signals, with a typical bandwidth of over 1 GHz, overcome multipath problems in complicated environments. Hence, potentially achieves centimetre-level ranging accuracy in open areas. However, signals can be disrupted when placed in environments with obstructions and cause large ranging errors. This paper proposes a ranging measurement quality indicator (RQI) which detects the UWB measurement quality based on the received signal strength pattern. With a detection validity of more than 83%, the RQI is then implemented in a ranging-based collaborative positioning system. The relative constraint of the collaborative network is adjusted adaptively according to the detected RQI. The proposed detection and positioning algorithm improves positioning accuracy by 80% compared to non-adaptive collaborative positioning.