I want to transfer between two planets using Hohmann transfers and the patched conic approach. However, I am struggling to figure out how long I have to wait at the starting planet (say Uranus) until I can return home (to Earth). I am choosing Uranus because earth's orbit is many times shorter than it.
What I have so far is that I need the initial angle between the planets when I arrived at Uranus on the transit from Earth, and I need something about the relative angular rates of both Earth and Uranus. But, nothing that I am coming up with gives me a reasonable answer. Many give me negative time values.
From Eq. 22 on page 11 of lecture #6 notes from Virginia Tech's Astromechanics course AOE4134, I was able to find an equation:
$$ wait\ time =\frac{\phi_0+\omega_1*t_{transfer}-\pi}{\omega_2 - \omega_1}, $$
where:
The initial angular separation between Earth and Uranus when the craft arrives at Uranus is $ \phi_0$
$\omega_1$ is the angular rate of Earth.
$\omega_2$ is the angular rate of Uranus.
$t_{transfer}$ is the time to transfer between the planets on the Hohmann orbit.
The problem with this is that it gives me a negative time and I don't know how I am misunderstanding it to get the wrong time.
TLDR: I need an equation that will give me how long I have to wait at a planet to transfer to another planet.