Ensure math functions are named consistently
This commit is contained in:
@@ -37,11 +37,12 @@ float Resistance(int adc_raw)
|
||||
return R1 / (5.0f / r2 - 1.0f);
|
||||
}
|
||||
|
||||
// Resistance to temperature
|
||||
float SteinhartHart(float res)
|
||||
{
|
||||
float logr, t;
|
||||
|
||||
// Convert resistance to temperature
|
||||
|
||||
// 25C = 10000 Ohms
|
||||
// 100C = 6744 Ohms
|
||||
|
||||
@@ -51,8 +52,7 @@ float SteinhartHart(float res)
|
||||
return t - 273.15f; // Kelvin to celsius
|
||||
}
|
||||
|
||||
// Dewpoint TD
|
||||
float Dewp(float t, float rh)
|
||||
float Dewpoint(float t, float rh)
|
||||
{
|
||||
float a, b;
|
||||
|
||||
@@ -65,8 +65,7 @@ float Dewp(float t, float rh)
|
||||
return TH2 * (a + b) / (TH3 - a - b);
|
||||
}
|
||||
|
||||
// Temperature T
|
||||
float Temp(float td, float rh)
|
||||
float Temperature(float td, float rh)
|
||||
{
|
||||
float a, b;
|
||||
|
||||
@@ -79,8 +78,7 @@ float Temp(float td, float rh)
|
||||
return TH2 * (b - a) / (TH3 + a - b);
|
||||
}
|
||||
|
||||
// Relative Humidity RH
|
||||
float Rhum(float t, float td)
|
||||
float RelHumidity(float t, float td)
|
||||
{
|
||||
float a, b;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user