There's a reason that none of our math works.
Perspective. Camera's don't take scale photos. They compress and expand various portions of the frame because of how the lens works. We're doing a lot of really tough math to try to compensate for something that is being skewed by our optics.
However, this work has led to one observation on my end. My web tool based off of Cyparagon's math, requires three pieces of info:
1) Grating lines per mm
2) Distance from surface
3) Distance between dots
We can actually increase the accuracy of this tool, and decrease the complexity of the process by eliminating #1 and #2 and replacing them with a control/known wavelength.
IE, take a grating, shine a 532 through it, measure the distance between dots (physically, with a ruler or measuring tape) and then repeat with the unknown wavelength.
Our basic formula has 4 variables (the 3 above, plus the wavelength). Once you take a control measurement with a 532, you'll essentially have 2 of the 4 variables known, and the other 2 will stay constant between tests. IE, with the proper algorithm, we can eliminate the need to measure grating distance from the wall. All we'll need is distance between the dots for a known, and an unknown.
In theory, even though we WILL know it, we probably don't NEED to even know the grating's lines/mm, since it's basically a simple linear-multiplier in the formula anyway.