calculate user position according to last three positions