A position detector arranged to be mounted at a radiation detector of a radiotherapy treatment apparatus, which includes a gantry rotatable about a gantry rotation axis, and a collimator rotatable about a collimator rotation axis. The radiation detector is mounted at the collimator. The position detector comprises:- an accelerometer device, which is arranged to detect at least gravitational acceleration in at least one dimension;- a gyro device arranged to detect at least angular velocity in at least one dimension;wherein the accelerometer device and the gyro device in common are arranged to be operative in three dimensions, and- a controller connected with the accelerometer and the gyro;wherein the controller is arranged t o receive first input data from the accelerometer device and second input data from the gyro device, and to determine at least a collimator angle and a gantry angle by means of the first and second input data.