-(defvar metar-units '((speed . kph) (pressure . bar)))
-
-(defvar metar-stations-info-url "http://weather.noaa.gov/data/nsd_bbsss.txt"
- "URL to use for retrieving station meta information.")
+(defgroup metar ()
+ "METAR weather reports."
+ :group 'net-utils)
+
+(defcustom metar-units '((length . m)
+ (pressure . hPa)
+ (speed . kph)
+ (temperature . degC))
+ "Default measurement units to use when reporting weather information."
+ :group 'metar
+ :type '(list (cons :format "%v"
+ (const :tag "Length: " length)
+ (choice (const :tag "Meter" m)
+ (const :tag "Inch" in)
+ (const :tag "Foot" ft)
+ (const :tag "Yard" yd)
+ (const :tag "Mile" mi)))
+ (cons :format "%v"
+ (const :tag "Pressure:" pressure)
+ (choice (const :tag "Pascal" Pa)
+ (const :tag "Hecto pascal" hPa)
+ (const :tag "Bar" bar)
+ (const :tag "Inch of mercury" inHg)
+ (const :tag "Standard atmosphere" atm)
+ (const :tag "Meter of mercury" mHg)
+ (const :tag "Punds per square inch" psi)))
+ (cons :format "%v"
+ (const :tag "Speed:" speed)
+ (choice (const :tag "Kilometers per hour" kph)
+ (const :tag "Miles per hour" mph)
+ (const :tag "Knot" knot)))
+ (cons :format "%v"
+ (const :tag "Temperature:" temperature)
+ (choice (const :tag "Degree Celsius" degC)
+ (const :tag "Degree Kelvin" degK)
+ (const :tag "Degree Fahrenheit" degF)))))
+
+(defcustom metar-stations-info-url "http://weather.noaa.gov/data/nsd_bbsss.txt"
+ "URL to use for retrieving station meta information."
+ :group 'metar
+ :type 'string)