Skip to content
CrocoDocs
Starter GuideProgrammingEngineeringDesignPortfolio
Documentation

Introduction

IntroductionBIOBUZZ game overview

Getting started

Getting startedBlocksOnBot JavaAndroid StudioYour first OpModeJava basicsMotors and servosNonblocking codeDebugging robot code

Control systems

Control systemsJoystick mappingField-centric mecanum drivePID controlFeedforwardFlywheel velocity controlSystem identificationMotion profilingKalman filterLow-pass filter

Autonomous

AutonomousTimed and encoder movementOdometryLocalization troubleshootingMotion planningReliable autonomous sequencesPure PursuitSensor fusionAuto to TeleOp handoff

Season topics

Season topicsProjectile mathematicsTurret aimingShooting on the move

Code practices

Code practicesNaming conventionsCode organizationLoop timing and bulk readsFormattingComments and documentationTeam collaboration

Libraries

LibrariesNextFTCFTCLibSolversLibPedro PathingRoad RunnerFTC DashboardMercurial v2Mercurial v1PanelsSloth

Community software

Community softwareBlaze FTCOpenLoopHive Vision

Sensors and vision

Vision overviewVision basicsLimelight 3A
Starter Guide
Engineering
Design
Portfolio
Appearance

Projectile mathematics

Estimate launch speed, angle, and flight time, then calibrate a real FTC launcher with measured shots.

Projectile maths gives you a starting point for a launcher: how fast the ball must leave, which angle might work, and how long the shot will take. Real balls also experience drag and spin, so use the model to narrow your experiments, then tune on the .

Measurements

Measure from the point where the ball leaves the launcher to the point its centre should pass through at the target.

SymbolMeasurement
dddHorizontal distance to the target, in metres
hhhTarget height minus release height, in metres
θ\thetaθLaunch angle above horizontal, in radians
vvvBall speed at release, in metres per second
tttTime since release, in seconds

The height difference can be negative. The distance is from the release point, so a launcher mounted away from the robot's centre needs that offset included.

A ball follows an arc from a launcher to a higher target. Separate dimension lines show horizontal distance d and height difference h; an arrow at release shows the launch angle.
Use the ball's release point and intended target point. The drawing illustrates the measurements, not a particular field. Open it for a larger view.

For a tilted opening, choose the crossing point and check the whole ball's through the opening. A point on an AprilTag is not automatically the point you want to shoot through.

Speed and angle

First assume a stationary launcher, constant gravity, and no air resistance. Horizontal speed stays constant, while gravity changes the vertical speed:

x(t)=vcos⁡(θ)tz(t)−z0=vsin⁡(θ)t−12gt2\begin{aligned} x(t) &= v\cos(\theta)t \\ z(t)-z_0 &= v\sin(\theta)t-\frac{1}{2}gt^2 \end{aligned}x(t)z(t)−z0​​=vcos(θ)t=vsin(θ)t−21​gt2​

Here ggg is approximately 9.81 m/s29.81\,\mathrm{m/s^2}9.81m/s2. Setting x=dx=dx=d and z−z0=hz-z_0=hz−z0​=h gives the speed needed at a chosen angle:

v=gd22cos⁡2(θ)(dtan⁡(θ)−h)v=\sqrt{\frac{gd^2}{2\cos^2(\theta)(d\tan(\theta)-h)}}v=2cos2(θ)(dtan(θ)−h)gd2​​

Use a forward launch angle between zero and 90 degrees. The denominator must be positive, and the result must be finite. An invalid result means that angle cannot reach the chosen point under this model; do not turn it into a shot by clamping the denominator.

Example

Suppose the horizontal distance is 2.4 m, the target is 0.7 m above release, and the launch angle is 50°. These are example measurements, not field .

The model gives about 5.63 m/s at release and 0.664 seconds of flight. The vertical speed at the target is:

vz,target=vsin⁡(θ)−gtv_{z,\mathrm{target}}=v\sin(\theta)-gtvz,target​=vsin(θ)−gt

This is about −2.20 m/s, so the ball is descending. That matters when scoring through an opening from above. Still check the approach angle, surrounding structure, and ball clearance; reaching one coordinate is only part of the shot.

A 45° launch gives the greatest range only for equal launch and landing heights in this ideal model. It is not a general rule for the best scoring angle.

Flight time

You can also choose a flight time and calculate the required velocity components:

vx=dtvz=ht+gt2\begin{aligned} v_x &= \frac{d}{t} \\ v_z &= \frac{h}{t}+\frac{gt}{2} \end{aligned}vx​vz​​=td​=th​+2gt​​

Then calculate speed with v=vx2+vz2v=\sqrt{v_x^2+v_z^2}v=vx2​+vz2​​ and angle with θ=atan2⁡(vz,vx)\theta=\operatorname{atan2}(v_z,v_x)θ=atan2(vz​,vx​). A shorter flight needs more horizontal speed; a longer flight generally needs a higher arc. Check both against what the launcher can produce and what the field allows.

Flight time is also needed for shooting on the move. Changing the aim without preserving the vertical path can make a moving shot miss high or low.

Flywheel speed

A wheel of diameter DDD metres turning at NNN has rim speed:

vrim=πDN60v_{\mathrm{rim}}=\frac{\pi DN}{60}vrim​=60πDN​

That is the speed of the wheel surface. Ball exit speed also depends on compression, slip, hood contact, and the arrangement of the wheels. Do not convert the calculated ball speed straight into RPM and assume the launcher is calibrated.

Check which the measures and include its gear ratio. Keep motor RPM, wheel RPM, and ball speed as separate quantities in the code.

Calibration

Keep the launcher height and ball type fixed while building a table. For each distance, find a repeatable RPM and hood setting, then record:

RecordWhat to note
DistanceMeasure from the release point
Wheel RPMRequested and measured speed
Hood settingAngle or calibrated position
Flight timeRelease to the target
Hits and attemptsCount every attempt
SpreadNote the miss direction and variation

Slow-motion video can help measure flight time. Start when the ball separates from the launcher, not when the feeder starts. The quotient d/td/td/t is the average horizontal speed over the flight; with drag, it is not the instantaneous exit speed.

Interpolate between tested distances. Outside that range, stop and collect more data rather than silently reusing the nearest setting. Log speed recovery between consecutive shots so a slow second ball does not get mistaken for a distance error.

For BIOBUZZ, calibrate POLLEN and NECTAR separately. Their different sizes can change launcher contact and flight. Repeat the relevant tests when the HIVE's opening changes position or orientation.

Sources

  • OpenStax: Projectile motion
  • Eeshwar Krishnan: Shooting on the Fly
  • Eeshwar Krishnan: Shooting on the Fly Part 2 — LUT
  • FIRST: BIOBUZZ field and game description

Season topics

Apply robot programming and physics to game tasks, starting with projectile motion and shooting while driving.

Turret aiming

Aim from the turret pivot, convert field bearings to mechanism angles, and choose a reachable turn

On this page

MeasurementsSpeed and angleExampleFlight timeFlywheel speedCalibrationSources