From 2d86fc11ade96883a0885255bb045bebbca26158 Mon Sep 17 00:00:00 2001 From: Alessandro Menti Date: Thu, 4 Aug 2016 20:34:34 +0200 Subject: [PATCH] Replace the NOAA METAR URL with the new, updated one --- src/Environment/fgmetar.cxx | 2 +- src/Environment/realwx_ctrl.cxx | 2 +- src/Main/metar_main.cxx | 2 +- utils/fgcom/utils/build_fgcom_server.sh | 2 +- utils/metarproxy/README | 12 ++++++------ utils/metarproxy/metarproxy | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Environment/fgmetar.cxx b/src/Environment/fgmetar.cxx index 6cee2c29d..161252d5a 100644 --- a/src/Environment/fgmetar.cxx +++ b/src/Environment/fgmetar.cxx @@ -154,7 +154,7 @@ FGMetar::FGMetar(const string& icao) : if (_x_proxy) SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from proxy"); else - SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from weather.noaa.gov"); + SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from tgftp.nws.noaa.gov"); } diff --git a/src/Environment/realwx_ctrl.cxx b/src/Environment/realwx_ctrl.cxx index d01419794..17ded3034 100644 --- a/src/Environment/realwx_ctrl.cxx +++ b/src/Environment/realwx_ctrl.cxx @@ -426,7 +426,7 @@ void NoaaMetarRealWxController::requestMetar ) { static const std::string NOAA_BASE_URL = - "http://weather.noaa.gov/pub/data/observations/metar/stations/"; + "http://tgftp.nws.noaa.gov/data/observations/metar/stations/"; class NoaaMetarGetRequest: public simgear::HTTP::MemoryRequest { diff --git a/src/Main/metar_main.cxx b/src/Main/metar_main.cxx index 977ebf4c1..fbde73ccb 100644 --- a/src/Main/metar_main.cxx +++ b/src/Main/metar_main.cxx @@ -539,7 +539,7 @@ int main(int argc, char *argv[]) try { static const std::string NOAA_BASE_URL = - "http://weather.noaa.gov/pub/data/observations/metar/stations/"; + "http://tgftp.nws.noaa.gov/data/observations/metar/stations/"; HTTP::MemoryRequest* mr = new HTTP::MemoryRequest ( NOAA_BASE_URL diff --git a/utils/fgcom/utils/build_fgcom_server.sh b/utils/fgcom/utils/build_fgcom_server.sh index 729688e0f..8fdbbae37 100644 --- a/utils/fgcom/utils/build_fgcom_server.sh +++ b/utils/fgcom/utils/build_fgcom_server.sh @@ -6,7 +6,7 @@ APTNAV_DATA="http://dev.x-plane.com/update/data/AptNav201304XP1000.zip" DAHDI_SRC="http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz" LOGSEP="###########################################" GETMETAR_SCRIPT="#!/bin/bash -#curl http://weather.noaa.gov/pub/data/observations/metar/stations/$1.TXT +#curl http://tgftp.nws.noaa.gov/data/observations/metar/stations/$1.TXT echo \"Hello World !\"" ROOT=$PWD diff --git a/utils/metarproxy/README b/utils/metarproxy/README index bb2e4f164..b04bb0ead 100644 --- a/utils/metarproxy/README +++ b/utils/metarproxy/README @@ -114,7 +114,7 @@ There are three operation modes to do that: 2a. --download mode ------------------- You can download worldwide sets of METAR strings, each in a file of about -1MB size from weather.noaa.gov[1]. This can be done with a separate ftp +1MB size from tgftp.nws.noaa.gov[1]. This can be done with a separate ftp client or web browser, but it can also be done by metarproxy: $ metarproxy --download 3h ... download last three hours (~ 3MB) @@ -236,7 +236,7 @@ data: --start-date-lat=2005:01:12:12:00:00 FlightGear will then fetch the metar data from the proxy as if it -were weather.noaa.gov. If no appropriate data set is found at all, +were tgftp.nws.noaa.gov. If no appropriate data set is found at all, the proxy sends a default string. If data are found but older than 250 minutes, then the last successful data are sent again. @@ -266,14 +266,14 @@ the (past) real weather at simulated GMT. ===================== Download addresses for the last 24 hours: - http://weather.noaa.gov/pub/data/observations/metar/cycles/ - ftp://weather.noaa.gov/data/observations/metar/cycles/ + http://tgftp.nws.noaa.gov/data/observations/metar/cycles/ + ftp://tgftp.nws.noaa.gov/data/observations/metar/cycles/ Addresses for the most recent METAR data strings of particular stations: - http://weather.noaa.gov/pub/data/observations/metar/stations/ - ftp://weather.noaa.gov/data/observations/metar/stations/ + http://tgftp.nws.noaa.gov/pub/data/observations/metar/stations/ + ftp://tgftp.nws.noaa.gov/data/observations/metar/stations/ $Id$ diff --git a/utils/metarproxy/metarproxy b/utils/metarproxy/metarproxy index 88320881f..3121b70ad 100755 --- a/utils/metarproxy/metarproxy +++ b/utils/metarproxy/metarproxy @@ -19,7 +19,7 @@ use Time::Local; my $HOME = $ENV{'HOME'} || "."; my $FG_HOME = $ENV{'FG_HOME'} || $HOME . "/.fgfs"; my $BASE = $FG_HOME . "/metar"; -my $SERVER = "weather.noaa.gov"; +my $SERVER = "tgftp.nws.noaa.gov"; my $PORT = 5509; my $PROXY = $ENV{'http_proxy'}; my $METAR_MAX_AGE = 250 * 60; @@ -81,8 +81,8 @@ Examples: \$ http_proxy= metarproxy --record LOXL Sources: - http://weather.noaa.gov/pub/data/observations/metar/{stations,cycles}/ - ftp://weather.noaa.gov/data/observations/metar/{stations,cycles}/ + http://tgftp.nws.noaa.gov/data/observations/metar/{stations,cycles}/ + ftp://tgftp.nws.noaa.gov/data/observations/metar/{stations,cycles}/ EOF @@ -399,7 +399,7 @@ sub serve() s/\s+$//; &log($DEBUG, $_); - if (m|^GET\s+http://weather.noaa.gov/.*/([A-Z][A-Z0-9]{3}).TXT\s+HTTP/|) { + if (m|^GET\s+http://tgftp.nws.noaa.gov/.*/([A-Z][A-Z0-9]{3}).TXT\s+HTTP/|) { $icao = $1; } elsif (/X-Time: (\d+)/) { $epoch = $1;