Hi,
To convert to feet, just use the inches figure and divide by 12. That can be done all in one calculation by dividing by 14.9 * 12 = 178.8 , or just dividing by 179 will be good enough. But using units of feet is probably not a good idea if you only have integer maths. For example, taking into account the inverse square law, an object 2 feet away will be more than twice as bright as one at 3 feet (i.e. 9 / 4 times brighter).
But the actual distance units aren't relevant anyway, what you want to achieve is a value of (about) 1023 (for the PWM command) at the distance that the LED illimumination is correct. Taking into account the inverse square law, you need that distance to be 32 "units" (because 32 * 32 = 1024), so if the distance were 20 feet, then the unit would be 240 inches / 32 = 7.5 inches or 19 cms. So the overall divison factor would be 6.2 * 19 = 117.8, or 118 would be "good enough".
But incidentally, a useful trick if you want the program to divide more accurately by 117.8 is to divide 65,536 by 117.8 = 556(.333), so the calculation can be to multiply by 556 and divide by 65,536. That's exactly what the ** operator can do, so instead of dividing by 117.8 (or * 10 / 1178), simply ** 556 .
As for measuring a distance of 20+ feet, plenty of "ultrasonic tape measures" work to that distance, so you might be able to "hack" one. Alternatively, I don't know how quickly it's posisble to "turn around" the HC-SR04 (i.e. transmit a second pulse) but the following might work (or maybe use two transmitting sequentially):
Transmit a pulse and if no "echo" is detected then immediately send another pulse. Of course that should also get no signal, but if one is received then it must be the one transmitted previously. So if you know the delay to the second transmission, you can calculate the additional distance. Maybe even repeat again to give up to 30 feet range.
There may be some difficulty if the echo returns just when the second transmission starts, but it might be possible to work around that with two ultrasonic units and/or two different delays.
However, IMHO as you have a CCTV camera signal (a USB webcam or networked camera would be a different story) it should be quite easy for the PICaxe to detect if the output ("1 volt CVBS") signal overloads, and reduce the PWM accordingly.
Cheers, Alan.