Qualitative Reasoning about Relative Directions: Computational Complexity and Practical Algorithm