Documentation
¶
Overview ¶
Package wunderground implements the Weather Underground Personal Weather Station (PWS) protocol.
Index ¶
- Variables
- type Aq
- func (a *Aq) BC(ugm3 float64)
- func (a *Aq) CO(ppm int)
- func (a *Aq) COT(ppb int)
- func (a *Aq) EC(ugm3 float64)
- func (a *Aq) NO(ppb int)
- func (a *Aq) NO2(ppb int)
- func (a *Aq) NO2T(ppb int)
- func (a *Aq) NO2Y(ppb int)
- func (a *Aq) NO3(ugm3 float64)
- func (a *Aq) NOX(ppb int)
- func (a *Aq) NOY(ppb int)
- func (a *Aq) OC(ugm3 float64)
- func (a *Aq) Ozone(ppb int)
- func (a *Aq) PM10(ugm3 float64)
- func (a *Aq) PM25(ugm3 float64)
- func (a *Aq) SO2(ppb int)
- func (a *Aq) SO2T(ppb int)
- func (a *Aq) SO4(ugm3 float64)
- func (a *Aq) UVAETH(ugm3 float64)
- type Pws
- type Time
- type Wx
- func (w *Wx) Bar(in float64)
- func (w *Wx) Clouds(c string)
- func (w *Wx) DailyRain(in float64)
- func (w *Wx) DewPoint(f float64)
- func (w *Wx) InHumidity(p int)
- func (w *Wx) InTemp(f float64)
- func (w *Wx) LeafWetness(p int)
- func (w *Wx) OutHumidity(p int)
- func (w *Wx) OutTemp(f float64)
- func (w *Wx) RainRate(in float64)
- func (w *Wx) SoilMoist(p int)
- func (w *Wx) SoilTemp(f float64)
- func (w *Wx) SolarRad(wm2 int)
- func (w *Wx) UVIndex(i float64)
- func (w *Wx) Visibility(nm int)
- func (w *Wx) WindDir(deg int)
- func (w *Wx) WindGustDir(deg int)
- func (w *Wx) WindGustDir10m(deg int)
- func (w *Wx) WindGustSpeed(mph float64)
- func (w *Wx) WindGustSpeed10m(mph float64)
- func (w *Wx) WindSpeed(mph float64)
- func (w *Wx) WindSpeedAvg2m(mph float64)
- type WxObs
Constants ¶
This section is empty.
Variables ¶
var ( DownloadURL = "https://www.wunderground.com/weatherstation" UploadURL = "https://rtupdate.wunderground.com/weatherstation" )
Base download and upload URL's.
Functions ¶
This section is empty.
Types ¶
type Aq ¶
Aq represents air quality observations.
type Pws ¶
type Pws struct {
ID string // Station name
Password string // Station key
SoftwareType string // Software type
Interval time.Duration // Upload interval (default is 2s)
Time time.Time // Upload time (default is now)
// contains filtered or unexported fields
}
Pws represents a Personal Weather Station.
func (Pws) DownloadDaily ¶
DownloadDaily downloads all PWS observations for a given day.
func (Pws) Encode ¶
Encode returns the request URL for the specified observations. This is generally used for testing and debugging.
type Time ¶
Time represents a time that can be unmarshaled from a Weather Underground XML response.
func (*Time) UnmarshalXML ¶
UnmarshalXML method for converting a Weather Underground time string to a time.Time.
type Wx ¶
Wx represents weather observations.
func (*Wx) InHumidity ¶
InHumidity is the indoor humidity percentage (0-100).
func (*Wx) LeafWetness ¶
LeafWetness is the leaf wetness percentage (0-100).
func (*Wx) OutHumidity ¶
OutHumidity is the outdoor humidity percentage (0-100).
func (*Wx) RainRate ¶
RainRate is rain inches over the past hour or the accumulated rainfall for the past 60 minutes in inches.
func (*Wx) WindGustDir ¶
WindGustDir is the software specific time period wind gust direction in degrees (0-359).
func (*Wx) WindGustDir10m ¶
WindGustDir10m is the 10 minute wind gust direction in degrees (0-359).
func (*Wx) WindGustSpeed ¶
WindGustSpeed is the software specific time period wind gust speed in miles per hour.
func (*Wx) WindGustSpeed10m ¶
WindGustSpeed10m is the 10 minute wind gust speed in miles per hour.
func (*Wx) WindSpeedAvg2m ¶
WindSpeedAvg2m is the 2 minute average wind speed in miles per hour.
type WxObs ¶
type WxObs struct {
Bar float64 `xml:"pressure_in"`
DewPoint float64 `xml:"dewpoint_f"`
RainAccumDay float64 `xml:"precip_today_in"`
RainAccumHour float64 `xml:"precip_1hr_in"`
OutHumidity int `xml:"relative_humidity"`
OutTemp float64 `xml:"temp_f"`
SolarRad float64 `xml:"solar_radiation"` // Should be an int but WU returns floats sometimes
Time Time `xml:"observation_time_rfc822"`
UVIndex float64 `xml:"UV"`
WindDir int `xml:"wind_degrees"`
WindSpeed float64 `xml:"wind_mph"`
WindGust float64 `xml:"wind_gust_mph"`
}
WxObs is weather observation info for the associated timestamp.