Skip to content

.solveArcMoving()

Alex edited this page Aug 20, 2020 · 1 revision

Ballistics.solveArcMoving(): u8

  • Public
  • Solve firing angles for a ballistic projectile with speed and gravity to hit a target moving with constant, linear velocity.
  • Returns number of unique solutions found: 0, 1, 2, 3, or 4.

Input Buffer

Index Value
0 X of a point that projectile will fire from
1 Y --"--
2 Z --"--
3 scalar speed of projectile
4 X of a point that projectile is trying to hit
5 Y --"--
6 Z --"--
7 X of velocity of target
8 Y --"--
9 Z --"--
10 force of gravity, positive down

Output Buffer

Index Value
0 X of firing solution (fastest time impact)
1 Y --"--
2 Z --"--
3 X of firing solution (next impact)
4 Y --"--
5 Z --"--
6 X of firing solution (next impact)
7 Y --"--
8 Z --"--
9 X of firing solution (next impact)
10 Y --"--
11 Z --"--