![]() |
Trajectory Calculator (W/ Drag)
Hello, my name is Jesse and I am a programmer from team 3539. In a few hours of downtime I had between our current projects, I applied a few physics formulas to a Java application and made a calculator that can accurately determine the path of an object when fired at an angle and a velocity, among other things.
http://img841.imageshack.us/img841/9954/77059684.png (Screenshot) http://www.box.com/s/svmj0ln7vvzdh27pqckv (Download) The ideal "Calculations per Second" setting is 5000, make sure you change it from the default of 5. Enjoy. |
Re: Trajectory Calculator (W/ Drag)
Quote:
|
Re: Trajectory Calculator (W/ Drag)
I can't seem to run this on my computer. Cannot find main class...?
Either way those curves don't look like there is any drag. Did you physically measure the air drag coefficient? |
Re: Trajectory Calculator (W/ Drag)
Quote:
I also wrote something about 2 weeks back. This one is in GNU Octave/Matlab https://github.com/FRCTeam4069/Simul...sketball_sim.m |
Re: Trajectory Calculator (W/ Drag)
Our team started working on the same idea(manually integrate the drag + projectile formulas to calculate the projectile path)(http://ideone.com/aoChY, but we haven't quite gotten it to the level of completeness you did.
This is going to require a lot of testing to get the constants right though(and to see if it is accurate at all). (Also, no offense, but I would heavily suggest for you to refactor your code. All of those functions with repeated code and the whole "god" class is going to make things hard to modify and debug later on) |
Re: Trajectory Calculator (W/ Drag)
I really want to play with a couple of these programs but yours is not working on my computer
"could not find main class: Main program will exit" |
Re: Trajectory Calculator (W/ Drag)
Quote:
|
Re: Trajectory Calculator (W/ Drag)
Quote:
|
Quote:
|
Re: Trajectory Calculator (W/ Drag)
Due to the relative light weight to the size of the ball this year, trajectory calculation this year cannot ignore air resistance and it also cannot ignore back spin for those who are using a single wheel. Back spin make the ball travel higher and further.
If you ignore air resistance or back spin and try to correlate to real test data by scaling the exit velocity, it would be meaningless. Adding air rsistance to your calculation would be an improvement because you have the shape constant to tune but you are still ignoring an important factor which is the back spin. The back spin is significant especially when you are shooting from far away. I will be posting my trajectory calculator (in Excel) on our website soon. You can look at the calculator for 2008 and 2010. We have not done tuning yet. Our robot will not be done for another 2 weeks. |
Re: Trajectory Calculator (W/ Drag)
1 Attachment(s)
Here is a LabView trajectory calculator including the effects of drag and spin. You can adjust how much drag and how much spin (and whether it is back spin or top spin). You can also change which hoop you are aiming for and the height of your shooter exit point.
I've not tested it against any measurements, but the physics of spinning balls has been extensively studied, so it should at least be close. The biggest approximation is for the lift coefficient, where I have used a very simple model, and assumed that the spin does not slow during the flight. If you want to see what a complicated model for lift looks like, read the AJP paper referenced on the block diagram, where he develops an empirical model for spinning tennis balls... |
Re: Trajectory Calculator (W/ Drag)
Now, the real question is, how do we have this trajectory calculator solve for angle if the velocity is constant?
|
Re: Trajectory Calculator (W/ Drag)
Quote:
|
Re: Trajectory Calculator (W/ Drag)
1 Attachment(s)
Quote:
1 of course, ignoring drag and backspin is probably not a valid assumption for this case. see post#10. |
Re: Trajectory Calculator (W/ Drag)
Yes, I already have vision tracking getting a distance, using trigonometry to find the base of the triangle (distance of launcher parallel to the floor to the hoops) from the hypotenuse (distance of vision target from camera) and the opposite side (the known height of the hoop) and running it through an equation found on wikipedia to find angles to hit a target point (x,y). It has not been tested on the robot, but the math and plotted trajectories it outputs look sound.
![]() I am trying to incorporate drag into this, however, it seems incredibly complicated, based on the vi's mentioned earlier. Compensating for air resistance within a set range might practically be accomplished through adding an arbitrary number to the x and y in that equation based on trial and error. There are some good drag equations on this page, too, though. http://en.wikipedia.org/wiki/Trajectory_of_a_projectile Edit: Use regressions and plot out the real world values to find an equation? IE. A function of angle on the Y axis and how far it travels until contacting ground (possibly set at a particular height, such as the top hoop) on the X (or vice versa) |
| All times are GMT -5. The time now is 23:23. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi