|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Trajectory Calculator (W/ Drag)
That part is really tricky. What I did in my calc (which does not do drag!) was to have it iterate the angle until the calculated path went through the target basket. I did this using Excel's goalseek function. Then you make a table of different ranges to shoot from, and graph it. Add a trendline to generate an approximate formula for that velocity (I used Order 3 polynomial to get a high R^2 value). That simplified formula is what you would integrate with your robot code if you wanted to automate the angle.
|
|
#2
|
||||
|
||||
|
Re: Trajectory Calculator (W/ Drag)
Quote:
1 of course, ignoring drag and backspin is probably not a valid assumption for this case. see post#10. Last edited by Ether : 15-02-2012 at 09:47. |
|
#3
|
||||
|
||||
|
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) Last edited by Bendito : 15-02-2012 at 12:35. Reason: clarification |
|
#4
|
|||
|
|||
|
Re: Trajectory Calculator (W/ Drag)
Yes, drag is complicated, but also important. If your launcher spins the ball, then lift is important too.
If you don't want this complication, then your best approach is empirical. Get a lot of data on distance vs. your launch parameters and make a table. Then, the robot can use interpolation to work the other way: given a distance, it can get values for the launch parameters. If you are varying two things (launch angle and ball velocity), then this could get complicated. You will have several tables, and will need an algorithm to determine which one to use. Even though I wrote the trajectory calculator, our team is going to use the interpolation approach! |
|
#5
|
||||
|
||||
|
Re: Trajectory Calculator (W/ Drag)
This is pretty much our plan.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|