Method for measuring the relative positions of a first component and a second component, said method comprising: mounting a first measurement unit on a housing forming part of said first component by means of a first bracket, said first measurement unit being rotatably arranged in relation to said first bracket and defining a first rotational axis; and mounting a second measurement unit on a further housing forming part of said second component by means of a second bracket, said second measurement unit being rotatably arranged in relation to said second bracket and defining a second rotational axis; characterized in that said method comprises: measuring, in a first state of operation of said first component and said second component, the relative position of said first component in relation to said second component by detecting the position of said first axis and by detecting the position of said second axis; providing measurement values corresponding to the positions of said first rotational axis and said second rotational axis, measuring, in a second state of operation of said first component and said second component, the relative position of said first component in relation to said second component by detecting the position of said first axis and by detecting the position of said second axis; and obtaining information related to the relative positions of said first component in relation to said second component based on the measurements made in said first state of operation and the measurements made in said second state of operation, wherein the measurement values are obtained, in both the first state of operation and said second state of operation, by rotating the measurement units (6, 8) between different positions in which measurement values are registered. mounting a first measurement unit on a housing forming part of said first component by means of a first bracket, said first measurement unit being rotatably arranged in relation to said first bracket and defining a first rotational axis; and mounting a second measurement unit on a further housing forming part of said second component by means of a second bracket, said second measurement unit being rotatably arranged in relation to said second bracket and defining a second rotational axis; measuring, in a first state of operation of said first component and said second component, the relative position of said first component in relation to said second component by detecting the position of said first axis and by detecting the position of said second axis; providing measurement values corresponding to the positions of said first rotational axis and said second rotational axis, measuring, in a second state of operation of said first component and said second component, the relative position of said first component in relation to said second component by detecting the position of said first axis and by detecting the position of said second axis; and obtaining information related to the relative positions of said first component in relation to said second component based on the measurements made in said first state of operation and the measurements made in said second state of operation, wherein the measurement values are obtained, in both the first state of operation and said second state of operation, by rotating the measurement units (6, 8) between different positions in which measurement values are registered.