@yyyyao
2016-10-24T00:26:04.000000Z
字数 2820
阅读 359
In this casee, we need to generalize the program developed for the previous problem so that it can deal with situations in which the target is at a different altitude than the cannon. To be more precise, the target may be higher or lower than the cannon. Also, we are required to investigate how the minimum firing velocity needed to hit the target varies as the altitude of the target is varied. Consequently, we need to develope a precise shooting system of cannon and try to make it more realistic by adding different environmental factors.
key words: target at a different altitude than the cannon
minimum firing velocity precise shooting system environmental factors
In last case, we have already discussed and calculated the trajectories of cannon for different firing angles and determined the value of the angle that gives the maximum range. In other words, we have discussed the trajectory of cannon taking both air drag and reduced air density at high altitudes into account. So in this case, we can directly base on the result of last text to make further investigation.
Sinse we are not ready to compute a numerical solution, the Euler method is used to treat the problem. In exercise_05, we have already derived the differential equation of motion of the cannon with air drag into four equations which are written as below
we set
we set, , ,
And because the cannon need to fall at a fixed altitude, we should modified the fall point as
Also, we have to consider the time step. When the cannon is far away from the target, we can set the time step a little bigger to save time; as when the cannon is near the target, time step need to be sat small enough to ensure our results to be accurate.
the photo with these starting conditions is:
We assume that the shooting angel is constant,then we change until the cannon can hit the target. Please see it in the following vedio:
From another perspective, we assume that the shooting velocity is constant, then we change until the cannon can hit the target. Please see it in the following vedio:
There are code of the program.CODE
Thanks for Mr.Cai's PPT and other fellow students'code. As my programming ability is limited, these cade raelly help me a lot. Glad to receive any questions and suggestion!