From: Dave C. <dav...@co...> - 2015-04-20 18:40:59
|
Hi Nikolai, I used this method: Assuming a 2m barrel length, mass = 1.22kg, muzzle V = 1030 m/s, and: F=ma, d= 1/2at^2, v=at, deltaP = Ft: I get: t = 0.0039s, impulse = 1256.6, F = 322205N = 72435 lb (approx) Coincidentally, t is roughly equal to the simulation dt. Also, are you firing while on the ground? This complicates things quite a bit since the landing gear reactions are sensitive to large impulses. You may have to turn the effect off while sitting on the wheels. Dave On Mon, 20 Apr 2015 13:29:23 +0200 Nikolai Verner Christensen <emp...@gm...> wrote: > Thanks for your reply. > > I have made something now, but it makes JSB give NaN, somehow the force is > way to big or something. > Did I do something wrong? (if I make the force 1000 times smaller then it > sorta works, but I would like it to work with the correct value) > > Will this make a force that is only turned on every 5th jsb iteration?: > > <channel name="Cannon recoil"> > <!-- > round_mass = 1.22Kg > velocity = 1030 m/s > > recoil_energy = 0.5 x 0.5 x round_mass x velocity^2 = 323574.5 Joules > > dt = 0.008333333 seconds > > force = energy/dt = 38828940 N = 85603159.5 Pound of force > > 22.5 rounds/sec = 0.044444 sec/round > > 5.33333 jsb_frames/round (0.04444/dt) ~ will just make impulse every > 5 frames > > > Note: for now it asumes jsb runs at 120 Hz > --> > > <fcs_function name="names/recoil/impulse"> > <function> > <ifthen> > <eq> > <fraction> > <quotient> > <property>simulation/frame</property> > <value>5</value> > </quotient> > </fraction> > <value>0</value> > </eq> > <value>1</value> > <value>0</value> > </ifthen> > </function> > <output>systems/recoil/impulse</output> > </fcs_function> > > <switch name="names/recoil/magnitude"> > <default value="0"/> > <test logic="AND" value="85603159.5"> > /controls/armament/station[0]/trigger == 1 > /ai/submodels/submodel[3]/count gt 0 > systems/recoil/impulse == 1 > </test> > <output>external_reactions/recoil/magnitude</output> > </switch> > > </channel> > > > > > On Sun, Apr 19, 2015 at 5:28 PM, Dave Culp <dav...@co...> wrote: > > > Yes, you can use external reactions for this, but first you need to > > convert your energy into a force (probably best to reformulate it as an > > impulse, force x time, first, then divide by the time the force is applied). > > > > As for a one-time-step application of this force, I think this can be done > > using the existing FCS components. > > > > > > Dave > > > > > > On Sun, 19 Apr 2015 08:40:24 +0200 > > Nikolai Verner Christensen <emp...@gm...> wrote: > > > > > Hello. > > > > > > I have a certain amount of recoil energy (323574.5 Joules). I wish to > > apply > > > it in a certain direction to the aircraft. > > > The effect should be instant, so not smooth. > > > > > > Can I use external reaction for that somehow? Am I able to control that > > the > > > external reaction should be turned on only for 1 loop of JSBSim or > > > something similar, so it gives a jerk in the aircraft? > > > > > > Or is there another way to do this? > > > > > > -- > > Dave Culp <dav...@co...> > > > > > > ------------------------------------------------------------------------------ > > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > > Develop your own process in accordance with the BPMN 2 standard > > Learn Process modeling best practices with Bonita BPM through live > > exercises > > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- > > event?utm_ > > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > > _______________________________________________ > > Jsbsim-users mailing list > > Jsb...@li... > > https://lists.sourceforge.net/lists/listinfo/jsbsim-users > > -- Dave Culp <dav...@co...> |