|
@ -80,7 +80,7 @@ static constexpr uint8_t GEIGER_PIN = D6; |
|
|
static constexpr float CONV_FACTOR = 0.008120; |
|
|
static constexpr float CONV_FACTOR = 0.008120; |
|
|
static constexpr float OWN_BACKGROUND_CPS = 0.2; // documentation says 0.2 (make sure value doesn't get negative if subtracting!)
|
|
|
static constexpr float OWN_BACKGROUND_CPS = 0.2; // documentation says 0.2 (make sure value doesn't get negative if subtracting!)
|
|
|
|
|
|
|
|
|
static constexpr float HEIGHT = 142; |
|
|
static constexpr float HEIGHT = 135; |
|
|
|
|
|
|
|
|
#ifndef EXTERNAL_POWER |
|
|
#ifndef EXTERNAL_POWER |
|
|
ADC_MODE(ADC_VCC); |
|
|
ADC_MODE(ADC_VCC); |
|
@ -157,7 +157,7 @@ void ICACHE_FLASH_ATTR getValuesJSON(char* buffer, const size_t buf_len, int for |
|
|
// https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel#Reduktion_auf_Meeresh%C3%B6he
|
|
|
// https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel#Reduktion_auf_Meeresh%C3%B6he
|
|
|
// https://carnotcycle.wordpress.com/2012/08/04/how-to-convert-relative-humidity-to-absolute-humidity/
|
|
|
// https://carnotcycle.wordpress.com/2012/08/04/how-to-convert-relative-humidity-to-absolute-humidity/
|
|
|
float absolute_humidity = (6.112*exp((17.67*sd.temperature)/(sd.temperature+243.5))*(sd.humidity/100)*18.02)/((273.15+sd.temperature)*1000*0.08314); |
|
|
float absolute_humidity = (6.112*exp((17.67*sd.temperature)/(sd.temperature+243.5))*(sd.humidity/100)*18.02)/((273.15+sd.temperature)*1000*0.08314); |
|
|
float pressure_compensation_factor = exp((9.80665/(287.05*(sd.temperature+273.15+0.12*(((absolute_humidity*461.5*(sd.temperature+273.15))/100)/100)+0.0065*(HEIGHT/2))))*HEIGHT); |
|
|
float pressure_compensation_factor = exp((9.80665/(287.05*(sd.temperature+273.15+0.12*((absolute_humidity*461.5*(sd.temperature+273.15)/100)/100)+0.0065*(HEIGHT/2))))*HEIGHT); |
|
|
|
|
|
|
|
|
if (format == 1) { |
|
|
if (format == 1) { |
|
|
JsonArray array = jsonDoc.to<JsonArray>(); |
|
|
JsonArray array = jsonDoc.to<JsonArray>(); |
|
|