Methods and devices to track patient anatomy during a surgical operation. A patient reference device is attached to an anatomical feature of a patient and it includes an attachment base and an optically-trackable array detectable by an optical navigation system and having a longitudinally-extending arm to space apart the fixed geometric pattern from the anatomical feature. The arm includes a connector to be detachably secured to the attachment base. An inertial measurement unit within the attachment base enables determining, based on comparing a threshold level to a motion signal, that the attachment base has changed position, wherein the motion signal represents the change in position and its magnitude. Based on determining that the attachment base has changed position an alarm signal is generated an and an output device in the attachment base outputs an alarm in response to the alarm signal.