I'm making pocket holes to connect wood together with a jig, the Kreg 720. The 720 works by moving at an angle (which I'm trying to measure) to ensure the hole is drilled higher on thicker pieces.

The jig makes a hole like this at a 15 degree angle.
[![enter image description here][1]][1]

The 720 works like this:

[![enter image description here][2]][2]

I'm trying to calculate the length of the drill bit which I can set with a stop. The 720 has stops included for common wood, but I like to be exact and I need to understand the geometry of how the 720 works. I zeroed out an angle meter and found that the case is 57 degrees, but I took some measurements at the top and bottom and through taking the tangent, figured out that the sliding block moves closer to 58 degrees.

|                 | s        | d   |
| --------------- | -------- | --- |
| high point (mm) | 43.9     | 54  |
| low             | 10.1     | 0   |
| accuracy        | 0.1      | 0.1 |
| $\Delta$               | 33.8     | 54  |
| $\theta$               | 57.95648 |     |

But! I wanted to make sure that the drilling jig block moved at 57 degrees, so I used my caliper to measure the board thickness block at the bottom and the top. That gave me these measurements.

[![enter image description here][4]][4]

Per this geometry:
[![enter image description here][5]][5]

From this I'm trying to find $D$ the length of the shaft of the pilot screw given $t_{\text{min}}$, the minimum thickness, $t_b$ the thickness of the board for pocket holes, $t_T$ the thickness of the board you are screwing into, $\theta$, the angle of the jig, and $s$, the length of the shaft of the screw.

  [1]: https://i.sstatic.net/bUICZ.png
  [2]: https://i.sstatic.net/JQByp.gif
  [3]: https://i.sstatic.net/uPlF2.png
  [4]: https://i.sstatic.net/gjLSI.png
  [5]: https://i.sstatic.net/wsdtF.png