MAGNETIC ENCODER