|
|
@ -199,9 +199,16 @@ int zh2o2_computer_self_test() { |
|
|
|
printf("T AirPressure RH H2O2(ppm) RS\n"); |
|
|
|
for (size_t i = 0; i < 500; i += 1) { |
|
|
|
float rs = zh2o2_compute_rs(i, zh2o2_t2k(temperatureC), rh, AirPressure); |
|
|
|
printf("%d %d %d %d %d\n", (int) temperatureC, (int)AirPressure, (int)rh, (int) i, (int)rs); |
|
|
|
printf("%d %d %d %d %d\n", (int)temperatureC, (int)AirPressure, (int)rh, (int)i, (int)rs); |
|
|
|
} |
|
|
|
|
|
|
|
printf("Test passed\n"); |
|
|
|
// ppm temp rs 大气压 |
|
|
|
printf("result:%f\n", zh2o2_compute_rs(100, zh2o2_t2k(25), 50, 101325)); |
|
|
|
printf("result:%f\n", zh2o2_compute_rs(200, zh2o2_t2k(30), 50, 101325)); |
|
|
|
printf("result:%f\n", zh2o2_compute_rs(500, zh2o2_t2k(30), 60, 101325)); |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |