AutoMovie API
    Preparing search index...

    Function projectileDragFlight

    • A projectile's flight under gravity and quadratic drag, read by time: dx/dt = v, dv/dt = gravity - k |v| v with k = rho Cd A / (2 m), solved by the engine's one fixed-step integrator (integrateMotionTrajectory, classical Runge-Kutta read by cubic Hermite) from the launch.

      The step is chosen once per flight by step doubling (Press et al., Numerical Recipes, 3rd ed., 2007, sec. 17.2): from the integrator's own default step, the step is halved until one step and two half steps from the launch differ, divided by 15 (the fourth-order method's 2^4 - 1), by no more than TOLERANCE metres per second of the step, so the error over a flight of T seconds stays near TOLERANCE T. The probe starts at the launch with the speed the flight can reach at most: a body faster than its terminal speed sqrt(|g| / k) only slows, one slower only approaches it, so the speed never exceeds the larger of the two, where the drag's acceleration is largest. With zero drag and nonzero gravity the global speed bound is Infinity; the finite launch speed suffices for the step probe because acceleration is constant. The halving stops at the 52 bits of a double's mantissa, past which a step cannot shrink.

      The flight is integrated in chunks of CHUNK steps, each started from the previous chunk's end, so a read far along the flight integrates only up to its chunk, and every chunk depends on the launch alone: reads in any order give the same values. Finite times before launch read the launch state; nonfinite requests throw before any chunks are allocated. Projectile data must remain unchanged while its identity-cached reader is used.

      Parameters

      Returns IAutoMovieProjectileFlight

      The flight's reader.

      When launch vectors, speed/gravity norms, drag coefficients or their derived positive-drag bound are invalid or unrepresentable; reader methods also reject nonfinite times.