Mercurial > public > ostc4
comparison Small_CPU/Src/externalInterface.c @ 753:4a28402e4aca
Updated outdated comment
author | Ideenmodellierer |
---|---|
date | Tue, 07 Mar 2023 19:52:18 +0100 |
parents | df0d43da1614 |
children | 0b5f45448eb6 |
comparison
equal
deleted
inserted
replaced
752:4f19336a3f21 | 753:4a28402e4aca |
---|---|
91 } | 91 } |
92 global.deviceDataSendToMaster.hw_Info.checkADC = 1; | 92 global.deviceDataSendToMaster.hw_Info.checkADC = 1; |
93 | 93 |
94 /* Create a lookup table based on GSS application note AN001: PRESSURE COMPENSATION OF A CO2 SENSOR */ | 94 /* Create a lookup table based on GSS application note AN001: PRESSURE COMPENSATION OF A CO2 SENSOR */ |
95 /* The main purpose of the sensor in the dive application is to be a warning indicator */ | 95 /* The main purpose of the sensor in the dive application is to be a warning indicator */ |
96 /* => no exact values necessary => a lookup table with 50 entries should be sufficient */ | 96 /* => no exact values necessary => a lookup table with 1000ppm scaling should be sufficient */ |
97 LookupCO2PressureCorrection [0] = -0.0014; | 97 LookupCO2PressureCorrection [0] = -0.0014; |
98 for(index = 1; index < (LOOKUP_CO2_CORR_TABLE_MAX / LOOKUP_CO2_CORR_TABLE_SCALE); index++) | 98 for(index = 1; index < (LOOKUP_CO2_CORR_TABLE_MAX / LOOKUP_CO2_CORR_TABLE_SCALE); index++) |
99 { | 99 { |
100 coeff = index * LOOKUP_CO2_CORR_TABLE_SCALE; | 100 coeff = index * LOOKUP_CO2_CORR_TABLE_SCALE; |
101 LookupCO2PressureCorrection[index] = 2.811*pow(10,-38)*pow(coeff,6)- 9.817*pow(10,-32)*pow(coeff,5)+1.304*pow(10,-25)*pow(coeff,4)-8.216*pow(10,-20)*pow(coeff,3)+2.311*pow(10,-14)*pow(coeff,2) - 2.195*pow(10,-9)*coeff - 1.471*pow(10,-3); | 101 LookupCO2PressureCorrection[index] = 2.811*pow(10,-38)*pow(coeff,6)- 9.817*pow(10,-32)*pow(coeff,5)+1.304*pow(10,-25)*pow(coeff,4)-8.216*pow(10,-20)*pow(coeff,3)+2.311*pow(10,-14)*pow(coeff,2) - 2.195*pow(10,-9)*coeff - 1.471*pow(10,-3); |