To relate the solutions of these equations, the following simple transformation can be employed: $$g= i \left(\frac\pi2-f\right),$$ where $i$ stands for the imaginary unit.