A system comprising: a first sensor configured to be inserted in a patient during a surgical procedure, the first sensor comprising: a first magnetic sensor configured to detect a first magnetic field value, a first integrated circuit chip configured to process data from the first magnetic sensor, and a first radiofrequency coil configured to transmit data processed by the first integrated circuit chip based on the first magnetic field; a second sensor attached to a surgical instrument, the second sensor comprising: a second magnetic sensor configured to detect a second magnetic field value, and a second integrated circuit chip configured to process data from the second magnetic sensor; and a plurality of coils configured to generate a magnetic field gradient within a volume in which the surgical procedure takes place, wherein the magnetic field gradient has a unique field value at each spatial location; characterized in that the first integrated circuit chip is further configured to time multiplex power allocated to the first magnetic sensor and to the first radiofrequency coil and in that multiplexing of the first integrated circuit chip comprises: a wake up signal to the first magnetic sensor, received by the first radiofrequency coil; a first time allocation to detect an x component of the magnetic field gradient; a second time allocation to detect a y component of the magnetic field gradient; a third time allocation to detect a z component of the magnetic field gradient; a data transmission through the first radiofrequency coil; and a sleep signal to the first magnetic sensor. a first sensor configured to be inserted in a patient during a surgical procedure, the first sensor comprising: a first magnetic sensor configured to detect a first magnetic field value, a first integrated circuit chip configured to process data from the first magnetic sensor, and a first magnetic sensor configured to detect a first magnetic field value, a first integrated circuit chip configured to process data from the first magnetic sensor, and a first radiofrequency coil configured to transmit data processed by the first integrated circuit chip based on the first magnetic field; a second sensor attached to a surgical instrument, the second sensor comprising: a second magnetic sensor configured to detect a second magnetic field value, and a second integrated circuit chip configured to process data from the second magnetic sensor; and a plurality of coils configured to generate a magnetic field gradient within a volume in which the surgical procedure takes place, wherein the magnetic field gradient has a unique field value at each spatial location; a second integrated circuit chip configured to process data from the second magnetic sensor; and a plurality of coils configured to generate a magnetic field gradient within a volume in which the surgical procedure takes place, wherein the magnetic field gradient has a unique field value at each spatial location; characterized in that the first integrated circuit chip is further configured to time multiplex power allocated to the first magnetic sensor and to the first radiofrequency coil and in that multiplexing of the first integrated circuit chip comprises: a wake up signal to the first magnetic sensor, received by the first radiofrequency coil; a first time allocation to detect an x component of the magnetic field gradient; a second time allocation to detect a y component of the magnetic field gradient; a third time allocation to detect a z component of the magnetic field gradient; a data transmission through the first radiofrequency coil; and a wake up signal to the first magnetic sensor, received by the first radiofrequency coil; a first time allocation to detect an x component of the magnetic field gradient; a second time allocation to detect a y component of the magnetic field gradient; a third time allocation to detect a z component of the magnetic field gradient; a data transmission through the first radiofrequency coil; and a sleep signal to the first magnetic sensor.