Qt three-point positioning algorithm