In ancient China,people invented the compass to help avoid _