//farwind.sce
//www.basicairdata.eu 2013 (c) JLJ
//Example figure for FAR flavor Gust Ude considered 15 m/s, c=0.5m
clear;
//Gustshape function definition
function [zwind,space]=windshape(ude, c)
    numint=100; //#distance intervals
//Imperial units
    ude=ude/0.3048 //Cast to f/s 
    c=c/0.3048 //Cast to feet
    space=linspace(0,25*c,numint)
    zwind=ude/2*(1-cos(2*%pi/25/c.*space))
//SI units    
    space=0.3048*[space]
    zwind=0.3048*[zwind]
endfunction

ude=15; //m/s
c=0.5; //m
len=10;//m
[u s]=windshape(ude,c)
plot(s,u)
xgrid()
title("FAR gust shape ,c=0.5 m Ude=15 m/s Lenght=12.5 m www.basicairdata.eu JLJ 2013","fontsize",4)
xlabel("Penetration into the gust [m]","fontsize",4)
ylabel("Gust speed [m/s]","fontsize",4)
