pedro2555 / messagemaker

This project has moved to:
https://gitlab.com/prodrigues1990/messagemaker
GNU General Public License v2.0
0 stars 1 forks source link

Winds at LPLA not showing #69

Closed hmgps closed 4 years ago

hmgps commented 4 years ago

The winds at LPLA are not present on the typical METAR field and only apear in the RMK field at the end of the METAR as a 2 MIN average. These are not possible to get from the common sources of METAR but can be obtained through http://metars.flyatlantic-va.com/metar?ICAO=LPLA or IPMA's selfBriefing portal.

pedro2555 commented 4 years ago

71 adds support for IPMA provided metars. We still need to use the winds in the RMK sections.

We are not using the suggested link, but rather calling IPMA outrselves; I doubt they do it better.

icao = 'LPPT'
url = 'https://brief-ng.ipma.pt/showopmetquery.php'
data = {'icaos': icao, 'type': 'metar'}

response = requests.post(url, data)

metar = re.search(
    f'METAR\ .+$',
    response.text,
    re.MULTILINE,
).group()
pedro2555 commented 4 years ago

Support added in 7e32561