Rangefinder

I need help. I need a way to (using optics) build a rangefinder that I could use to aim my air cannon over long distances. How would I judge the distance away from my target? Could I use lasers? Mirrors? Lenses? And once I judge how far away my target (to be drenched with a water balloon) is, then what? How will I know what degree of elvation I should angle my cannon at? Is there some mathmatical formula I could use to make a chart that I could just look at and adjust my gun? How could I build this?

err, something about trigonometry (for the range-finding bit). Then you're gonna have to collect some data like, for example, if you aim the cannon 15 degrees at 150 PSI it will go 200 yards then you keep on collecting data then look for a pattern. Makeup a mathematical formula from that then done.