I need some ideas on what is the best way to detect collisions in my game. Heres the basic idea of the game:

There is a cannon (a rectangle) in the centre of the screen that can rotate from -90 to 90 degrees (0 degrees is straight up)from the bottom of the screen. Then "ships" fall from the top of the screen and you have to shoot them down. The ships can also move side to side randomly. I just need some ideas on how to detect if a ship hits the cannon.

Here is what I was thinking of doing. Find the distance from the bottom of the cannon for each ship, and if its greater than the length of the cannon, do nothing. Other wise find the angle that the ship is at relative to the centre of the cannon. then if the angle is with like a few degrees, then a collision.

The only part that making this hard for me is if the ships moving side to side randomly. Any other ideas?