Excel projectile trajectory

Click For Summary

Discussion Overview

The discussion revolves around calculating the launch angle of a projectile in Excel based on a desired maximum height. Participants explore methods for optimizing the angle calculation while addressing issues related to drag force in projectile motion.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant describes their project involving a projectile trajectory in Excel, seeking help to determine a new launch angle based on a specified maximum height.
  • Another participant critiques the initial drag force calculations, stating that drag is non-linear and should be computed using total XY-speed rather than separate X and Y components.
  • There is a suggestion to use Excel's Solver to minimize the squared difference between the maximum Y position and the target maximum height, rather than using a simple difference.
  • A participant questions the recommendation to minimize the squared difference, suggesting that it could lead to unintended results if not properly constrained.
  • Another participant agrees with the need for a more stable approach, mentioning that using the absolute difference could also be a viable option.
  • There is a discussion about the use of Goal Seek as a method for solving the problem, with some participants asserting that it would be adequate for the scenario described.

Areas of Agreement / Disagreement

Participants express differing views on the best method for calculating the launch angle and handling drag force, indicating that multiple competing approaches exist without a clear consensus on the optimal solution.

Contextual Notes

Participants highlight potential issues with the drag force calculations and optimization methods, but do not resolve these concerns, leaving the discussion open-ended regarding the best practices in this context.

swemek
Messages
1
Reaction score
1
Hello!

I'm doing some research for a small project that I hope you can help me with. I'm not a math genius, I just have an idea.

I have an Excel document of a projectile trajectory with an angle of 8 degrees. (Can be any angle.) Blue projectile trajectory.

What I want to do is enter the maximum height (green dashed line) and get a new angle. Red projectile trajectory. Calculated on a different tab.
I only tried my way up to the angle of 6.68 degrees.

Formulas used in Excel:
X-pos =B3+D3*t
Y-pos =C3+E3*t
X-Velocity =V0*COS(LA) =D3+H3*t
Y-Velocity =V0*SIN(LA) =E3+I3*t
X-Drag =-1/2*Dc*A*p*D3^2
Y-Drag =-1/2*Dc*A*p*E3^2
X-Accel =F3/m
Y-Accel =(G3+m*g)/m
Picture.png

Is this doable?

Hope you can help me.:smile:
Thanks in advance /M
 

Attachments

  • 1716906755571.png
    1716906755571.png
    3.7 KB · Views: 83
  • 1716906889746.png
    1716906889746.png
    1.1 KB · Views: 79
  • Like
Likes   Reactions: berkeman
Physics news on Phys.org
swemek said:
X-Drag =-1/2*Dc*A*p*D3^2
Y-Drag =-1/2*Dc*A*p*E3^2
This won't work. Since drag is non-linear, you cannot split its calculation into X & Y components like that. You have to compute the total XY-speed, use that for total XY-drag, and split that in X & Y drag components.

As for your main question. You probably need something like this:
https://www.tutorialspoint.com/exce...a_analysis_optimization_with_excel_solver.htm
Decision Variable Cell : launch angle
Objective Cell (to be minimized) : (MAX(Y_POS) - TARGET_MAX_Y_POS)^2
 
Last edited:
  • Like
Likes   Reactions: Vanadium 50, pbuk and berkeman
A.T. said:
Objective Cell (to be minimized) : (MAX(Y_POS) - TARGET_MAX_Y_POS)^2
Is your recommendation of this rather than simply MAX(Y_POS) - TARGET_MAX_Y_POS based on experience?
 
pbuk said:
Is your recommendation of this rather than simply MAX(Y_POS) - TARGET_MAX_Y_POS based on experience?
If you minimise the difference I would expect the optimizer to aim for max(y_pos) tending to negative infinity, since that minimises the value. If you minimise the squared difference the optimiser should aim for equality.
 
  • Like
Likes   Reactions: A.T.
pbuk said:
Is your recommendation of this rather than simply MAX(Y_POS) - TARGET_MAX_Y_POS based on experience?
This won't work for the reason stated by @Ibix. One could try ABS(MAX(Y_POS) - TARGET_MAX_Y_POS), but squaring the difference is usually more numerically stable, because of the smooth 1st derivative.
 
  • Like
Likes   Reactions: Ibix
A.T. said:
This won't work for the reason stated by @Ibix. One could try ABS(MAX(Y_POS) - TARGET_MAX_Y_POS), but squaring the difference is usually more numerically stable, because of the smooth 1st derivative.
Ah sorry, I should have been clearer.

In solving similar problems I have always solved for a difference of zero by using Data -> What-If Analysis -> Goal Seek.

I do this because I have always done it this way and I wondered if you had experience that showed any option within the Analysis Tool Pack was faster/more stable/more accurate precise.

In any case for the problem in the OP, using Goal Seek would be perfectly adequate.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
22K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
6K
Replies
5
Views
5K
Replies
21
Views
3K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K