Coarse encoder combined with fine grid ccd detector