Naso- or oro-gastric tubes are used for patients who have difficulty swallowing, to deliver nutrients or medicines to the stomach. To observe whether the tube is inserted into the stomach correctly, we have proposed a method that estimates the position of the permanent magnet attached to the tip of the tube using several magnetic sensors placed outside the patient's body , . The mean of the tip position estimation error is less than 10 mm when the distance between the sensor plane and the permanent magnet is 150 mm . However, if the system is used on pregnant or fat patients, the system needs to perform accurately even for distances greater than 150 mm. To achieve the requirement mentioned above, the sensitivity of the magnetic sensors should be enhanced. Although high-sensitivity magnetoimpedance (MI) and magnetoresistance (MR) sensors can detect signals of the order of nT, the performance is only achieved in a magnetically shielded room due to the limitation of the measurement range and the existence of the geomagnetic field; this creates a problem for the system's practical use in hospitals. Therefore, we propose a method to compensate the geomagnetic field using offset coils.