Skip to content

Commit

Permalink
Round the temperature, silly
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredwsmith committed Mar 30, 2019
1 parent 5aaabad commit 8004ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ function chswx_normalize_observation_data($ob)
// Start unit conversions...
if (!is_null($t)) {
$c_temp = new Convertor($t, 'c');
$n_ob['temp_f'] = $c_temp->to('f');
}

if (!is_null($tD)) {
Expand All @@ -108,6 +107,7 @@ function chswx_normalize_observation_data($ob)
$c_pres = $ob['barometricPressure']['value'] / 3386.389;

// End unit conversions. Start appending values to the array...
$n_ob['temp_f'] = round($c_temp->to('f'));
$n_ob['dewpoint_f'] = round($c_dpt->to('f'));
$n_ob['pressure_in'] = round($c_pres, 2);
$n_ob['relative_humidity'] = round($ob['relativeHumidity']['value']) . '%';
Expand Down

0 comments on commit 8004ad5

Please sign in to comment.