1. A method for determining the location and/or speed of an object configured to move along essentially the same controlled trajectory in a magnetic field deflected by a static and/or dynamic change, in which method a measuring device measuring at least the magnetic field acting on the object in its different locations is fitted in connection with the object, which measuring device comprises at least means for measuring the magnetic field, from the measuring data received from which means a magnetic footprint describing the magnetic field acting on the object in its different locations is formed, which magnetic footprint is recorded in the memory of the arrangement for later use before actual operation of the object, wherein before actual operation or during operation an initialization is performed, wherein the object is moved on the aforementioned controlled trajectory, and at points determined by either position and/or time on the aforementioned controlled trajectory the magnetic field acting on the object is measured with the means for measuring a magnetic field and the measurement results obtained are recorded as magnetic footprints in the memory of the arrangement if necessary, in addition to measuring the magnetic field, additional measuring means at essential points of the controlled trajectory from the viewpoint of the operation of the object are used as an aid, such as machine vision, a gyroscope, a pressure sensor, time measuring means, and/or means measuring other sensor data for measuring other sensor data of the object in its environment at that moment and/or the time used data, and the measurement results obtained are recorded in the memory of the arrangement from the measurement results obtained at the aforementioned points determined by either position and/or time on the controlled trajectory, position data of the object in relation to the aforementioned controlled trajectory is formed, and if necessary also time data to be connected to the position data by fixing the measurement results to the determined measuring locations of the controlled trajectory during operation, the movement and environment of the object is measured with the same means for measuring a magnetic field as during the initialization, and if necessary with the same other additional measuring means as during the initialization, and the measurement results obtained are compared to the optimal sensor data formed from the measurement results recorded in the memory of the arrangement during the initialization and recorded in the memory, such as time data, position data, speed data and pressure data, as well as to measured data about the environmental conditions of the object.