Useless Idea: Diffraction pattern on linear CCD for position sensing?

For a cheap, high precision position sensor, could use a linear ccd from a scanner, project a laser through a diffraction grating (or pinhole) with a known diffraction pattern, then do some simple curve fitting/energy minimization of the visible pattern to find the position. Curve fitting rather than point tracking would be used to get sub pixel resolution. Since the light is directly from the laser (bright), short “shutter” times could be used. By knowing a 2d diffraction pattern, x and y position could be calculated (and rotation if the pattern isn’t polar).
The higher precision would come from the averaging of the noise across the sensor width. Using a wire shadow, slit, or “knife edge”, you can only use the intensity information from the pixels at the edge(s) of the feature casting the shadow. Although, with the diffraction pattern, there would be a slight reduction of usable area caused by any fringes out of the dynamic range of the sensor. This could be helped by using a pattern with a limited intensity range (translate sensor so main lobe isn’t visible).
Something like this might provide an extended range compared to a capacitive or mirrored method, and might be more robust! The pin hole/grating movement could be pretty extreme compared to the active sensing area and not cause damage, like a capacitive sensor.
Expense would be in the microcontroller. DSP type features might be needed to process complicated patterns at reasonable speeds.
Of course, using a more standard system with a time average would most likey be just as good, but much more boring.
