VB app to calculate velocity of a golf club head

In summary, you need to find the velocity of the ball just after the club hits it, then figure out how the ball will travel. For the first part the equations you need are conservation of momentum and conservation of energy. You also need to find the angle at which the club face hits the ball.
  • #1
jeffsweeps
3
0
Hi guys, i have read and read and read all this stuff about x=vt(cosA), y = vt(sinA)-1/2gt^2

now i am not a pyhsics guy and never claimed to be, i am a programmer. This is what i am trying to accomplish. I am trying to write a small VB app to calculate velocity of a golf club head. I and trying to evaulate it as follows:

CLub Head Angle is Diiferent for each club. but we are going to just pick 1, so let's say a driver with a 10.5 face

I have the following the only variable i wish to calculate is velocity.

I want to be able to type in a yardage (x) and an elevation (y) a club angle(10.5) and get the velocity.
am i on the right track here?
i got the formula from the hyperphsyics page.
My plan is since can get the max velocity of the driver by assuming the max distance for x at y=0 is 250 ... i could then use that velocity and set it equal to 100% (for 255 yds) and then calculate the velocity for 204 yds whish is (80% of club distance) and see what that velocity is.

I have been tasked with writing a program the will pick the correct "virtual club" given distance, elevation, and angle. Can this be done? I don't even know. I followed a tutorial along and calculated velocity for a target 300m away 20 meters high with a 60 degree angle, but i need a formula so i can plug it into my program and give it the x, y and angle and it give me a result, if that result is less than say 80% of the club velocity, then my program will automatically "club up" and recalculate using the next club angle ... ie if the 64 degree wedge shot can't get you there, then change to the 54 degree club and so on until the target distance is reachable. Since this is a "virtual golf simulator" i am assuming that 100% power on each club would be the same velocity.

Am i making any sense, sorry but i know some math, just not physics. Any help would be appreciated. thx
 
Physics news on Phys.org
  • #2
This won't be a perfect model, but it will be close. Two things you are missing is the mass of the club and the ball. Hitting a ball made of lead will be different than hitting a regular golf ball. Hitting it with a club made of plastic will be different than using a regular club. You can measure the ball mass, but will probably have to mess around with club mass a little to get things to work reasonably.

You need to do two things. First find the velocity of the ball at just after the club hits it, then figure out how the ball will travel. For the first part the equations you need are conservation of momentum and conservation of energy. The things you know are:

mb = mass of ball
mc = mass of club
vx = horizontal velocity of club just before it hits the ball
vy = vertical velocity of club just before it hits the ball (probably zero)

a = the angle from vertical at which the club face hits the ball

You need to find

vcx = horizontal velocity of club just after it hits the ball
vcy = vertical velocity of club just after it hits the ball
vbx=vb*cos(a) = horizontal velocity of ball just after hit
vby=vb*sin(a) = vertical velocity of ball just after hit

So you have three unknowns, vcx, vcy, vb

Conservation of momentum says

mc*vx = mc*vcx + mb*vbx
mc*vy = mc*vcy + mb*vby

Conservation of Energy says

mc*(vx^2+vy^2)=mc*(vcx^2+vcy^2)+mb*(vbx^2+vby^2)

Thats three equations. Defining m=mb+mc and solving for vb gives:

vb =(2*mc*(vx*cos(a)+vy*sin(a))/m = 2*mc*vx*cos(a) if vy=0

So now you have to figure out how the ball travels given that it has velocity vbx and vby. Let x(t) be its x position at time t and y(t) be its y position at time t. Let's say x(0)=0 and y(0)=0. then

x(t) = vbx*t
y(t) = vby*t-g*t^2/2

where g is the acceleration due to gravity (9.8 meters per second squared or something). The ball hits the ground when y(t)=L where L is the elevation. It may hit L twice (once on the way up, again on the way down) so you have to be sure to pick the right one.

Solving the first equation for time, the equation for y(x) can be solved as

y=vby*x/vbx-g*x^2/vbx^2

Solving for x gives two values

x=(vbx*vby + vbx*sqrt(vby^2-4*g*y))/(2*g)
x=(vbx*vby - vbx*sqrt(vby^2-4*g*y))/(2*g)

I think the first one is the one you want. When you substitute L (the elevation) for y you will get the range x.
 
  • #3
Thank you so much that really helped a lot and put me on the right path, i plugged them into excel before i started programming and i have a couple of questions. First, This is what i have so far. (if you got excel i attached it as a file also)
mb = 0.25 (Just plugged a number to test formulas for the time being)
mc = 1.5 (Just plugged a number to test formulas for the time being)

vx = 100 (Just plugged a number to test formulas for the time being)
vy = 0
a = 10
vcx = 100
vcy = 0

First Question HERE
vb =(2*mc*(vx*cos(a)+vy*sin(a))/m and? vb=2*mc*vx*cos(a)
or is that = {(2*mc*(vx*cos(a)+vy*sin(a))/m}/{2*mc*vx*cos(a)}
i assumed the first , i also swappped mb + mc for m

vb = (2*mc*(vx*cos(a)+vy*sin(a))/m = 168.8241862
vbx = 166.2593675
vby = 29.31601229
y = 10 (Given Elevation at target location)
x = (vbx*vby + vbx*SQRT(vby^2-4*g*y))/(2*g) = 432.0716961


For the Mass of club and ball, since they are "virtual" and i do not have them to get there actual mass. Could i take an flight path of a given club at 100% of it's velocity (Knowing distance, elevation, max height of arc,Club Angle) , i can view a balls flight path now after taking a shot. So i thought i could hit 100% power and get several different fligt paths to be able to calculate mb & mb ... Since i have and can graph each club at 100%, 98%, and so on and so on. Ccould i use the 100% swing power graph to get the mc & mb, Also the mb will remain constant for each shot. the onlt two things i have control over over club selection(club angle) and swing speed(club velocity)

geez u guys are smart, and i thought us cumputer nerds where real smart, i guess it is all knowing where to look , cause i can follow your calculations ... i just didin't know where in the world to find the formulas i needed , , geez i didn't een know which formulas i did need., i was originally trying to do this by club x max distance = 250 yds @ 100% power ... and scaling back from there but, THIS will be way more accurate as me model was flawed when elevation changed severely or when less than 85% swing power was used.
 

Attachments

  • Book1.xls
    19 KB · Views: 220
  • #4
jeffsweeps said:
First, This is what i have so far. (if you got excel i attached it as a file also)
mb = 0.25 (Just plugged a number to test formulas for the time being)
mc = 1.5 (Just plugged a number to test formulas for the time being)

vx = 100 (Just plugged a number to test formulas for the time being)
vy = 0
a = 10
vcx = 100
vcy = 0
You shouldn't set the velocity of the club after it hits (vcx and vcy). It can be calculated from vx, vy, mc, mb and a, but it is never used.
jeffsweeps said:
First Question HERE
vb =(2*mc*(vx*cos(a)+vy*sin(a))/m and? vb=2*mc*vx*cos(a)
or is that = {(2*mc*(vx*cos(a)+vy*sin(a))/m}/{2*mc*vx*cos(a)}
i assumed the first , i also swappped mb + mc for m
That vb line should have read:

vb = 2*mc*(vx*cos(a)+vy*sin(a))/m which equals 2*mc*vx*cos(a) if vy=0
jeffsweeps said:
vb = (2*mc*(vx*cos(a)+vy*sin(a))/m = 168.8241862
vbx = 166.2593675
vby = 29.31601229
y = 10 (Given Elevation at target location)
x = (vbx*vby + vbx*SQRT(vby^2-4*g*y))/(2*g) = 432.0716961
Just keep in mind there are 2 x's. I think the plus will always work, but if there is trouble, look at those two values of x.
jeffsweeps said:
For the Mass of club and ball, since they are "virtual" and i do not have them to get there actual mass. Could i take an flight path of a given club at 100% of it's velocity (Knowing distance, elevation, max height of arc,Club Angle) , i can view a balls flight path now after taking a shot. So i thought i could hit 100% power and get several different fligt paths to be able to calculate mb & mb ... Since i have and can graph each club at 100%, 98%, and so on and so on. Ccould i use the 100% swing power graph to get the mc & mb, Also the mb will remain constant for each shot. the onlt two things i have control over over club selection(club angle) and swing speed(club velocity)
I think that would work. Notice that mc is constant too, and for calculating vb you only need the one number mc/(mc+mb), not both mc and mb, so that might simplify things a bit.
 
  • #5
OK i guess i am abandoning my efforts to solve for this, i do not think i have the capability to do so.

Although the formula worked out great to get that result, when i tried to translate club velocity into a % (as in 100% Power or 75% Power) of swing, my calcualtions were obviously wrong.

Take into account that i would also have to account for Wind Push/Pull and i think this may well be over my head.

Any ideas about how to change my thinking would help. I can "hit a ball" with 100% power with no wind and that is essentially the club velocity , when i start scaling back to a 75 or 80 % power shot , it just doesn't work. I do know that it is non linear, i just do not know how to translate % into club velocity, and since there are approximately 300 different clubs in this simulation .. that rules out getting exact velocities for each % of Power.

I do appreciate the responses, they have awakened me a bot to the world of math i left behind when i started programming.
 
  • #6
jeffsweeps said:
Hi guys, i have read and read and read all this stuff about x=vt(cosA), y = vt(sinA)-1/2gt^2

now i am not a pyhsics guy and never claimed to be, i am a programmer. This is what i am trying to accomplish. I am trying to write a small VB app to calculate velocity of a golf club head. I and trying to evaulate it as follows:

CLub Head Angle is Diiferent for each club. but we are going to just pick 1, so let's say a driver with a 10.5 face

I have the following the only variable i wish to calculate is velocity.

I want to be able to type in a yardage (x) and an elevation (y) a club angle(10.5) and get the velocity.
am i on the right track here?
i got the formula from the hyperphsyics page.
My plan is since can get the max velocity of the driver by assuming the max distance for x at y=0 is 250 ... i could then use that velocity and set it equal to 100% (for 255 yds) and then calculate the velocity for 204 yds whish is (80% of club distance) and see what that velocity is.

I have been tasked with writing a program the will pick the correct "virtual club" given distance, elevation, and angle. Can this be done? I don't even know. I followed a tutorial along and calculated velocity for a target 300m away 20 meters high with a 60 degree angle, but i need a formula so i can plug it into my program and give it the x, y and angle and it give me a result, if that result is less than say 80% of the club velocity, then my program will automatically "club up" and recalculate using the next club angle ... ie if the 64 degree wedge shot can't get you there, then change to the 54 degree club and so on until the target distance is reachable. Since this is a "virtual golf simulator" i am assuming that 100% power on each club would be the same velocity.

Am i making any sense, sorry but i know some math, just not physics. Any help would be appreciated. thx

This might be considered cheating but you should be able to aim a radar gun at it and then work your math backwards. What you need is a given to anchor your math with and basically you do not have any given to anchor your math with. Once you have a given (velocity) from there it is just a matter of testing different environmental conditions until you have a relatively stable mathematical formula that your average golfer can use.
 

1. How does the VB app calculate the velocity of a golf club head?

The VB app uses the formula v = d/t, where v is the velocity, d is the distance the club head travels, and t is the time it takes for the club head to travel that distance. The app measures the distance using sensors and calculates the time using the computer's internal clock.

2. Can the VB app measure the velocity of any golf club?

Yes, the VB app can measure the velocity of any golf club as long as it is swung in front of the sensors in the designated area. The app does not differentiate between different types or brands of golf clubs.

3. How accurate is the velocity measurement of the VB app?

The accuracy of the velocity measurement depends on various factors such as the calibration of the sensors and the speed and consistency of the swing. However, the VB app provides a reliable estimation of the velocity and can be used for comparative analysis and improvement of the golf swing.

4. Can the VB app be used for professional golfers?

While the VB app can provide accurate velocity measurements, it is not certified for use in professional tournaments. It can be a useful tool for training and practice, but it is not considered an official measuring device for professional golf events.

5. Is there a way to track and save the velocity measurements over time using the VB app?

Yes, the VB app has a feature that allows users to track and save their velocity measurements over time. This can help in tracking progress and improvement in the golf swing. The app also allows for exporting the data for further analysis and comparison.

Similar threads

Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
9
Views
5K
  • Classical Physics
Replies
6
Views
1K
Replies
8
Views
12K
  • Introductory Physics Homework Help
Replies
6
Views
6K
  • Mechanics
Replies
28
Views
3K
  • Introductory Physics Homework Help
Replies
14
Views
5K
Replies
4
Views
8K
  • Introductory Physics Homework Help
Replies
6
Views
938
Back
Top