A method for determining a position of a magnetic source includes measuring a magnetic field generated by the magnetic source (832) and determining components of the three-dimensional magnetic flux density of the magnetic field at a plurality of points in space based on such measurement (833). The method also includes estimating a position of the magnetic source (834) and determining components of a theoretical three-dimensional magnetic flux density at the plurality of points in space based on the estimated position (836). The position of the magnetic source may then be determined by minimizing the difference between the components of the measured and corresponding theoretical three-dimensional magnetic flux density components (838-842).