METAR

public struct METAR : Codable

The struct METAR represents a METAR object. This object is codable to allow easy manipulaition with JSON.

  • The raw METAR (raw_text)

    Declaration

    Swift

    public var rawText: String?
  • Station identifier; Always a four character alphanumeric( A-Z, 0-9) (station_id)

    Declaration

    Swift

    public var stationId: String?
  • Time( in Epoch format) this METAR was observed. (observation_time)

    Declaration

    Swift

    public var observationTime: Int?
  • The latitude (in decimal degrees) of the station that reported this METAR (latitude)

    Declaration

    Swift

    public var latitude: Double?
  • The longitude (in decimal degrees) of the station that reported this METAR (longitude)

    Declaration

    Swift

    public var longitude: Double?
  • The air temperature (temp_c)

    Declaration

    Swift

    public var temperature: Double?
  • Minimum air temperature from the past 6 hours (minT_c)

    Declaration

    Swift

    public var sixHourMinTemp: Double?
  • Maximum air temperature from the past 6 hours (maxT_c)

    Declaration

    Swift

    public var sixHourMaxTemp: Double?
  • Maximum air temperature from the past 24 hours (maxT24hr_c)

    Declaration

    Swift

    public var twentyFourHourTempMax: Double?
  • Minimum air temperature from the past 24 hours (minT24hr_c)

    Declaration

    Swift

    public var twentyFourHourTempMin: Double?
  • Dewpoint temperature (dewpoint_c)

    Declaration

    Swift

    public var dewpoint: Double?
  • Snow depth on the ground (snow_in)

    Declaration

    Swift

    public var snow: Double?
  • Liquid precipitation since the last regular METAR (precip_in)

    Declaration

    Swift

    public var precipitation: Double?
  • Liquid precipitation from the past 3 hours. 0.0005 in = trace precipitation (pcp3hr_in)

    Declaration

    Swift

    public var precipitationThreeHour: Double?
  • Liquid precipitation from the past 6 hours. 0.0005 in = trace precipitation (pcp6hr_in)

    Declaration

    Swift

    public var precipitationSixHour: Double?
  • Liquid precipitation from the past 24 hours. 0.0005 in = trace precipitation (pcp24hr_in)

    Declaration

    Swift

    public var precipitationTwentyFourHour: Double?
  • Direction from which the wind is blowing. 0 degrees=variable wind direction. (wind_dir_degrees)

    Declaration

    Swift

    public var windDirection: Int?
  • Wind speed; 0 degree wdir and 0 wspd = calm winds (wind_speed_kt)

    Declaration

    Swift

    public var windSpeed: Int?
  • Wind gust (wind_gust_kt)

    Declaration

    Swift

    public var windGust: Int?
  • Vertical Visibility (vert_vis_ft)

    Declaration

    Swift

    public var verticalVisibility: Int?
  • Horizontal visibility (visibility_statute_mi)

    Declaration

    Swift

    public var visibility: Double?
  • Altimiter (altim_in_hg)

    Declaration

    Swift

    public var altimiter: Double?
  • The elevation of the station that reported this METAR (elevation_m)

    Declaration

    Swift

    public var elevation: Double?
  • Sea-level pressure (sea_level_pressure_mb)

    Declaration

    Swift

    public var sealevelPressure: Double?
  • Pressure change in the past 3 hours (three_hr_pressure_tendency_mb)

    Declaration

    Swift

    public var threeHourPressure: Double?
  • Corrected (corrected)

    Declaration

    Swift

    public var correctedRecord: Bool
  • No signal (no_signal)

    Declaration

    Swift

    public var noSignal: Bool
  • Fully automated (auto)

    Declaration

    Swift

    public var autoRecord: Bool
  • Indicates that the automated station type is one of the following: A01|A01A|A02|A02A|AOA|AWOS NOTE: The type of station is not returned. This simply indicates that this station is one of the six stations enumerated above. (auto_station)

    Declaration

    Swift

    public var autoStation: Bool
  • Maintenance check indicator - maintenance is needed (maintenance_indicator)

    Declaration

    Swift

    public var maintenance: Bool
  • The lightning detection sensor is not operating- thunderstorm information is not available. (lightning_sensor_off)

    Declaration

    Swift

    public var lightningSensorOff: Bool
  • The freezing rain sensor is not operating (freezing_rain_sensor_off)

    Declaration

    Swift

    public var freezingRainSensorOff: Bool
  • The present weather sensor is not operating (present_weather_sensor_off)

    Declaration

    Swift

    public var presentWeatherSensorOff: Bool
  • Sky condition object (sky_condition)

    Declaration

    Swift

    public var skyCondition: [SkyCondition]?
  • Weather strings to symbols: https://www.aviationweather.gov/docs/metar/wxSymbols_anno2.pdf (wx_string)

    Declaration

    Swift

    public var weatherDescription: String?
  • METAR or SPECI (metar_type)

    Declaration

    Swift

    public var metarType: String?
  • Flight category of this METAR. Values: VFR|MVFR|IFR|LIFR See http://www.aviationweather.gov/metar/help?page=plot#fltcat (flight_category)

    Declaration

    Swift

    public var flightCategory: String?
  • The base init for convienance.

    Declaration

    Swift

    public init()

    Return Value

    A new instance of the METAR.

  • The base decoding init.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The Decoder used to Decode the object.

    Return Value

    A new instance of the METAR.

  • The base decoding init.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The Encoder used to Encode the object.

    Return Value

    A new instance of the METAR.