Jump to content

JackONeill

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by JackONeill


  1. I'm trying to make a script to predict the exact point of impact of firing a mortar or an artillery piece, only basing on the angle of shot and the initial velocity of the projectile. For now, using the formula of uniformly accelerated rectilinear motion (physics kinematics http://en.wikipedia.org/wiki/Projectile_motion) and modifying the values of gravity and initial velocity I got an estimate for error just 5 meters at a distance of 3000 meters or so. From this distance, the error increases considerably.

    What interest me are the details of the kinematics of ARMA2 in missiles. That formula should I use and what values should I look? Thanks in advance for your help.

    I facilitated the code I have done:

    _g = 5.1151422769703689398889740844781; //gravity
    _v0 = 127.90001885259979842603315177711; //initial velocity
    _y0 = 0; //initial height
    _fase =_mor animationPhase "Maingun";
    _grados = ((55)+(deg _fase)); //angle
    _v0y = _v0 * sin _grados; //vertical initial velocity
    _v0x = _v0 * cos _grados; //horitzontal initial velocity
    
    _t1 = (-_v0y + sqrt (_v0y^2 + 4 * 0.5 * _g * _y0))/(-2 * 0.5 * _g);
    
    _t2 = (-_v0y - sqrt (_v0y^2 + 4 * 0.5 * _g * _y0))/(-2 * 0.5 * _g);
    
    
    _t = _t1 max _t2; //flight time
    
    _x = _v0x * _t; //impact distance	
    
    

    PS: Sorry about my English because it is a translation of "Google Translator".

×