Measuring rotation over z-axis (gravity axis) inside an metallic duct
Sadly, this may be a very difficult problem to solve. The problem is that you have almost nothing to use as a reference.

There's no magnetic field, and no suitable gravitational one. So compasses and accelerometers won't help you here. These are the options I can think of:

Gyro: You can measure the rate at which the object is rotating, but not its absolute orientation. By watching the rotation rate all the time, you can estimate your angle by 'dead reckoning' (integration). However, this is really not accurate over long periods of time because the gyro isn't a perfect sensor. More time = more error.

Optics 1: There are a huge number of options here which may be suitable depending on your particular circumstances. Firstly, you could use a camera to look at the inside of the duct. If it's featured enough, you could figure out your angle by looking at the features. If the duct is perfectly smooth on the inside, then perhaps you can shine a laser down the duct to spot on the inside for the prototype to use as a reference.

Optics 2: If the entrance of the duct is still visible from the prototype, then a camera on the prototype could look back up the duct and see the orientation of the outside world to get its bearings.

Acoustics: If you have access to the outside of the duct, then maybe you could repeatedly tap on the outside of the duct, and the prototype could get a sense of direction with a couple of microphones.

How is the prototype being lowered into the duct? On a piece of string? If so, then attach it to a pair of strings instead. That way it won't be able to rotate by itself. You'll do the rotating from the entrance of the duct.

So, basically, all of these options involve some complexity. You won't be able to get a simple analog direction signal from a simple sensor. Almost everything I can think of involves processing power to some degree.

If you can give more details of your problem, we may be able to think of better solutions.