Physics Equations in Java

I found this PDF for the physics equations of frisbee flight

My problem: I want to rearrange the equations so you can input the final x and y positions and output the necessary velocities to get to that distance. I want to then put this in a Java program, like the one in the PDF.

Any help?

Convert this to Java and you’re set: https://github.com/anidev/frisbee-calculator :slight_smile:

This is not what I’m looking for… In this program, you must give initial velocity. I want to GET initial velocity from ending X and Y.

Edit: The program does what I’m asking for, but very inefficiantly… It tests several speeds… I don’t want a tester, I want a solver.

Why dont you just change the angle of the shooter and keep the velocity constant? Also, the higher the velocity the more linear the frisbee’s path. This makes the predicted values much more accurate.

See, the problem with changing velocities to shoot is that when you lower the velocity, you also lower the amount of spin (if you are using a U shaped shooter or a linear one). This causes instability of the frisbee and your equations wont help you there.

If you plan on using a fixed velocity, you can graph the values output from the program and use excel to find a best fit curve (logarithmic). This will simplify your code a lot and will make it more efficient than testing every single angle.

My team says fixed angle, though

The paper sets up the differential equations for the flight of a frisbee. The equations are nonlinear; there is no analytical solution (“formula”).

Since there is no analytical solution, the paper presents a numerical solution to the initial value problem.

You wouldn’t have the necessary computing resources to do this numerical solution in real time on your robot, let alone the considerably more difficult boundary value problem you are asking.

Even if you could, it would be pointless because you would have to validate the model by doing extensive testing to determine the values of all the coefficients. As long as you have to do that, you might as well just use the test data to determine what launch angles and wheel speeds give you the desired flight paths and then just store that info in a lookup table that your code would use to choose the launch parameters.

On what basis do you claim these calculations can’t be handled in real-time?