Skip to content

Commit

Permalink
report pressure in inHg and millibar
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed Mar 19, 2021
1 parent 3608bc1 commit af1872e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.go
Expand Up @@ -340,8 +340,8 @@ func main() {
windChill := WindChill(outdoorTemp, float64(windspeedMph))

fmt.Printf("Weather at %s:\n", weatherTime)
fmt.Printf("\ttemperature: %.1f degF\n\tpressure: %d mb\n\thumidity: %d%%\n\tdew point: %.1f degF\n\twind: %d at %d mph\n\tvisibility: %.1f miles\n",
outdoorTemp, pressureMillibar, outdoorHumidity, dewpoint, windBearing, windspeedMph, visibilityMiles)
fmt.Printf("\ttemperature: %.1f degF\n\tpressure: %d mb\n\thumidity: %d%%\n\tdew point: %.1f degF\n\twind: %d at %d mph\n\twind chill: %.1f degF\n\tvisibility: %.1f miles\n",
outdoorTemp, pressureMillibar, outdoorHumidity, dewpoint, windBearing, windspeedMph, windChill, visibilityMiles)

if weatherTime != lastWrittenWeather || config.AlwaysWriteWeather {
if err := retry.Do(func() error {
Expand All @@ -358,7 +358,8 @@ func main() {
map[string]interface{}{ // fields
"outdoor_temp": outdoorTemp,
"outdoor_humidity": outdoorHumidity,
"barometric_pressure": pressureMillibar,
"barometric_pressure_mb": pressureMillibar,
"barometric_pressure_inHg": float64(pressureMillibar) / 33.864,
"dew_point": dewpoint,
"wind_speed": windspeedMph,
"wind_bearing": windBearing,
Expand Down

0 comments on commit af1872e

Please sign in to comment.