@@ -19,6 +19,8 @@ AirDC::AirDC(int pid)
1919 _T=288.15 ;
2020 _RH=0.0 ;
2121 _qc=0.0 ;
22+ _AOA=0.17 ;
23+ _AOS=0 ;
2224 _IAS=0.0 ;
2325 // Uncertainty of measurements
2426 _uRho=0.0 ; // To be calculated, 0 default value
@@ -28,6 +30,7 @@ AirDC::AirDC(int pid)
2830 _uqc=5.0 ;
2931 _uIAS=0.0 ;// To be calculated, 0 default value
3032 _uTAT=0.0 ;// To be calculated, 0 default value
33+
3134}
3235// RhoAir(Pressure,Temperature,Relative Humidity,mode)
3336// Mode 1 is the default BasicAirData routine
@@ -222,11 +225,12 @@ void AirDC::ISAAltitude(int mode)
222225 case 1 :
223226 {
224227 double Ps,h;
225- Ps=_p/ 133.3223684211 / 25.4 ;// Pa to inHg Conversion
228+ Ps=_p* 0.000295299875080277 ;// Pa to inHg Conversion
226229 // Using Goodrich 4081 Air data handbook formula
227- _h=(pow (29.92126 ,0.190255 )-pow (Ps,0.190255 ))/0.000013125214 ; // US atmosphere 1962
230+
231+ _h=(pow (29.92126 ,0.190255 )-pow (Ps,0.190255 ))*76189.2339431570 ; // US atmosphere 1962
228232 // Back to SI
229- _h=h *0.3048 ;
233+ _h=_h *0.3048 ;
230234 _uh=0.057989724 *pow (Ps,-0.809745 )*258006317.725680592912 *_up;
231235 }
232236 }
@@ -309,8 +313,8 @@ void AirDC::Viscosity(int mode)
309313 {
310314 case 1 :
311315 {
312- // Calculate viscosity. Sutherland's formula, note that unit of measurement [Pas] is multiplied by 10e3
313- _mu= 18.27 *(291.15 +120 )/(_T+120 )*pow ((_T/291.15 ),(3 /2 ));
316+ // Calculate viscosity. Sutherland's formula, note that unit number multiplied 10e6
317+ _mu= 18.27 *(291.15 +120 )/(_T+120 )*pow ((_T/291.15 ),(3 /2 ))* 1e-6 ;
314318 }
315319 }
316320}
0 commit comments