How to find trajectory path if the distance traveled, starting elevation, ending elevation and time in the air are known

跟風遠走 提交于 2019-12-17 17:14:39

问题


I'm trying to find the trajectory an object would take (assuming air drag is negligible and trajectory angle is always between 0 and 90), including peak height. Here's what I know:

  • takeoff point latitude, longitude, elevation
  • landing poing latitude, longitude, elevation
  • distance traveled
  • amount of time in the air

For me the problem could be reduced to 2d space, so if an object travels a horizontal distance of 8 meters starting at an elevation of 0 and ending at a relative elevation of -5 meters, and travels for 2 seconds. What was the peak height, and at what point in time did it reach that peak hight.

Also, trying to write this equation in to php, C, or objective C. Thanks


回答1:


I assume cannon ball like trajectory

  • object has some start velocity
  • not slowing by air (specified by question)
  • only gravity force apply

So

  1. solve the equations to find missing data

    g=9.81; // [m/s^2]
    t=!; // [s] time in air
    p0(x0,y0)=!; // [m] start point
    p1(x1,y1)=!; // [m] end point
    v0(vx0,vy0)=?; // [m/s] start velocity vector
    
    // Y axis free fall with initial velocity
    y1=y0+vy0*t-0.5*g*t*t
    vy0=(y1-y0+0.5*g*t*t)/t
    vy0=(y1-y0)/t+0.5*g*t
    
    // X axis constant speed
    vx0=(x1-x0)/t
    
  2. trajectory path point

    x=x0+vx0*t;
    y=y0+vy0*t-0.5*g*t*t;
    

    where t = <0.0,time_in_air> so for plotting do some for loop through t

  3. peak point:

    vy(t)=vy0-g*t;
    // for peak the y velocity is zero so
    0.0=vy0-g*t;
    t=vy0/g;
    

    where t is the time when object reach peak point. If you need coordinates then compute them like in bullet #2



来源:https://stackoverflow.com/questions/26087765/how-to-find-trajectory-path-if-the-distance-traveled-starting-elevation-ending

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!