Correct formula for phi, in case of current local X <0, in GetLocalXat and GetPhiZat