When conventional position sensors do not function in a particular environment for a mobile robot, a fluxgate magnetometer can be used. This system employs sensitive magnetic receptors and a microcomputer to sense the presence of, and detect changes in, an artificially generated magnetic field. Navigation within a room can be done by checking the orientation of magnetic lines of flux generated by electromagnets in the walls, floor, and ceiling of the room. For each point in the room, the magnetic flux lines have a unique direction and intensity. There is a one-to-one correspondence between the magnetic flux intensity/direction and the points within the robot’s operating environment. This correspondence can be represented as a two-variable mathematical function of every location in the room. The robot controller is programmed to know this function. This makes it possible for the machine to pinpoint its position with extreme accuracy, in some cases to within a few millimeters.