![]() |
|
#1
|
|||
|
|||
Need Help Starting the following problem The problem states that I need to write a C program which will be able to determine the angle at which a gun will shoot at in order to intercept a flying object. I must then turn the output into a .csv file and plot the solution in an Excel graph. the problem also states that the projectile will start at (0, 0). It will have an initial velocity of Vo = 400 m.s-1 and a mass m = 75 g, while friction is neglected. It will intercept a flying object that will start at (5000, 2000), or 5 km in horizontal distance and 2000 meters of altitude. This object will be flying at 100 m.s-1 (360 km.h-1) horizontally towards the gun. Acoording to instructions, -I must use Euler’s method or Runge-Kutta with a step of h=0.01 in order to solve the differential equations of motion of the two objects. -i then must write a function "double distance (double angle);" which will return the difference of their y components when the two objects will exactly be on top of each other (i.e. they have the same x component) in function of the initial angle of the projectile. -Then, i must apply bisection method in order to find at what angle the distance function is equal to zero (i.e. interception of the flying object by the projectile). You will use bisection method between 0 and Pi/2, assuming that there is only one solution in this interval. -Finally the results need to be printed in a .csv file. Now here's my question... How do I get started? I am having a lot of trouble figuring out what to do, and i dont really understand Euler's method or Runge-Kutta. I do know a little about the bisection method. Can someone help me write the fist few lines of code and the code for either runge-kutta or Euler in order to get started? I would greatly appreciate it. Thanks in advance 8-) |
|||
|
#2
|
|||
|
|||
|
Quote:
First: write the differential equations of motionto be solved. Now, this assignment is from what kind of class? Math (numerical analysis) or what? If the assignment is to use Euler's method or Runge Kutta, you must be expected to know what these are (course prerequisites or course notes or textbook reading assignment or ???). OR ... it's just possible that you are expected to use the internet or some other resource to discover what these things are in the context of solving differential equations numerically. Having someone else do your research for you is one possibility. Looking for yourself is another. You go ahead and get started; if you have specific questions, tell us what you found, and what you don't understand. I'm guessing that someone here can help. Regards, Dave |
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Apache / PHP problem, maybe output length? | HaganeNoKokoro | Apache Web Server Forum | 3 | 07-Aug-2008 04:42 |
| CD burner will not burn, new problem | sdshaman | Computer Hardware Forum | 4 | 06-Feb-2008 23:17 |
| Problem in array | Kay Chan | C Programming Language | 2 | 05-Oct-2004 21:16 |
| Mpeg2 SVCD disc problem | mrnobody | Computer Software Forum - Windows | 0 | 13-Aug-2004 08:51 |
| Another FX 5600 problem (but with details that might shed light on this) | BobDaDuck | Computer Hardware Forum | 2 | 16-Apr-2004 07:53 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The