projectile trajectories

This is a discussion on projectile trajectories within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I have a question... When something is being fired straight up, you can use these equations to figure out approximately ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    projectile trajectories

    I have a question...

    When something is being fired straight up, you can use these equations to figure out approximately where it will land, assuming you are on a 2d plane (not 3d) and the object can be carried by the wind:

    Y-Coord = -4.9 ( time ) ^ 2 + (speed of object)( time ) + 4

    time = time since projectile was fired. (in seconds)
    speed of object = speed when initially fired in meters per sec.

    X-Coord = (wind speed)(time)

    wind speed is in meters per second.

    However, lets say you are firing a bullet into the air, but not at a 90 deg. angle.

    How would you go about calculating the angle offset? Anybody have any idea?
    My Website

    "Circular logic is good because it is."

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    You use trig. I can explain more in a few hours, but someone will have solved it by then.... Until then you could always look up ballistics on google. Btw, you can calculate it for 3d, too - you just have to add in the z forces.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Oh yeah, and I'm thinkin' your y equation's wrong... where's the 4 come from?

  4. #4
    Registered User Soccer_Mom's Avatar
    Join Date
    Sep 2001
    Posts
    37
    These equations will work in any direction.

    Displacement = (1/2)(Acceleration)(Time^2) + (Velocity(orig.))(time) + Original Displacement

    Velocity = (Acceleration)(time) + (Velocity(orig.))

    and everyone's favorite:

    velocity^2 = (Velocity(orig.)^2) + 2(Acceleration (position 1-position2(displacement)))

    What I usually did was solve for the time in one direction, and then used that time, in the other direction, because something can't fall in two different times..ya dig??

    Anyway, I'm not sure about adding in the wind displacement maybe that would factor in as a original velocity??? But don't quote me on that one.

    Wow..physics is back....RUN FOR YOUR LIVES!!!!!!

    P.S. Also be careful with your directions if your y axis is positive UP then gravity would be applying an accel of -9.8 (m/s/s)
    Last edited by Soccer_Mom; 02-07-2002 at 12:49 PM.

  5. #5
    Registered User Soccer_Mom's Avatar
    Join Date
    Sep 2001
    Posts
    37
    In symbols:

    V = Vo + at
    V^2 = Vo^2 + 2ad - or - V^2 = Vo^2 + 2a(X-Xo) (or whatever direction you're talking about)
    X = (1/2)at^2 + Vot + Xo
    Check out my cool Avatar!!!

  6. #6
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    > Anyway, I'm not sure about adding in the wind displacement maybe that would factor in as a original velocity??? But don't quote me on that one.

    Yeah - wind's just another velocity vector... (Think about it - if you're in a boat and the current's coming at you at 5 mph, and your paddling at 5mph relative to calm water, you go nowhere... same deal)

    None of these factor in air resistance, David, which, AFAIK is just the resistance the object encounters due to wind... I have no idea waht the coeffecientof friction would be for that or how to find it...

  7. #7
    Registered User
    Join Date
    Aug 2001
    Posts
    106
    Ya, you can just use trig & the angle of firing to get the x and y component velocities.
    maximum horizontal distance is achieved with a firing angle of 45 degrees above horizontal, negating air resistance. Including air resistance (p ->pronounced row?) it is something like 30 degrees if I remember correctly.
    Don't talk to strangers, unless they offer candy.

  8. #8
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    >where's the 4 come from

    Sorry...forgote to change that...that should be the original height of the object.
    My Website

    "Circular logic is good because it is."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c++ programming help please
    By farah0718 in forum C++ Programming
    Replies: 29
    Last Post: 03-31-2008, 03:22 AM
  2. Runge Kutta for electron trajectories
    By QueenB in forum C Programming
    Replies: 1
    Last Post: 05-03-2007, 09:12 PM
  3. help with vectors again :(
    By McFury in forum C++ Programming
    Replies: 2
    Last Post: 11-05-2006, 11:01 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21