CTI player IF 32 Posted May 4, 2020 (edited) Introduction Artillery support using rocket as well. The author thus explored the motion equation of rocket in OFP. The simulation "shotRocket" and "shotMissile" sharing same law, as "shotBullet" and "shotShell" do. The guided "shotMissile" has its own ability tracking target, with the help of maneuvrability, but this is out of the author's personal interest and current ability range, and remain to readers. Unless otherwise specified, the "rocket" in the following always includes "shotMissile" as well, but guiding won't be discussed. Totally speaking, parameters initTime, thrustTime, thrust & sideAirFriction are introduced here. Besides maneuvrability, the simulationStep & maxSpeed aren't researched either. To be honest, the author didn't find out how they affect rocket, and they maybe are for "shotMissile", too, because only the AT3, the father class of all guided missile in original CONFIG, has a 0.01 simulationStep . As for maxSpeed , no matter it is 10,000 or only 10, the author didn't observed it limited the rocket's velocity. And those parameters for bullet/shell, i.e., airFriction & coefGravity, and the model file including its shape or mass, will do nothing to rocket. The method the author analysis the air friction is measuring the equilibrium speed in different parameters. At equilibrium the acceleration of air friction is equal to thrust or gravity. Thrust has been verified by @sarogahtyp in https://forums.bohemia.net/forums/topic/189449-solved-simulate-rocket-flight-airfriction-correction-thrust-in-cfgammo-is-equal-to-acceleration/?tab=comments#comment-3001914 that is acceleration as well and in m/s². According to known thrust or gravity as acceleration and measured equilibrium velocity, the author is able to dope out the formula. More narrowly, the author discovered that the ratio acceleration/sideAirFriction gives an unique equilibrium velocity. From fundamental physical knowledge, the air friction should be the function of velocity, and since the ratio acceleration/sideAirFriction decides the equilibrium velocity, the sideAirFriction has been decoupled from the formula: it must be simply a factor in the whole formula, meaning the formula should be here c means sideAirFriction. Then basing on measured ratio a/c and velocity v, and luckily the mapping f is polynomial, the author explicitly gives the expression of f. Again, by the formula, the ODEs of motion can be given. Chapter 1 Motion Equations Previous exploration about ballistic of bullet/shell is recommended to have a look first, if you haven't read it yet. In this article some concepts mentioned there won't be explained in detail. The very first thing to be declare is that there are 2 mode for rocket's flying, depending on whether the rocket ammo (object of class CfgAmmo) has a nonzero thrustTime (yeah, the thrustTime but not the thrust, although the common sense prefer the latter). In spite of rarely being used, the case thrustTime=0 will be introduce first, for it's simpler, and can help readers building basic comprehension. thrustTime = 0 In this case, the mapping f is Here, the v means the the length of velocity vector . The trajectory of rocket in this case is similar to bullet/shell. The main part of air friction is the term 0.001× v², which is just double of shelll's formula (remember? The default airFriction for shell is -0.0005) unless the velocity too high or too low. Analogously, applying RK4 method we can have a numerical solution. (Regrefully, though, the velocity in this mode will be affected by the difference between rocket's velocity and 3D-direction. Numerical solution ignoring this will have error of tens meters. This remain to be solved.) Here list some facts of rocket. They're important and worth knowing. Gravity. As mentioned above, the ratio acceleration/sideAirFriction decides the equilibrium velocity. On the contrary, the equilibrium velocity locally decides an unique acceleration/sideAirFriction. In gravitational direction without thrust, the only acceleration are provided by gravity and air friction. Having measured many different sideAirFriction including 0 (free falling movement), we can gain a more precise gravitational acceleration than 9.8. The fitting value is 9.8066~9.8068. 3D-direction. The direction vector of bullet/shell and rocket with nonzero thrustTime is constant. But for 0 thrustTime rocket, the direction is variable. It'll incline to its current velocity vector, but mostly don't equal to the velocity. The direction here, i.e., for bullet/shell or 0 thrustTime rocket, won't affect the trajectory (for those whose direction too much different from velocity, trajectory will be slightly affect until direction close enough to the velocity vector). But direction is important to nonzero thrustTime rocket and guided missile. The thrust is always parallel to the direction vector, and for guided missile, the change of direction probably is a good (or even unique) indicator of the parameter maneuvrability. The 3D-direction of ammo is equal to the direction of weapon when being shot. In 2.01 ArmA:R the command vectorDir will return the 3D-direction, but no way in 1.99/1.96 to know z-direction. Thus 2.01 ArmA:R is recommended when exploring guided missile. Time to Live. A surprising conclusion is the life time of 0 thrustTime rocket is infinite, until it collide something. This is interesting and can be applyed for long range shoot, better than shell (whose life time is longest but still limited no more than 20 seconds, unless its timeToLive parameter is modified). Initial Velocity. Although the initSpeed is magazines' parameter, it doesn't decide the initial velocity of shot rocket. All rocket shot by weapon have a constant speed 20m/s (or say 72km/h, which is the return value of Speed command in km/h). The elevation of initial velocity is about +2.5° than weapon's (and thus ammo's). This is a special correction for rocket. However it's hard to obtain exactly value, because no way to remove the gravity for rocket like exploring bullet/shell, and thus can't gain unaffected velocity vector. Luckily this won't affect too much since the initial velocity is poor 20m/s and can be ignored when either thrust or thrustTime not too small. As for 0 thrustTime case here, the 20m/s initial velocity without any thrust certainly can't be applied in OFP, and editors must assign another velocity by setVelocity command and thus needn't to concern this unknown correction. The Gravity and 3D-direction here is useful for bullet/shell as well. The author used to thought global tracer effect must rely on 2.01 command setVectorDirAndUp, but this is unnecessary for shell's velocity is independent with the direction. As for Gravity, 9.8 or 9.8066 won't affect the trajectory too much. Even in long range shooting, the calculated distance of these 2 value have no more than 2 meters' difference. The only rocket in original OFP with 0 thrustTime is LGB (and bomb ammo of BISCamel plane's weapon). Common "rocket" don't apply this design. However its infinite life time and shell-similar air friction is good for artillery supporting. Since its initial velocity (and 3D-direction) must be assigned (unless you wish to use the useless 20m/s) and it hasn't thrust period, editor can completely know initial states of the 0 thrustTime rocket, and calculate precise enough trajectory and range via numerical method. thrustTime > 0 This is general case in OFP. It has its own law. Consider a plane spanned by the 3D-direction of the rocket and the direction of gravity. Such a plane is unique, except for when rocket is parallel to gravity, which can be ignored as trivial situation. We claim that the motion is separated into horizontal part and vertical part, and they are independent. As displayed in figure, we call the 3D-direction of rocket "H" and the vertical direction "V". The θ means the elevation of rocket. And there're some other rules: Thrust is parallel to H direction (don't forget direction is constant when thrustTime>0). Gravity should be separated into 2 directions for they're independent. The (air friction in H direction) is still but decided not by the length of any longer but only . The (air friction in V direction) is which is decided by only. And coefficient in this formula is much bigger than ()'s, thus velocity in V direction won't be too high due to large friction. It seems more complex in this case, because we have to devide the motion into 2 directions. But actually the problem is simpler, especially because of the indenpendence between 2 direction. Using rotation matrix we can easily convert between x-y and H-V coordinate. And the indenpendent air friction in 2 directions even allow us solve the ODE because the indefinite integral can be expressed by elementary functions (the integrand is a rational function). However the solution is implicit and what we need explicitly is the (the inverse function) here, which is a non-elementary function (equation is transcendental for ), and we still have to rely on numerical method. (By the way, it is because of f is polynomial that the author can simply obtain its explicit expression with exact coefficients. For more complex f it'll be hard to know what it's expression is, but actually we don't have to. As mentioned in bullet/shell case, the system has a unique solution when A is independent with time. Since we mostly have to use numerical method to calculate the solution, we can get segmental fitted numerical function of f, and apply it in numerical method like RK4. Although the formulas here for rocket in OFP have been built precisely, this view is still useful when exploring something new.) Complete contents is included in a PDF and can be read/downloaded here. Edited May 15, 2020 by CTI player IF Insert link directly and edit some contents. 1 1 Share this post Link to post Share on other sites
CTI player IF 32 Posted May 17, 2020 It's necessary to declear that we can't always calculate 0-thrustTime rocket's trajectory ignoring the change of its 3D-direction. One can verify this by himself: adjust the maneuvrability of AA (stringer of soldier) up to 50 and see how it flying to the target. The AA using "LAW" model which don't fit too high maneuvrability, but some other models do. That is, the model will affect the directioin changing. Before the detail about direction changing being analysed, directly applying 0-thrustTime rocket and treat it similar to shell isn't recommended. Share this post Link to post Share on other sites