A data processing method for generating a compensation information for hacking or for determining the position and/or orientation of an object in space, the method comprising the following steps performed by a computer: a) acquiring a predetermined constraint information defining one or more relative or absolute positions and/or orientations of the object in space; b) acquiring position and/or orientation data of the object while the object is positioned or moved while fulfilling the predetermined constraint; and c) determining the compensation information based on the predetermined constraint information and the acquired position and/or orientation data of the object.