mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Fixed heat index
Celsius and Fahrenheit were flipped. The index was computed in Fahrenheit but used as if it were Celsius.
This commit is contained in:
parent
6bb4db3842
commit
d6fe5ab417
@ -432,9 +432,9 @@ Module.register("currentweather",{
|
|||||||
- 1.99*Math.pow(10,-6)*tempInF*tempInF*this.humidity*this.humidity;
|
- 1.99*Math.pow(10,-6)*tempInF*tempInF*this.humidity*this.humidity;
|
||||||
|
|
||||||
switch (this.config.units){
|
switch (this.config.units){
|
||||||
case "metric": this.feelsLike = Hindex.toFixed(0);
|
case "metric": this.feelsLike = parseFloat((Hindex - 32) / 1.8).toFixed(0);
|
||||||
break;
|
break;
|
||||||
case "imperial": this.feelsLike = parseFloat(Hindex * 1.8 + 32).toFixed(0);
|
case "imperial": this.feelsLike = Hindex.toFixed(0);
|
||||||
break;
|
break;
|
||||||
case "default":
|
case "default":
|
||||||
var tc = Hindex - 273.15;
|
var tc = Hindex - 273.15;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user