Links are working as of 6/7/2024, please use feedback if it stops working. If there are other forum threads worth adding, feel free to say so, too.
A few former threads on the subject: Roof Rafter Collar Tie Calculations/Design, 2019 (This contains some conflation between a collar tie, which is not a structurally effective way to make this kind of roof work).
Wood Roof - Thrust, 2020. This gets a bit detoured and there's a whole sequence with RISA modeling snafus, which is probably quite informative.
The Wood Frame Construction Manual also has the formula. Can't find it right now...