The current procedures for locating ferromagnetic foreign bodies used in the clinic involve radioscopy and radiography image techniques, which presents several limitations and risks. Thus, localization techniques based on magnetometers were developed as SQUID, GMI and GMR, with varying degrees of complexity and success. One of the main difficulties, in addition to the cost and dimensions of the system, in the case of the SQUID, which operates at cryogenic temperatures, is the need for the patient to be positioned in a large structure that allows flexibility in the configurations of the two-dimensional position of the magnetic mapping. On the other hand, the small dimensions of the GMR or GMI sensors allow the development of a portable measurement system that could integrate other sensors that together make it possible to determine the spatial position of the magnetic sensor in relation to the patient. This master's dissertation investigates techniques for determining the spatial position of a portable device, based on a Raspberry Pi platform, integrating GMR sensor, camera, inertial sensors and a distance sensor, aiming at the future development of a prototype of a portable medical device for localization of ferromagnetic foreign bodies. The research also investigates real-time inverse magnetic problem solving techniques based on Kalman filters and least squares adjustment, in order to accelerate the diagnostic procedure in the future clinical application of the device.