Custom Rafter for “X” Brace on Deck Support (2×4)

I’ve built a section of my deck and I have stiffened it up with X’s perpendicular to the house. I added 45’s parralel to the house under the beams. It’s the perpendicular X’s that are giving me a hard time. The angles or mitres are never tight. I tried using Trig and roof rafter methods but it’s not working (AKA I’m not getting it). As an example one rise was 50″ and the run was 99″. I was using a 2×4.
I’m attaching a link to a picture but I need “the trick” to get those angles and diagonal lengths right.
Replies
Sometimes just drawing a scale model is the way to go. Get some butcher paper and draw it an inch to the foot, then take your angles off with a protractor.
(BTW, that's an unusual scheme, putting the posts on steel posts like that? Montreal area? Is this style common there?)
It's very common due to the frost heaving. If the ground heaves, it won't grab the steel posts. The other great thing is they are adjustable. I purposely cut my 4x4's 1" short to compensate for the adjustment I'll make with the steel posts. Just turn the nut and up she goes. Plus when I calucalated the time and money to dig the post holes, the sono tubes, gravel and concrete, I wasn't saving enough to not have the steel post guy come in and do them in a few hours.
I might have found my flaw. I was measuring the longest edges at each end of the brace when I should have measured the long end to the short end (at the other end). In other words, measure my rise and run but take 3" or so off my rise so that I am working with the right angle triangle under my brace.
So the metal posts are driven like a piling? Or screwed in like a mobile home anchor? How deep, typically?
Why are you using X braces at all? Are you in a sesmic zone?