You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
529 B
25 lines
529 B
function [coeffdrag] = DragInterpolations_ICANSAT(velocity, altitude, time, tb)
|
|
|
|
% global tb
|
|
|
|
drag_data = dlmread("ICANSAT/ICANSAT_DragData.txt", "\t",1,0);
|
|
|
|
% Mach No
|
|
mach_no = drag_data(:,1);
|
|
|
|
% Full base drag
|
|
cd_full = drag_data(:,3);
|
|
|
|
% No base drag
|
|
cd_zero = drag_data(:,2);
|
|
|
|
[temp, sound_speed, P, rho] = atmosisa(altitude);
|
|
mach_speed = velocity/sound_speed;
|
|
|
|
if (time > tb)
|
|
coeffdrag = interp1(mach_no, cd_full, mach_speed);
|
|
else
|
|
coeffdrag = interp1(mach_no, cd_zero, mach_speed);
|
|
end
|
|
|
|
end
|