So, this is one of those trig problems that has me thinking, "I used to know how to do this, dangit!".
The basic problem is that I need to use a robot-carried sensor to find the highest point of a cylinder lying horizontally in a V-notch, like so:
And from that single-point touch, determine the radius of the cylinder and the vertical distance between the the bottom of the notch and the centerline of the cylinder. So my sensor will touch off the intersection of the dotted line with the top of the cylinder. The radius of the cylinder is unknown, and the interior angle of the V-notch will be known but may not be a nice clean 90deg (still waiting on the mechanical designers, but the V-notch is driven by other parts of the design, so we robot programmers will have to make do with whatever it ends up being).
Obviously, the centerline of the cylinder, the bottom of the notch, and the point of tangent contact against the side of the notch will always make a right triangle (with the right angle at the tangent point of contact). There should be a means to extract the data I want (the cylinder radius, and the distance from the bottom center of the notch to the centerline of the cylinder) using trigonometry, but my trig skills are rusty enough that I'm not finding it so far.