Method for ascertaining a relative position P of a first object (100, 100a, 100b) with respect to at least one reference object (200, 200a, 200b), comprising: • generating at least three directed magnetic fields B1, B2, B3 having distinguishable modulation frequencies f1, f2, f3 by means of a magnetic-field-generating device assigned to the reference object (200, 200a, 200b), wherein the magnetic-field-generating device comprises at least three emitter coils Tx1, Tx2, Tx3 which alternately have a defined arrangement to one other, • measuring magnetic field strengths |Bx |, |By |, |Bz | and modulation frequencies f1, f2, f3 of the magnetic fields B1, B2, B3 by means of a magnetic-field-measuring device (112, 112a) of the first object (100, 100a, 100b), • ascertaining the relative position P of the first object (100, 100a, 100b) with respect to the at least one reference object (200, 200a, 200b) by means of an evaluation device on the basis of the measured magnetic field strengths |Bx |, |By |, |Bz | which are able to be assigned to the directed magnetic fields B1, B2, B3 via the measured modulation frequencies f1, f2, f3, characterized in that a relative position P' of the at least one reference object (200, 200a, 200b) with respect to at least one further reference object (200, 200a, 200b) is ascertained, comprising: • generating at least three directed magnetic fields Bx', By', Bz' of distinguishable modulation frequencies f1', f2', f3' by means of a further magnetic-field-generating device assigned to the further reference object (200, 200a, 200b), wherein the further magnetic-field-generating device comprises at least three emitter coils Tx1', Tx2', Tx3', which alternately have a defined arrangement to one other, • measuring magnetic field strengths |Bx'(P')|, |By'(P')|, |Bz'(P')| and modulation frequencies f1', f2', f3' of the magnetic fields Bx', By', Bz' by means of a magnetic-field-measuring device (112, 112a) of the reference object (200, 200a, 200b), • ascertaining the relative position P' of the reference object (200, 200a, 200b) with respect to the at least one further reference object (200, 200a, 200b) by means of an evaluation device on the basis of the measured magnetic field strengths |Bx'(P')|, |By'(P')|, |Bz'(P')| which are able to be assigned to the directed magnetic fields Bx', By', Bz' via the measured modulation frequencies f1', f2', f3'. • generating at least three directed magnetic fields B1, B2, B3 having distinguishable modulation frequencies f1, f2, f3 by means of a magnetic-field-generating device assigned to the reference object (200, 200a, 200b), wherein the magnetic-field-generating device comprises at least three emitter coils Tx1, Tx2, Tx3 which alternately have a defined arrangement to one other, • measuring magnetic field strengths |Bx |, |By |, |Bz | and modulation frequencies f1, f2, f3 of the magnetic fields B1, B2, B3 by means of a magnetic-field-measuring device (112, 112a) of the first object (100, 100a, 100b), • ascertaining the relative position P of the first object (100, 100a, 100b) with respect to the at least one reference object (200, 200a, 200b) by means of an evaluation device on the basis of the measured magnetic field strengths |Bx |, |By |, |Bz | which are able to be assigned to the directed magnetic fields B1, B2, B3 via the measured modulation frequencies f1, f2, f3, • generating at least three directed magnetic fields Bx', By', Bz' of distinguishable modulation frequencies f1', f2', f3' by means of a further magnetic-field-generating device assigned to the further reference object (200, 200a, 200b), wherein the further magnetic-field-generating device comprises at least three emitter coils Tx1', Tx2', Tx3', which alternately have a defined arrangement to one other, • measuring magnetic field strengths |Bx'(P')|, |By'(P')|, |Bz'(P')| and modulation frequencies f1', f2', f3' of the magnetic fields Bx', By', Bz' by means of a magnetic-field-measuring device (112, 112a) of the reference object (200, 200a, 200b), • ascertaining the relative position P' of the reference object (200, 200a, 200b) with respect to the at least one further reference object (200, 200a, 200b) by means of an evaluation device on the basis of the measured magnetic field strengths |Bx'(P')|, |By'(P')|, |Bz'(P')| which are able to be assigned to the directed magnetic fields Bx', By', Bz' via the measured modulation frequencies f1', f2', f3'.