<So does must. So does have to. So does supposed to.
I must X if I am to ... = something like I have to X + something like if I have to ... = (approx.) I have to if I have to ...
" src="/emoticons/emotion-1.gif">
So the substitution of going to is really no less logical than that!>
Yes, but in those sentences two incidents of obligation are mentioned in each.
I must do X if I am to do Y.
I have to do X if I am to do Y.
I'm supposed to do X if I am to do Y.
I must do X if I am going to do Y. (If Y is going to happen, I must do X) To me, there is no obligation with "going to" there.
<I (am going to) have to X if I have any hope of X-ing ...>
Again, for me the obligation comes from "have to" there and not "be going to". "Am going to" is prediction or deduction based on present evidence there.