implement error calculation for position