Analysis of digital compass technology based on magnetoresis