1
0
Fork 0

Replace the NOAA METAR URL with the new, updated one

This commit is contained in:
Alessandro Menti 2016-08-04 20:34:34 +02:00
parent 9d13473d11
commit 2d86fc11ad
6 changed files with 14 additions and 14 deletions

View file

@ -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");
}

View file

@ -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
{

View file

@ -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

View file

@ -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

View file

@ -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$

View file

@ -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;