it's quite possible...i can imagine a way which would use some math (where i have no knowledge at all).
you would need a looped script which setpos a invisible object (might be a gamelogic) constantly in front of the tank at a certain height.
The mathematics would be necessarly to keep the GL in front of the tank and not to drift to left or right...or even behind.
Once you get this, just use the dotarget command to have the cannon pointed to the sky.
You would also need a point where the script cancels this dotarget thing, else the tank would not fight enemy tanks at all. But i think this could be simply done by checking the behaviour.
Maybe someone who has more knowledge of math could write such a script.