Using sonar distance to calculate flywheel rpm?


Is it possible to use the sonar reading of the distance away from the net to automatically calculate a rpm for the flywheel so that the ball will accurately hit a given height (e.g. top flag)? Obviously, a lot of testing has to be done but has anyone tried this?