A digitizer device comprises an elongated body and legs connected to the elongated body. At least one joint is between the legs and the elongated body such that free ends of the legs are displaceable relative to one another. An inertial sensor unit is connected to the elongated body, the inertial sensor unit having a preset orientation aligned with the elongated body. A table reference device comprises a body adapted to be fixed to an operating table. An inertial sensor unit is with a preset orientation related to the operating table. A patient coordinate system comprising orientation data obtained from the inertial sensor units of the digitizer device and the table reference device