I've been asked to create a falling parachute simulation that must incorporate the ODE45 function to determine the location, velocity, and acceleration vs time. I have hardly any experience when it comes to MatLab so I'm not really sure how to do this. I have some rough code right now with equations,the initial locations, and a density function. I'm just not sure how to incorporate the location, density, and velocity equations into ODE45.
g = 32.174; %Acceleration due to gravity
W = 100; %Payload weight
A = 3; %Payload characteristic area
CP = 2; %Payload Drag Coefficient
CS = 0.5; %Payload Side Force Coefficient
S = 20; %Aerodynamic area of canopy
WS = 10; %Canopy wing span
CDi = 0.01; %Initial canopy Drag Coefficient
CLi = 0.0; %Initial canopy Lift Coefficient
CD = 0.2; %Inflated canopy Drag Coefficient
CL = 1.0; %Inflated canopy Lift Coefficient
CR= CL + CD; %Resultant Coefficient
e = 1.0; %Oswald Efficiency Factor
delTi = 5; %Inflation time
[lat,lon,h] = geodetic2enu(68.6719,44.8831,15000,68.6719,44.8831,0,wgs84Ellipsoid);
function[rho,T,P]=density(h)
if h<= 16000 % troposphere
T = 59 - 0.00356.*h; %deg F Temperature
P = 2116.*((T+459.7)./518.6).^5.256; %lbs/ft^2 pressure
end
rho = P/(1718.*(T+459.7)); %slugs/ft^3 density
end
V = ((2*W)/(rho*S))^2*(1/(CR^2)^.25); %Velocity
L = (1/2*rho*V^2*S*CL); %Inflated Lift force
D = (1/2*rho*V^2*S*CD); %Inflated Drag force
D = (1/2*rho*V^2*A*CP); %Payload Drag force
R = (L^2+D^2)^.5; %Inflated Resultant force
gamma = atand(CD/CL); %Flight Path Angle
Vh = V*cos(gamma); %Horizontal veloctiy
Vv = V*sin(gamma); %Vertical velocity
%Force Equations
Fh = L*sin(gamma)-D*cos(gamma); %Horizontal force
Fv = L*cos(gamma)+D*sin(gamma)-W; %Vertical force