Package Exports
- adds
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (adds) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ADDS
Javascript client for https://www.aviationweather.gov/ text data server
Installation
npm install --save addsUsage
const ADDS = require('adds')
ADDS('metars', {
stationString: 'KSEA',
hoursBeforeNow: 1
})
.then(metars => {
console.log(JSON.stringify(metars, null, 2))
})Output:
[
{
"raw_text": "KSEA 202353Z 27005KT 10SM BKN042 19/10 A3004 RMK AO2 SLP176 T01940100 10200 20139 56010 $",
"station_id": "KSEA",
"observation_time": "2018-05-20T23:53:00Z",
"latitude": 47.45,
"longitude": -122.32,
"temp_c": 19.4,
"dewpoint_c": 10,
"wind_dir_degrees": 270,
"wind_speed_kt": 5,
"visibility_statute_mi": 10,
"altim_in_hg": 30.041338,
"sea_level_pressure_mb": 1017.6,
"quality_control_flags": {
"auto_station": "TRUE",
"maintenance_indicator_on": "TRUE"
},
"sky_condition": {
"sky_cover": "BKN",
"cloud_base_ft_agl": 4200
},
"flight_category": "VFR",
"three_hr_pressure_tendency_mb": -1,
"maxT_c": 20,
"minT_c": 13.9,
"metar_type": "METAR",
"elevation_m": 136
}
]See example.js for more usage examples.
API
ADDS(dataSource, options)
dataSource
Type: string
One of the following:
metarstafsaircraftreportsairsigmetsgairmetsstations
options
Type: object
These options are passed to ADDS as query parameters. See the ADDS documentation for all available options.
License
MIT © Forrest Desjardins