Rotary encoders for offshore and marine applications