MehMan 0 Posted September 10, 2008 I've been thinking, and I have some questions. I've been playing LOMAC lately and fell in love with the su-25 and it's rather simple yet effective bombing. I was wondering, is this possible with ArmA? For example, how manipulative are the new aircraft HUD scripting commands? Using the new scripting commands for vectors one could use some math to calculate the impact point using speed and height, etc. and then just move the piper accordingly? Share this post Link to post Share on other sites
nuxil 2 Posted September 10, 2008 hey i been thinking the same.. "free fall position bombing" to calulate the time the bomb needs before it hit the ground is something like with no atmosphere. time=sqrt (2 *_hight / 9.8) or 32 if you use feet. dist to impact point would be something like. dist = time * speed but this is all relative. forexample. the bombs behave totaly diffrent in which the vector it has.. if the bombs are poinitng strait down then the formular is about correct.. but if the bomb is horizontal. it behaves more like a plane. and it doesnt accelerate with 9.8 Meter pr second downwards. i dont know how the game calulates air resistans for objects. does it use 1.29 KG/m3 for air? also you need to fig out the mass of the object in this case if you need to calulate with air resistance the formular is much more advance. Share this post Link to post Share on other sites
MehMan 0 Posted September 10, 2008 Hmm, I guess some testing with objects spawning in the air is in order then! Second thing is the display. Now I wonder if one can move things in the HUD in anything else than the vertical? Can it be moved left right too? Also is Mando's ILS solution perhaps of any use? As in, does it perhaps move with free look? Does it zoom in and out? I'll have to check. that is in case the HUD solution will not work.. hmm research is to be done? Share this post Link to post Share on other sites
nuxil 2 Posted September 10, 2008 Quote[/b] ]hmm research is to be done? i think alot of it a ILS system is a good idea. but this means you have to predefine the location of impact. make a map dialog and add a marker for the ILS. will be doable. also on the minimap you should have a little marker which shows where the place of impact will be in case you have not defined the loaction Share this post Link to post Share on other sites
MehMan 0 Posted September 10, 2008 I was thinking of using the ILS that mando made for ArmA aircraft, mainly this: if the HUD idea fails. I'll make a test box right now, a 1x1 object with a mass of 10kg and then some calcualtions and see how it applies in ArmA. Share this post Link to post Share on other sites
colligpip 0 Posted September 10, 2008 as an old falcon 4 player I have wanted this for ages hope you guys can sort something out. After that how about we get in aircraft  proper laser guided bomb designation. Is there some way it can be done that is similar to the NWD tank optics that predict where the tank shells are going I dont know just guesisng. Share this post Link to post Share on other sites
nuxil 2 Posted September 11, 2008 Thats not a bad idea.. but how are you thinking of doing it? 1. predefine target on map ? 2. make some sort of marker on map to show impact place? on flight it will then follow the aircraft but is X meters ahead 3. both 1 & 2 ? How are the calulations going? maybe some usefull links for math & physics you can use. http://www.physics247.com/physics-homework-help/free-fall.php http://www.purplemath.com/modules/quadprob.htm http://www.lightandmatter.com/html_books/1np/ch03/ch03.html PS: colligpip . check out my latest Tv guided system.. it has laserdesignator on aircrafts to designate tanks Share this post Link to post Share on other sites
MehMan 0 Posted September 11, 2008 I plan to make it like so: The new HUD system has a lot of stuff in it that can be used to indicate from airspeed to height to pitch and bank, if programed correctly. I wasn't thinking of doing anything on the map itself but on the airplane HUD/cockpit display, like the Su-25 has the APS-17 targeting sight which works in a combination with the laser. The APS-17 targeting sight paints a target piper on the glass, a predicted impact point to a range. You can point the crosshairs at a target with the laser turned on and when you're inrang for the bombs to fall on the crosshairs it turns on a red light and bombs away. I'll film it for an easier explanation. EDIT: here's the video. that's how I want to make it work. No map markers, no nothing, just the cockpit and crosshairs. EDIT2: Well I just checked the HUD code on the biki. It does give some hope, but I'm not sure. The things animated are bones, now how will they react to lets say a position on the terrain? Or how will the calcualtions have to be made? Hmm...well first we'll need charts of gravity... Share this post Link to post Share on other sites
nuxil 2 Posted September 11, 2008 MehMan yeah that seams like a much better idea that using map etc etc. but im not worried about the hud. im more conserned about how you plan to predict the impact place. have you figured out any thing about the gravety ingame?? does arma use air resistans for objects falling? i been messing around abit with the bombs and find they have a odd behaviour. Share this post Link to post Share on other sites
MehMan 0 Posted September 11, 2008 Well I think there's no air resistance, if there is, it's defined in the config by airFriction. The gbus I believe do not have any airfriction. I'll do testing with a falling object like a soldier, because the mass of the US soldier is exactly 100 ArmA Kgs, so I'll do some calcualtions how long it should fall and how long does it takes in ArmA to fall. With aerodynamics out of the air it really doesn't matter what object do you use as long as it falls to the ground. The crates for example don't. soldiers do. the mass of the US soldier is 100 kgs. out of this and the time it'll take to fall from 100 ArmA meters we can figure out the arma gravity. After that it's just a deal of seeing how a moving object behaves and figuring the cuve. Perhaps the airfriction command could be used to make the curve for moving objects correct. There's much to figure out! Share this post Link to post Share on other sites
nuxil 2 Posted September 11, 2008 i belive ther is no air resitance for the Gbu's but in general. i think objects have air frictions.. not so sure how this works on ammo,, i know thers something called sidefriction. but this only seams to affect the turning of ammo. i did some freefaling test on diffrent objects. and it seems like they reach ther terminal velocity. exept for ammo's The Gbu12 4example. behaves like a glider when its droped horizontal. this has probealy something to do with its geometry. so the formular for calulation time it needs to hit the ground depends on the vector the ammo got even if the init velocity x,y,z 0 maybe custom ammo is needed with proper geometry. Share this post Link to post Share on other sites
MehMan 0 Posted September 11, 2008 Well, I don't mind how it rotates, as long as it moves with the laws of gravity. if it falls down as fast as it should it's all okay. Share this post Link to post Share on other sites
Wolfrug 0 Posted September 12, 2008 For those of you still in possession of OFP, you could check out this little script: CCIP Bombing by Rastavovich. I tested it back in the day, and it worked - no fancy hud movements or whatnot, just a waypoint that moved according to the plane's velocity (and angle?). Seems like a good script to implement in all planes! Especially if you can make it work with the native HUD! Regards, Wolfrug Share this post Link to post Share on other sites
MehMan 0 Posted September 12, 2008 Hmm, just checked it out and it does look promising, but the only problem I'm having with it is that it's too jumpy. Share this post Link to post Share on other sites
rocket 9 Posted September 12, 2008 I modified it to work, more or less, with the following: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;######################################################################################## ;# # ;# This is the script where all the calculations are made. It just needs to know for # ;# which aircraft it is used. # ;# # ;# created by Rastavovich 2002 rastavovich@gmx.net # ;######################################################################################## _bomber = _this select 0 _group = group player _Origin = "helihempty" camcreate [0,0,0] #checkrun ;#-----------------------------------------------------------------------------# ;# Checks "activated or not" and if the bomber is still alive # ;#-----------------------------------------------------------------------------# ? not(alive _bomber) : exit ? CCIPB1 : goto "targeter" goto "ende" #targeter ? _once : goto "targeting" _bomber vehiclechat "CCIP activated" _once = true #targeting ;#-----------------------------------------------------------------------------# ;# Checks if the bomber has at least a height of 1 meter, a height of 0 causes # ;# wrong data for the target-calculation # ;#-----------------------------------------------------------------------------# ? (getpos _bomber select 2) <= 1 : CCIPB1 = false ;#-----------------------------------------------------------------------------# ;# Calculation of the verticalspeed and horizontalspeed # ;# To get better results I take the averange value of two heightchecks. # ;#-----------------------------------------------------------------------------# _heightold = sqrt((_Origin distance _bomber)^2 - (getpos _bomber select 0)^2 - (getpos _bomber select 1)^2) ~0.02 _heightmedium = sqrt((_Origin distance _bomber)^2 - (getpos _bomber select 0)^2 - (getpos _bomber select 1)^2) ~0.02 _heightnew = sqrt((_Origin distance _bomber)^2 - (getpos _bomber select 0)^2 - (getpos _bomber select 1)^2) _verticalspeed = ((_heightmedium - _heightold) + (_heightnew - _heightmedium))* 25 _horizontalspeed = sqrt(sqrt(((speed _bomber/3.6)^2 - (_verticalspeed)^2)^2)) _heightold = getpos _bomber select 2 _morerange = 200 ;#-----------------------------------------------------------------------------# ;# Calculation of bomb's droptime if it would be released right now. If the # ;# plane is climbing the falling-time has another value. # ;#-----------------------------------------------------------------------------# ;hint format ["%3 %2 %1", _verticalspeed, _horizontalspeed * 3.6, _correction] ? _verticalspeed <= 0 : goto "sink" ;#-----------------------------------------------------------------------------# ;# Case: plane is climbing. Calculation of extra-range. # ;#-----------------------------------------------------------------------------# _morerange = (speed _bomber / 3.6)^2 * sin(2 * acos(_verticalspeed * 3.6 / speed _bomber))/ (2 * 10) _verticalspeed = -_verticalspeed ;#-----------------------------------------------------------------------------# ;# Case: plane is sinking or maintaining height. # ;#-----------------------------------------------------------------------------# #sink _verticalspeed = sqrt((_verticalspeed)^2) _droptime = (-_verticalspeed + sqrt((_verticalspeed)^2 + 2 * 10 * _heightold)) / (2 * 10) _IPdistance = 2.1 * (_morerange + _horizontalspeed * _droptime) ;#-----------------------------------------------------------------------------# ;# Set the target-waypoint on the correct position in front of the plane # ;#-----------------------------------------------------------------------------# _position = [((getpos _bomber select 0)+ _IPdistance * sin (getdir _bomber)), ((getpos _bomber select 1)+ _IPdistance * cos (getdir _bomber)),0] ; hint format ["1 = %1, _2 = %2, 3 = %3",((getpos _bomber select 0)+ _IPdistance * sin (getdir _bomber)), ((getpos _bomber select 1)+ _IPdistance * cos (getdir _bomber))] [_group, 1] setWaypointPosition [_position,0] goto "checkrun" #ende ? _once : _bomber vehiclechat "CCIP deactivated" _once = false _position = [getpos _bomber select 0, getpos _bomber select 1,0] [_group, 1] setWaypointPosition [_position,0] ~0.01 goto "checkrun" Share this post Link to post Share on other sites
nuxil 2 Posted September 12, 2008 This just doesnt work.. maybe back in ofp days,, but if i pitch strait down. the move WP is way ahead of me. it should be strait under me when i pitch 90 deg downwards. so this script will only work if you have a pitch of 0 deg. and when i take a look at the script,, i see it doesnt do any vector calulation "angle of plane". which is a MUST for calulating accurate bomb drop Share this post Link to post Share on other sites
MehMan 0 Posted September 12, 2008 Exaclty, which is why in ArmA we can use either the vector commands or getPitch from General Barron. Share this post Link to post Share on other sites
nuxil 2 Posted September 12, 2008 if we be able to make a source of some sort. then adding it to the hud is no problem.. class bones { ... ...  CustomClass_for_BomB }; class Draw { ... ...  class Missile  {  ...  ...  class NewMissileVectorClass    {      type = "line";      points[] {CustomClass_for_BomB} <-- need to be made    }; }; Another idea i had was to use some sort of logic Ai.equipt it with a laserdesignator. and make it target something X meters ahead of the plane."depends on angle of plane" pherhaps a invisible heli pad, combined with a eventhandler fired.. it stops moving ahead when bombs are away. this way. the bombs only simulates free fall position drop.. but is laserguided instead. think i need to scratch my head a bit more on this, Share this post Link to post Share on other sites
nuxil 2 Posted September 13, 2008 MehMan how about something like this? http://www.youtube.com/watch?v=iCrD7DAdoDM Bad quality on the movie.. i made it as small as possible Share this post Link to post Share on other sites
MehMan 0 Posted September 13, 2008 Uh yes, much like that! However with no locking capabilities. Share this post Link to post Share on other sites
nuxil 2 Posted September 13, 2008 Then a new source for the bone is needed.. how to make one i have no clue.. i think its hard coded into the game anyway. using a lockon seams to be the only way for now. i dont see other ways to get info on the Hud. Share this post Link to post Share on other sites
MehMan 0 Posted September 13, 2008 Hmm, does it lock onto an item at one time or another? That's exactly the problem I think we're facing here. Predicting bomb impact and then making the hud work like it should. How can the HUD be animated? The same as a normal bone? Share this post Link to post Share on other sites
nuxil 2 Posted September 14, 2008 Quote[/b] ]Hmm, does it lock onto an item at one time or another? what do you mean? i dont understand the question! Quote[/b] ]How can the HUD be animated? The same as a normal bone? im kinda new in this area myself. but from what i can understand, animations can be done with sources as fixed linear rotational vector ils horizon all thise sources i think are hard coded. but it all seams to be a bit confusing. if you look at the hud. there is a squer box tilted 45 deg. this box shows the flypath of the aircraft. this box. so called, class Plane { ... class Velocity { This Subclass uses bone. class Velocity : Pos10Vector { which uses source vector the hard coded stuff. we need a source like. bombvector for our bone. how we can make this source is our real problem!. as long as we can predict the bomb flypath the same way as the aircraft flypath with some modded source then we can make a hud, more hud experimenting,, http://www.youtube.com/watch?v=-F4G_64SLDU http://www.youtube.com/watch?v=tUcdahYupYY so animations can be done,, just need to make a source first, Share this post Link to post Share on other sites
rocket 9 Posted September 14, 2008 so animations can be done,, just need to make a source first, Well yes, thats been the problem all along. That "source" you speak of will have to be manually calculated using the aircraft vectors and tested according to payload. Making the code to generate this has always been the stumbling block, not the animating itself. Anyone have any ideas about generating the coords? Share this post Link to post Share on other sites
MehMan 0 Posted September 14, 2008 It can be calculated by getting out the speed using the speed command and vectorUp and vectorDir of the plane, as the bomb inherits all vectors and speeds of plane, but unlike the plane it has no propulsion and lift so it starts to fall. Now we just need to find out some of the basics in ArmA, for one I don't think there's any air resistance, the gravity it uses and how much does the geoLod mass have an effect on things. Share this post Link to post Share on other sites