Trajectory of a Dropped Payload

This code accounts for the drag of a medium and then displays the trajectory of a payload
252 Downloads
Updated 12 Jan 2017

View License

The specialty of the code is that it takes into account the drag created by the medium and thereafter, without getting into complicated mathematical derivation, it is able to calculate the duration and range of trajectory (and plot it). I “free-fall with drag” equations that we find on the net are very complex and have application only if the altitude its high enough for the payload to achieve terminal velocity, thus I came up with a code that considers the drag and calculates the trajectory of a payload that does not reach terminal velocity before it hits the ground.
Problem :
When a payload is dropped from a plane it has a velocity (Vpg) with respect to ground in horizontal (X) direction and zero velocity in vertical (Z) direction, at the instant it is released. Thereafter its velocity in X direction decrease gradually due to drag force and increases in Z direction due to gravitational force. Simultaneously the payload also experiences an upward force due to drag. Now drag is dependent on the square of velocity. Thus at ever instant, the payload is experiencing a drag force (which depends on its instantaneous velocity) which causes a decrease in velocity, which in-turn changes the magnitude of drag force (or deceleration). Meaning we cannot use Newton’s Equation of Motions (NEM) to describe this trajectory because the deceleration is not constant, but is a function of instantaneous velocity, which in-turn is a function of acceleration (ie., dependent on drag force)! Thus, their interdependence causes looping. Nonetheless, if we were able to find the velocity and drag at every instant of time, then we could plot the trajectory without resolving to complicated “free-fall with drag” equations and this is exactly what I have done!
Logic:
Following are the initial inputs that the code requires:
a. Vpa : velocity of plane wrt air
b. Vag : velocity of air wrt ground
c. Angle : angle of the wind velocity wrt to direction of motion of plane
d. H : height of the plane above the ground
After taking these inputs the code first calculates the duration of trajectory. To do so, it creates a vector of the following variables:
a. ty : time that has elapsed post the dropping of payload
b. H : height of the payload off the ground
c. Vz : velocity of payload in Z direction
d. Dz : drag force in Z direction
e. dz : deceleration due to drag force (Dz)
f. acc : net acceleration in Z direction
These vectors are placed in a “while” loop with the condition that the loop ends when “H” becomes lesser than zero wherein “H” is calculated using the NEM. Indeed I had mentioned earlier that we couldn’t plot the trajectory using NEM because we don’t wish to get into complicated math (which is to derive a continuous function). Nonetheless, we can use NEM to calculate “H” after some small interval of time has elapsed (ie., making “H” a discontinuous function) and this is exactly what the loop does. It increments the time vector by a very small value (0.001 seconds) and then finds the value “H(k)” using the previous values of velocity “Vz(k-1)” and acceleration “acc(k-1)”. Thus when the loop ends, the last element of the time vector “tz(k-1)” is equal to the duration of trajectory.
Now that the duration is known, we can calculate the range of the payload in exactly the same manner as adopted for calculating “H” (except for the obvious change of variable names). The main difference is that this loop is conditioned to run for exactly as many number of times as the previous loop had run for. Moreover, before entering the loop, various variables have been assigned to a zero matrix of length equal to the number of times the previous loop had run. By doing so the execution time of code is reduced to one-tenth of the time required otherwise!

Cite As

Neelay Doshi (2024). Trajectory of a Dropped Payload (https://www.mathworks.com/matlabcentral/fileexchange/61107-trajectory-of-a-dropped-payload), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Coordinate Transformations in Help Center and MATLAB Answers
Acknowledgements

Inspired by: MATLAB Contest - Mastermind

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0