Results 1 to 10 of 10

Thread: Artillery flightpath... Accurate!

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Smile Artillery flightpath... Accurate!

    Does anyone know how to calculate the trajectory of something like an artillery shell, preferably over long distances?

    Given: shell mass, gun elevation muzzle velocity, altitude etc...

    Or know anyone who does?

    Formulas would be ok because I can translate them into C++ myself. Something accurate, with aerodynamic drag, wind and humidity adjustments would be my ultimate goal but I am happy to build up to that later.

    Something like the calculations that the early computers like EDVAC and COLOSSUS had to perform would be super cool.

    A prize to the most helpful idea
    I don't live here any more.

  2. #2
    New Member
    Join Date
    Oct 2003
    Posts
    11
    type "projectile trajectory" in google
    look at the first result ...some k12 link..

    not that hard is it ????

  3. #3
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    If you neglect air resistance, it should follow 2-dimensional projectile motion.
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  4. #4
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Uh... why are you double posting?

  5. #5
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    What you want is called a ballistic trajectory - what happens to a projectile after it leaves the muzzle.

    It's, um, interesting.

    There are a series of formulas. Here is an overview:

    http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html

    Then when you get cross-eyed with that, then do a google on
    ballistic coefficient which is also equally interesting.

  6. #6
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    Uh... why are you double posting?
    What was that in reference to?
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  7. #7
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Originally posted by Darkwraith
    What was that in reference to?
    Uh...

    http://www.vbforums.com/showthread.p...hreadid=264804

  8. #8
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    Well, he could ask for the code....
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  9. #9
    Fanatic Member McCain's Avatar
    Join Date
    Jan 2002
    Location
    Sweden/Denmark
    Posts
    802
    I had a very simular question a while back...
    http://www.vbforums.com/showthread.p...hreadid=263262

    There you have code to draw the path of the projectile with no windresitance
    Never argue with fools, they will only drag you down to their level, and beat you with experience.

    Q: How do you tell an experienced hacker from a novice?
    A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer

  10. #10
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    In simulations, you don't need the complicated formulas. They mostly are for calculating the target given some parameters.

    In simulations, you calculate it step by step. Each step takes the forces that act on the projectile, calculates a new speed for the projectile and moves it according to the elapsed time.

    So what you need is:
    speed vector SV (initially calculated from gun elevation and muzzle velocity, updated during flight)
    air movement vector AMV (= wind speed and direction)
    relative air movement vector RAMV (the airflow past the projectile, = SV - AMV)
    medium interaction factor MIF (how much the relative air movement vector affects the projectile, calculated from medium density, projectile mass and shape, for very accurate calculations you should take into account that one shape might have different medium resistance values based on the relative air movement vector)
    lift L (only for extermly accurate calculations, or for large medium densities like underwater shots, calculated from projectile mass, projectile volume and medium density)
    gravity acceleration G

    Based on these values you can then calculate a new speed vector for every step.
    Basic physics. Every step the projectile is accelerated downwards by G, upwards by L. It is accelerated by -(RAMV² * MIF).
    Finally, update the position vector by the newly calculated SV * Delta, with Delta being the elapsed time since the last calculation.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width