0

I am currently writing a software that is supposed to predict the exact time and location of impact of a projectile in a 3D environment. The software I've written currently passes 3824 different test cases, all save for 1. In this one failing case, my program's prediction is (supposedly) off by .002 seconds, which is outside the acceptable range (3 decimal places). I would like some help determining if the answer provided by the test case is actually correct.

The relevant physics information:

Start Position: -924.190, -874.033, -451.556

Final Position: -560.32, -1211.93, -159.66

Start Velocity: 49.052, -65.432, 68.914

Up Vector: 0.533, 0.319, -0.783 (The direction the simulation considers "up", opposite direction of gravity)

Gravity Acceleration: 8.327

Final Time (theirs): 5.878

Final Time (mine): 5.876

Again, I don't need help programing the solution, at the moment. I'm just looking for someone to validate one of these possible answers. The program is a test of ability, so I would really prefer to know whether or not their answer is correct before talking to them about it. Thank you in advance!

  • How come it seems like the the vector the points from start to end point, the velocity vector and the up vector are not coplanar? Is this the classical case of a particle moving in a constant uniform gravitational field (along the vector up) in an inertial coordinate frame without any atmospheric resistance or friction? When I calculate the cross product, it is nowhere near zero: ```np.cross(x_end - x_start, v_start).dot(up) = 1.2993129579972447``` – Futurologist Oct 28 '20 at 16:06
  • Can you detail the calculation your program uses to solve this? I'm getting a time of `3.61683` with Mathematica using the numbers given here, and I'm inclined to think that's pretty reasonable given that in the *z*-direction there is a change of almost 300 with an initial velocity of almost 70 and positive acceleration. – William Miller Nov 04 '20 at 20:35

0 Answers0