]> git.mxchange.org Git - flightgear.git/commit
David Culp:
authorehofman <ehofman>
Thu, 26 Aug 2004 16:25:54 +0000 (16:25 +0000)
committerehofman <ehofman>
Thu, 26 Aug 2004 16:25:54 +0000 (16:25 +0000)
commitcfc05f5f0d14e1cdb01606b676230879e7252f69
tree9d7386d15478bf2d1a5195a12ec527a8fb4ade7d
parent065d4d8da135de613a6f3bd6ac6106eba2d24c6e
David Culp:

Silly me.  I was starting the timer at zero, so the first tracer didn't fly
until 0.25 seconds after pulling the trigger.  Now the timer starts at the
same value as "delay", so the first round comes out immediately.

Also, I've added an optional configuration attribute that allows you to change
the ballistics of the submodel.  This allows parachutes, or anything else
that has ballistics different from a bullet.  The attribute is called "eda",
which is the equivalent drag area.  Default value is 0.007, which gives the
same ballistics as the current tracers.  Increasing this value gives more
drag.  A value of 2.0 looks good for a parachute.

math stuff
########################################################################
The deceleration of the ballictic object is now given by:

[ (rho) (Cd) ] / [ (1/2) (m) ] * A * (V * V)

where rho is sea-level air density, and Cd and m are fixed, bullet-like
values. So the calculation is:

0.0116918 * A * (V * V)

The value "A" is what I'm calling the "eda" (equivalent drag area).
########################################################################

A parachute model will have to be built so that the parachutist's feet
are in the forward x-direction.
Here is the submodel.xml config I use for "parachutes":

  <submodel>
    <name>flares</name>
    <model>Models/Geometry/flare.ac</model>
    <trigger>systems/submodels/submodel[0]/trigger</trigger>
    <speed>0.0</speed>
    <repeat>true</repeat>
    <delay>0.85</delay>
    <count>4</count>
    <x-offset>0.0</x-offset>
    <y-offset>0.0</y-offset>
    <z-offset>-4.0</z-offset>
    <yaw-offset>0.0</yaw-offset>
    <pitch-offset>0.0</pitch-offset>
    <eda>2.0</eda>
  </submodel>
src/AIModel/AIBallistic.cxx
src/AIModel/AIBallistic.hxx
src/AIModel/AIManager.cxx
src/AIModel/AIManager.hxx
src/AIModel/AIScenario.cxx
src/AIModel/AIScenario.hxx
src/Systems/submodel.cxx
src/Systems/submodel.hxx