|
Re: Calculating Angle to fire at
Why so complicated? Build your shooter and iterate through the ranges, keeping track of the shooter launch angle and camera tilt servo position. Then all you have to do is look up the value for the shooter angle based on the camera tilt servo and forget about the range. You can use a joystick button to add a fixed offset to adjust in realtime if something changes on the field and it starts missing.
When I tested the camera code I could only get about 20' away before the trackable pixel area becomes too small. At 6" increments your lookup table is only 40 entries long.
|