MVCS contains an interface that allows the following aeronautical server-based functions:
aeroServer object.Currently, the aeronautical server-based functions fetch data from aviationweather.gov.
getMetar()aeroServer.getMetar(station)
aeroServer.getMetar(station, distance)
aeroServer.getMetar(station, distance, latitude, longitude)
Retrieve METAR data for a METAR station. Only the METARS issued within the last hour are fetched. If the station has issued more than one METAR in the last hour, they will all be returned. If provided, distance specifies a statute-mile radius from the station to retrieve all METARs. This allows for finding the nearest published conditions if a station does not issue METARs, or for determining better conditions with a reasonable distance from the station. If omitted, only METARs from the station are returned. If provided, latitude and longitude, specify the center of the search radius. If latitude and longitude are provided, the station may be ''.
Returns a Promise that resolves with a Response whose text contains a list of retrieved METARs separated by newlines. The Promise rejects if something goes wrong.
aeroServer.getMetar() calls server.stdOp() to pass the standard headers and arguments in addition to the supplied arguments.
stationdistance (optional)station or latitude and longitude to search for nearby METARs.latitude (optional)latitude is provided, then longitude must also be provided.longitude (optional)longitude is provided, then latitude must also be provided.A Promise that resolves with text containing a list of retrieved METARs separated by newlines, if the status is OK. Otherwise, the Promise is rejected with the returned or timeout Response. The Response can contain the following status codes:
windsAloft()aeroServer.windsAloft()
aeroServer.windsAloft(region)
aeroServer.windsAloft(region, level)
Retrieve winds aloft data for region and level. The region and level values are as specified by the aviationweather.gov data API for "windtemp". If omitted, level defaults to 'low' and region defaults to 'all'.
Returns a Promise that resolves with a Response whose text contains the text retrieved from the aviationweather.gov data API for "windtemp". The Promise rejects if something goes wrong.
Note: the current server-side implementation ignores both region and level and assumes the default values.
aeroServer.getMetar() calls server.stdOp() to pass the standard headers and arguments in addition to the supplied arguments.
region (optional)aviationweather.gov data API for "windtemp" region string. If omitted, defaults to 'all.levelaviationweather.gov data API for "windtemp" level string. If omitted, defaults to 'low.A Promise that resolves with text containing the text retrieved from the aviationweather.gov data API for "windtemp", if the status is OK. Otherwise, the Promise is rejected with the returned or timeout Response. The Response can contain the following status codes: