2 UIUC wind gradient test code v0.1
4 Returns wind vector as a function of altitude for a simple
5 parabolic gradient profile
11 #include "uiuc_getwind.h"
13 void uiuc_getwind(double wind[3])
16 double zref = 300.; //Reference height (ft)
17 double uref = 0.; //Horizontal wind velocity at ref. height (ft/sec)
18 double ordref = 0.; //Horizontal wind ordinal from north (degrees)
19 double zoff = 15.; //Z offset (ft) - wind is zero at and below this point
20 double zcomp = 0.; //Vertical component (down is positive)
24 double windmag = 0; //Wind magnitude
25 double a = 0; //Parabola: Altitude = a*windmag^2 + zoff
27 a = zref/pow(uref,2.);
29 windmag = sqrt(Altitude/a);
33 wind[0] = windmag * cos(ordref*3.14159/180.); //North component
34 wind[1] = windmag * sin(ordref*3.14159/180.); //East component