In wireless sensor network localization algorithm, the triangular test APIT algorithm and optimal triangulation measured point PIT algorithm are influenced by the density of nodes,and can lead to error Out-To-In and error In-To-Out. When these two types errors occur, the coordinates of node are often different from the centric of the triangle. New algorithm put forwards use the triangular area to avoid these two kinds of errors, and calculation fingerprint distribution probability in overlapping area to locate nodes. Finally, simulation show that the new algorithm can avoid the above two kinds of errors effectively and has higher positioning accuracy.