I am training to do a charity cycle ride and I want to supplement my road training with some work on a cycle machine in the gym. My difficulty is that I don't know what to set the resistance level to on the machine. 

I need to train to do an average of 15mph, but I can easily do this by reducing the resistance on the bike. 

I know the distance I have covered according to the machine and in what time, but can I estimate using the Watts and/or RPM what resistance level to set?