Projectile Fired at Stationary Target from Moving Base

I am trying to come up with an equation to determine the azimuth and incline a turret must be at to hit a stationary target of known distance and elevation when you know the initial velocity and mass of the projectile and the velocity of the base holding the turret. I am trying to program a robot to have this capability, but was never very good at physics.
Any help would be greatly appreciated,
Tom

ignoring air resistance,
the vertical component of velocity is reduced by 9.8 m/s each second;
the horizontal component of velocity is constant... but the velocity of the base is added to the typical velocity of projectile .

depending on the scale of this robot, air resistance might be important ....