Launch Regression Calculator

Use this calculator to produce a quadratic or cubic formula that can be placed in your robot code to set the velocity of a launcher flywheel based on a range from target. This allows for your robot to dynamically adjust launch speeds to score from various ranges.

To use this calculator, you must select 3+ ranges to test (preferably on the extremes of your desired launch ranges with 1 or more points in the middle). Your input units will match output units, so if you input ranges in meters the formula will need an input from your vision system that is also in meters. Likewise, your speed units will need to match so an input of RPM will produce a target output in RPM.

If you use more than 3 input points, we advise using a cubic regression formula. For pure parabolic motion a quadratic regression is all that is required, however with some lightweight game pieces that are vulnerable to air resistance (or launchers where game pieces are prone to slipping at high speeds) a cubic regression will better compensate for the more complex launcher dynamics.

To collect your input points, place the robot at the desired range and vary launch RPM manually until the robot is consistently hitting the target in the “ideal” midpoint (the most space between under and over shooting). Document both the exact range and flywheel speed, preferably with the range output directly from the robot’s vision processing to reduce sources of error.

We recommend sending the output of your quadratic formula directly as a target for a PIDF controller in your robot code or motor controller.