1. A method for determining a location and/or speed of an object configured to move along essentially a same controlled trajectory in a magnetic field deflected by a static and/or dynamic change, the method comprising the steps of: a measuring device measuring at least the magnetic field acting on the object in its different locations, the measuring device being fitted in connection with the object, and comprising at least means for measuring the magnetic field; and forming a magnetic footprint describing the magnetic field acting on the object in its different locations from measuring data received from the measuring device; recording the magnetic footprint in a memory of an 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 controlled trajectory, and at points determined by either position and/or time on the 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, in addition to measuring the magnetic field, additional measuring means at essential points of the controlled trajectory from viewpoint of the operation of the object are optionally used as an aid for measuring other sensor data of the object in its environment at that moment and/or the time used data, and measurement results obtained from measuring the other sensor data 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 controlled trajectory and optionally time data to be connected to the position data are formed by fixing the measurement results to the determined measuring locations of the controlled trajectory, and 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 optionally with the same additional measuring means as during the initialization, and the measurement results obtained are compared to optimal sensor data formed from the measurement results recorded in the memory of the arrangement during the initialization and recorded in the memory, as well as to measured data about the environmental conditions of the object, and wherein the method further comprises determining locations of the object during the operation and detecting changes occurring in the operation in relation to location, motion state and condition of the object by comparing real-time measurement results obtained during operation of the object to the optimal sensor data formed from the measurement results recorded in the memory during the initialization.