3434cfactor=25 ;
3535// Define tollerance band
3636airdensityeband=0.5 ; // Air Density Percent of rho
37- viscosityeband=0.5 ;// Viscosity %
37+ viscosityeband=2 ;// Viscosity %
3838altitudeeband=0.5 ;// Altitude %
3939fsamplev=zeros(1 ,ngroups);
4040
@@ -109,39 +109,39 @@ subplot(4,3,3)
109109xtitle(' True Air Speed [m/s] vs Time [ms]' )
110110plot(timetic,Q(:,TASmcol),2 )
111111// External temperature [°K]
112- subplot(4 ,3 ,3 )
112+ subplot(4 ,3 ,4 )
113113xtitle(' External Temperature [°K] vs Time [ms]' )
114114plot(timetic,Q(:,ExtTempmcol),2 )
115115// Temperature deltapsensor [°K]
116- subplot(4 ,3 ,4 )
116+ subplot(4 ,3 ,5 )
117117xtitle(' Temperature from deltap pressure sensor [°K] vs Time [ms]' )
118118plot(timetic,Q(:,tempdeltapmcol),2 )
119119// Temperature abspressure sensor [°K]
120- subplot(4 ,3 ,5 )
120+ subplot(4 ,3 ,6 )
121121xtitle(' Temperature from absolute pressure sensor [°K] vs Time [ms]' )
122122plot(timetic,Q(:,tempabsmcol),2 )
123123// Altitude [m]
124- subplot(4 ,3 ,6 )
124+ subplot(4 ,3 ,7 )
125125xtitle(' Altitude [m] vs Time [ms]' )
126126plot(timetic,Q(:,altitude),2 )
127127// Outside Air Temperature [°K]
128- subplot(4 ,3 ,7 )
128+ subplot(4 ,3 ,8 )
129129xtitle(' Outside Air Temperature [°K] vs Time [ms]' )
130130plot(timetic,Q(:,OAT),2 )
131131// Air Density [kg/m^3]
132- subplot(4 ,3 ,8 )
132+ subplot(4 ,3 ,9 )
133133xtitle(' Air Density [kg/m^3] vs Time [ms]' )
134134plot(timetic,Q(:,rhoairmcol),2 )
135135// Air Viscosity [mPas]
136- subplot(4 ,3 ,9 )
136+ subplot(4 ,3 ,10 )
137137xtitle(' Air Viscosity [mPas] vs Time [ms]' )
138138plot(timetic,Q(:,vair),2 )
139139// Re
140- subplot(4 ,3 ,10 )
140+ subplot(4 ,3 ,11 )
141141xtitle(' Reynolds vs Time [ms]' )
142142plot(timetic,Q(:,Re),2 )
143143// C factot
144- subplot(4 ,3 ,11 )
144+ subplot(4 ,3 ,12 )
145145xtitle(' c factor vs Time [ms]' )
146146plot(timetic,Q(:,cfactor),2 )
147147// Compares ADC logged values with offline calculated ones
@@ -169,7 +169,7 @@ if debug==1 then
169169 subplot(2 ,2 ,2 )
170170 xtitle(' Viscosity of Air Difference % vs Time [ms]' )
171171 for ri=1 :r
172- Q(ri,c+2 )=(Q(ri,vair)-viscosityair(Q(ri,exttempcol )))/viscosityair(Q(ri,exttempcol ))*100
172+ Q(ri,c+2 )=(Q(ri,vair)-viscosityair(Q(ri,ExtTempmcol )))/viscosityair(Q(ri,ExtTempmcol ))*100
173173 end
174174 plot(timetic,Q(:,c+2 ),2 )
175175 if ((abs(min(Q(:,c+2 )))<viscosityeband)&(abs(max(Q(:,c+2 )))<viscosityeband)) then
@@ -189,9 +189,4 @@ if debug==1 then
189189 else
190190 mprintf(' \nWarning: ADC calculated altitude value is outside the tollerance band of %f %% of viscosity' ,altitudeeband)
191191 end
192-
193-
194-
195-
196-
197192end
0 commit comments