99
1010#define DPSENSOR 3 // Selects the differential pressure Hardware sensor see AirSensor.cpp for details on Hookup
1111#define PSENSOR 1 // Selects the static pressure Hardware sensor see AirSensor.cpp for details on Hookup
12+ #define DEBUG 1 //
1213
1314#if DPSENSOR==1
1415#include < Wire.h>
@@ -53,11 +54,13 @@ void loop() {
5354 AirDataSensor.ReadTAT (ptrAirDC, psensor);
5455 AirDataSensor.ReadRH (ptrAirDC, psensor);
5556// Computation
56- AirDataComputer.IAS (1 );// Calculates the IAS, Algorithm 1
5757 AirDataComputer.RhoAir (1 );// Calculates the air density, Algorithm 1
58+ AirDataComputer.IAS (1 );// Calculates the IAS, Algorithm 1
59+ AirDataComputer.CAS (1 );// Calculates the CAS, Algorithm 1
5860 AirDataComputer.TAS (1 );// Calculates the IAS, Algorithm 1
5961 AirDataComputer.Mach (1 );// Calculates the Mach number, Algorithm 1
6062 AirDataComputer.OAT (1 );// Calculates the Outside Air Temperature, Algorithm 1
63+ AirDataComputer.ISAAltitude (1 );// Calculates the ISA altitude from static pressure, Algorithm 1
6164 delay (1000 ); // loop delay
6265// Visualitation
6366 Serial.println (dpsensor); // Prints the Selected sensor
@@ -70,6 +73,8 @@ void loop() {
7073 Serial.println (AirDataComputer._uIAS , 10 ); // Sends the uncertainty of IAS measurement
7174 Serial.println (AirDataComputer._Rho ,4 );// Sends the density of Air
7275 Serial.println (AirDataComputer._uRho , 10 ); // Sends the uncertainty of the density of air
76+ Serial.println (AirDataComputer._CAS ); // Calibrated AirSpeed
77+ Serial.println (AirDataComputer._uCAS ); // Calibrated AirSpeed uncertainty
7378 Serial.println (AirDataComputer._TAS ); // True Airspeed
7479 Serial.println (AirDataComputer._uTAS ); // True Airspeed uncertainty
7580 Serial.println (AirDataComputer._M ,10 ); // Mach number
@@ -79,4 +84,6 @@ void loop() {
7984 Serial.println (AirDataComputer._uT ); // Outside Temperature, Static Temperature uncertainty
8085 Serial.println (AirDataComputer._RH ); // Relative Humidity
8186 Serial.println (AirDataComputer._uRH ); // Relative Humidity Uncertainty
87+ Serial.println (AirDataComputer._h ); // Altitude
88+ Serial.println (AirDataComputer._uh ); // Altitude Uncertainty
8289}
0 commit comments