Data processing based on Quality factor

Hello,

I am working on a project to develop a small app that shows the location of a user in a room.
I stream the Pos data from a tag in an RTLS network, which contains 4 anchors and a tag, to my Laptop via USB Serial port and I am writing a Processing program to do the visualization. However, my implementation of the visualization is not as smooth as the Decawave DRTLS android app can do. So I am wondering how is your android app processes the raw data? Did you manipulate the data according to the quality factor? If so, what will the algorithm be?

I am thinking a problematic algorithm that I will discard the data if the QF is smaller than 50; if the QF is 100, I will totally trust the new data and visualize it; if the QF is within 50 to 100, the higher the QF, the closer the point to the new data, the lower the QF, the point will be more stable. However, I came up that the error will be accumulated if I implement it in this way.

It will be very helpful if anyone can give me some suggestion. Thank you very much.

Richard