METAR fix
This commit is contained in:
parent
df7988fb49
commit
2fdc24c109
3 changed files with 5 additions and 5 deletions
|
@ -426,7 +426,7 @@ void NoaaMetarRealWxController::requestMetar
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static const std::string NOAA_BASE_URL =
|
static const std::string NOAA_BASE_URL =
|
||||||
"http://tgftp.nws.noaa.gov/data/observations/metar/stations/";
|
"https://tgftp.nws.noaa.gov/data/observations/metar/stations/";
|
||||||
class NoaaMetarGetRequest:
|
class NoaaMetarGetRequest:
|
||||||
public simgear::HTTP::MemoryRequest
|
public simgear::HTTP::MemoryRequest
|
||||||
{
|
{
|
||||||
|
@ -443,7 +443,7 @@ void NoaaMetarRealWxController::requestMetar
|
||||||
|
|
||||||
virtual void onDone()
|
virtual void onDone()
|
||||||
{
|
{
|
||||||
if( responseCode() != 200 )
|
if( responseCode() >= 400 )
|
||||||
{
|
{
|
||||||
SG_LOG
|
SG_LOG
|
||||||
(
|
(
|
||||||
|
|
|
@ -539,7 +539,7 @@ int main(int argc, char *argv[])
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
static const std::string NOAA_BASE_URL =
|
static const std::string NOAA_BASE_URL =
|
||||||
"http://tgftp.nws.noaa.gov/data/observations/metar/stations/";
|
"https://tgftp.nws.noaa.gov/data/observations/metar/stations/";
|
||||||
HTTP::MemoryRequest* mr = new HTTP::MemoryRequest
|
HTTP::MemoryRequest* mr = new HTTP::MemoryRequest
|
||||||
(
|
(
|
||||||
NOAA_BASE_URL + strutils::uppercase(argv[i]) + ".TXT"
|
NOAA_BASE_URL + strutils::uppercase(argv[i]) + ".TXT"
|
||||||
|
@ -558,7 +558,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if( !mr->isComplete() )
|
if( !mr->isComplete() )
|
||||||
throw sg_io_exception("metar download timed out");
|
throw sg_io_exception("metar download timed out");
|
||||||
if( mr->responseCode() != 200 )
|
if( mr->responseCode() >= 400 )
|
||||||
{
|
{
|
||||||
std::cerr << "metar download failed: "
|
std::cerr << "metar download failed: "
|
||||||
<< mr->url()
|
<< mr->url()
|
||||||
|
|
|
@ -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"
|
DAHDI_SRC="http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz"
|
||||||
LOGSEP="###########################################"
|
LOGSEP="###########################################"
|
||||||
GETMETAR_SCRIPT="#!/bin/bash
|
GETMETAR_SCRIPT="#!/bin/bash
|
||||||
#curl http://tgftp.nws.noaa.gov/data/observations/metar/stations/$1.TXT
|
#curl https://tgftp.nws.noaa.gov/data/observations/metar/stations/$1.TXT
|
||||||
echo \"Hello World !\""
|
echo \"Hello World !\""
|
||||||
|
|
||||||
ROOT=$PWD
|
ROOT=$PWD
|
||||||
|
|
Loading…
Reference in a new issue