Permalink
Browse files

metar: switch to aviationweather.gov (weather.noaa.gov is discontinued)

  • Loading branch information...
monsta committed Aug 24, 2016
1 parent 120bf8d commit 835055e0d0b950d3f66ad236de7e40942f6f7d8e
Showing with 3 additions and 3 deletions.
  1. +3 −3 libmateweather/weather-metar.c
@@ -522,7 +522,7 @@ metar_finish (SoupSession *session, SoupMessage *msg, gpointer data)
metar = g_strdup (p);
success = metar_parse (metar, info);
g_free (metar);
} else if (!strstr (msg->response_body->data, "National Weather Service")) {
} else if (!strstr (msg->response_body->data, "AVIATION WEATHER CENTER")) {
/* The response doesn't even seem to have come from NWS...
* most likely it is a wifi hotspot login page. Call that a
* network error.
@@ -550,8 +550,8 @@ metar_start_open (WeatherInfo *info)
}
msg = soup_form_request_new (
"GET", "http://weather.noaa.gov/mgetmetar.php",
"cccc", loc->code,
"GET", "http://aviationweather.gov/metar/data",
"ids", loc->code,
NULL);
soup_session_queue_message (info->session, msg, metar_finish, info);

8 comments on commit 835055e

@flexiondotorg

This comment has been minimized.

Show comment
Hide comment
@flexiondotorg

flexiondotorg Aug 25, 2016

Member

@monsta In my testing the causes the clock applet and weather applet to segfault. This is with the libmateweather 1.14.1 release from last night.

Member

flexiondotorg replied Aug 25, 2016

@monsta In my testing the causes the clock applet and weather applet to segfault. This is with the libmateweather 1.14.1 release from last night.

@flexiondotorg

This comment has been minimized.

Show comment
Hide comment
@flexiondotorg

flexiondotorg Aug 25, 2016

Member

Ignore the above. My mistake building the package.

Member

flexiondotorg replied Aug 25, 2016

Ignore the above. My mistake building the package.

@tx0h

This comment has been minimized.

Show comment
Hide comment
@tx0h

tx0h Aug 26, 2016

why not add a environment variable which could overwrite silly hard coded urls, maybe METAR_URL or something?

tx0h replied Aug 26, 2016

why not add a environment variable which could overwrite silly hard coded urls, maybe METAR_URL or something?

@ionutr2015

This comment has been minimized.

Show comment
Hide comment
@ionutr2015

ionutr2015 Aug 29, 2016

Thanks, it works great.

ionutr2015 replied Aug 29, 2016

Thanks, it works great.

@born2webdesign

This comment has been minimized.

Show comment
Hide comment
@born2webdesign

born2webdesign Sep 8, 2016

@tx0h That would be a step in the right direction – but why not make this configurable in the settings?
Either a text input field with a default server or a dropdown list of preconfigured servers (preferably with the option to add more servers)? For a simpler option, maybe at least a config file?
https://developer.yahoo.com/weather/ looks promising?
Or regional services like http://wetter-api.de

born2webdesign replied Sep 8, 2016

@tx0h That would be a step in the right direction – but why not make this configurable in the settings?
Either a text input field with a default server or a dropdown list of preconfigured servers (preferably with the option to add more servers)? For a simpler option, maybe at least a config file?
https://developer.yahoo.com/weather/ looks promising?
Or regional services like http://wetter-api.de

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Sep 12, 2016

Member

If you look at the next commit, c1b7189 (which switches to recommended method of data retrieval), you'd see the usage of API that's specific to that server. Could you find some other server that uses exactly the same API?

Member

monsta replied Sep 12, 2016

If you look at the next commit, c1b7189 (which switches to recommended method of data retrieval), you'd see the usage of API that's specific to that server. Could you find some other server that uses exactly the same API?

@goetzc

This comment has been minimized.

Show comment
Hide comment
@goetzc

goetzc Sep 12, 2016

Contributor

The comment on this commit said that libgweather added yahoo as a provider c8a7ad7. It also seems that it uses Geocode to find the location automatically.

Would it be feasible to use libgweather instead of libmateweather?

Contributor

goetzc replied Sep 12, 2016

The comment on this commit said that libgweather added yahoo as a provider c8a7ad7. It also seems that it uses Geocode to find the location automatically.

Would it be feasible to use libgweather instead of libmateweather?

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Sep 13, 2016

Member

Yes, I have that in my plans, but only after mate-panel and mate-applets will be built with GTK+3 only.

Member

monsta replied Sep 13, 2016

Yes, I have that in my plans, but only after mate-panel and mate-applets will be built with GTK+3 only.

Please sign in to comment.