Skip to content

Commit

Permalink
Windchill Calculation Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
leoherzog committed Jan 1, 2025
1 parent 4ff648f commit b8a09e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code.gs
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ function refreshFromWeatherflow_() {
};
} else if (conditions.temp != null && conditions.windSpeed != null) {
conditions.windChill = {
"f": conditions.temp.f.windChillF(conditions.windSpeed).toFixedNumber(2),
"c": conditions.temp.c.windChillC(conditions.windSpeed).toFixedNumber(2)
"f": conditions.temp.f.windChillF(conditions.windSpeed.mph).toFixedNumber(2),
"c": conditions.temp.c.windChillC(conditions.windSpeed.mph).toFixedNumber(2)
};
};
if (weatherflowConditions.obs[0].heat_index != null) {
Expand Down Expand Up @@ -915,8 +915,8 @@ function doPost(request) {
};
if (receivedJSON.humidity != null) conditions.humidity = Number(receivedJSON.humidity).toFixedNumber(0);
if (conditions.temp != null && conditions.windSpeed != null) conditions.windChill = {
"f": conditions.temp.f.windChillF(conditions.windSpeed).toFixedNumber(2),
"c": conditions.temp.c.windChillC(conditions.windSpeed).toFixedNumber(2)
"f": conditions.temp.f.windChillF(conditions.windSpeed.mph).toFixedNumber(2),
"c": conditions.temp.c.windChillC(conditions.windSpeed.mph).toFixedNumber(2)
}
if (conditions.temp != null && conditions.humidity != null) conditions.heatIndex = {
"f": conditions.temp.f.heatIndex(conditions.humidity, 'F').toFixedNumber(2),
Expand Down

0 comments on commit b8a09e7

Please sign in to comment.