Skip to content

Commit

Permalink
Fixes wind speed conversions
Browse files Browse the repository at this point in the history
Upstream wind speed unit changed from m/s to km/h.
  • Loading branch information
jaredwsmith committed Jun 27, 2020
1 parent 9b7e8b2 commit fd47ae9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ function chswx_normalize_observation_data($ob)
}

if (!is_null($windSpd)) {
$c_wind = new Convertor($windSpd, 'm s**-1');
$c_wind = new Convertor($windSpd, 'km h**-1');
$n_ob['wind_mph'] = round($c_wind->to('mi h**-1')) . " mph";
} else {
$n_ob['wind_mph'] = "Not Available";
}

if (!is_null($windGust)) {
$c_gust = new Convertor($windGust, 'm s**-1');
$c_gust = new Convertor($windGust, 'km h**-1');
$n_ob['wind_gust_mph'] = round($c_gust->to('mi h**-1')) . " mph";
}

Expand Down

0 comments on commit fd47ae9

Please sign in to comment.