A working machine has a body and a moveable element. The moveable element is moveable relative to the body. A camera captures an image of at least a portion of the moveable element. A processor executes a machine learning algorithm trained to determine a position of a moveable element from an image of the moveable element. The machine learning algorithm receives the image from the camera and determines the position of the moveable element in the image.