Board index FlightGear Support Flying

Cannot get live weather

Controlling your aircraft, using the autopilot etc.

Cannot get live weather

Postby RJ5576 » Wed Aug 03, 2016 11:12 pm

I go to Environment > Weather and select "Live Data" from the Weather Conditions menu, but FlightGear gives me an error: "Local weather: No METAR available! Aborting..." and I can't fly with live weather.
RJ5576
 
Posts: 86
Joined: Wed Feb 20, 2013 4:24 am
Location: Between KSEA and KPDX
Callsign: RJ5576
Version: 2018.1.1
OS: Linux Mint Sylvia

Re: Cannot get live weather

Postby Fritz » Wed Aug 03, 2016 11:18 pm

I have this problem occasionally at smaller, remote airports. Did you try a big one, like KSFO, EDDM or LFPG?
Fritz
 
Posts: 283
Joined: Tue Apr 26, 2016 11:04 pm
Location: Bavaria, Germany, near ETSL
Version: 2018.3.6
OS: Windows 7 Prof.

Re: Cannot get live weather

Postby wkitty42 » Thu Aug 04, 2016 12:41 am

the weather site is changing things... yesterday it was giving HTTP "temporarily moved" notices but the METAR retrieval code does not (yet) follow HTTP redirects AFAICT...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Cannot get live weather

Postby Lydiot » Thu Aug 04, 2016 3:26 am

Yep, getting "nil" here as well....
Lydiot
 
Posts: 1016
Joined: Tue Oct 22, 2013 11:50 pm

Re: Cannot get live weather

Postby simongrant » Thu Aug 04, 2016 9:45 am

Same here getting 'NIL' but reassuring to know its not my settings (which havent changed) Hope it gets back online soon

regards
simongrant
 
Posts: 53
Joined: Sat Oct 12, 2013 4:55 pm
Callsign: CHT0056
Version: 2017.2.1
OS: WIN10

Re: Cannot get live weather

Postby wkitty42 » Thu Aug 04, 2016 10:40 am

ya know, one could always look in their log file ;)
Code: Select all
Environment/realwx_ctrl.cxx:481:NoaaMetarRealWxController::update(): spawning load request for station-id 'KSFO'
Environment/realwx_ctrl.cxx:453:metar download failed:http://weather.noaa.gov/pub/data/observations/metar/stations/KSFO.TXT: reason:Moved Temporarily

i'm fairly sure that fixing the code to follow the redirect is the proper thing to do... we just have to see if that gets done, though... i would but i'm not a C/C++ kinda guy ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Cannot get live weather

Postby Andino » Thu Aug 04, 2016 1:09 pm

Yes, NIL here too. And if you go to the Flightgear map, there is no METAR in the airport information either. And the ATIS message with weather does not come up.
Andino
 
Posts: 203
Joined: Sat Dec 31, 2011 4:32 pm
Location: Spain
OS: Linux

Re: Cannot get live weather

Postby RJ5576 » Thu Aug 04, 2016 7:44 pm

It's the same problem at KSFO. Lynx redirects me; I think that the redirect is the problem. The new URL for KSFO's METAR is http://tgftp.nws.noaa.gov/data/observat ... s/KSFO.TXT.

I think this is the sort of thing that would be best put in a config file.

ETA: ATIS doesn't work; is that related?
RJ5576
 
Posts: 86
Joined: Wed Feb 20, 2013 4:24 am
Location: Between KSEA and KPDX
Callsign: RJ5576
Version: 2018.1.1
OS: Linux Mint Sylvia

Re: Cannot get live weather

Postby Andino » Thu Aug 04, 2016 8:23 pm

Yes, I guess that it is related.

I recall that FG 1.9 had the same problem: at certain point, it was no longer able to get the metars.

It is happening in 2016.1, too. And both in Linux and Windows. The page with the metars has changed, and that affects the whole thing.
Andino
 
Posts: 203
Joined: Sat Dec 31, 2011 4:32 pm
Location: Spain
OS: Linux

Re: Cannot get live weather

Postby Fritz » Thu Aug 04, 2016 9:40 pm

This really shouldn't be hard-coded, especially if the url is depending on what somebody else does! I tried an old-fashioned solution and simply patched fgfs.exe and metar.exe, using notepad++ (a hex editor would probably be better). Because the new url is shorter than the old one, I had to insert double slashes, because you may not shift anything in an exe file.

Code: Select all
Old: http://weather.noaa.gov/pub/data/observations/metar/stations/
New: http://tgftp.nws.noaa.gov/data/observations/metar//stations//


The double slashes seem to work on my machine (Windows 7), but it's not guaranteed that it will work under different environments.
Fritz
 
Posts: 283
Joined: Tue Apr 26, 2016 11:04 pm
Location: Bavaria, Germany, near ETSL
Version: 2018.3.6
OS: Windows 7 Prof.

Re: Cannot get live weather

Postby Warty » Fri Aug 05, 2016 12:38 am

This hack also works on a Mac using BBEdit :D +100 :!:
User avatar
Warty
 
Posts: 378
Joined: Sun Mar 29, 2015 7:53 pm
Location: Spain
Callsign: Warty
Version: 2020.4.0
OS: Mac OS 13

Re: Cannot get live weather

Postby wkitty42 » Fri Aug 05, 2016 3:29 am

the fix is in... now we alpha players wait for it to be accepted and applied to the next branch ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Cannot get live weather

Postby clrCoda » Fri Aug 05, 2016 4:31 am

While those of us that don't compile flightgear at home wait for a new version, there is still a way to get real weather, if a bit of a hassle.

In the running sim: Menu/Environment/Weather
Just above the box in the center of the weather dialog that the metar goes in, there is a box with an arrow called WEATHER CONDITIONS. Hit the arrow. You may find you have to move the dialog down to see the entire list of options. Choose the option MANUAL INPUT. Then find a metar string online or using the irc chat AirTrafficControl. Ask anyone in chat if you need assistance further.

This will be a bit of a pain if you require changing metars the entire flight. Often it is sufficient to enter a TakeOff metar at take off and another one at Landing.

It's a bit of a hassle, but workable if Real Weather is your normal mode of operation.

Glad to see the thread has found the real fix. All previous versions of flightgear shall be caught by this faux pas, unfortunately.

-Ray
Ray St. Marie
clrCoda
 
Posts: 1225
Joined: Wed Apr 07, 2010 12:04 pm

Re: Cannot get live weather

Postby Andino » Fri Aug 05, 2016 7:03 am

I recompiled the whole thing with the new information, and it is working properly... both metars and ATIS.

I wonder if there should be another solution, because this information (the web page) could continue changing. something like a config file or a startup option.
Andino
 
Posts: 203
Joined: Sat Dec 31, 2011 4:32 pm
Location: Spain
OS: Linux

Re: Cannot get live weather

Postby Praxxus » Fri Aug 05, 2016 10:51 am

Can confirm Fritz's code URL replacement seems to be working ok :)

P :)
Core i5 6600k @ 3.5GHz ; ASUS TUF MARK2 Motherboard
Corsair Vengeance LPX 16GB PC4-19200 2400MHz ; H100i GTX Liquid CPU Cooler ;GTX 1660Ti ; Corsair RM850X ; 250Gb m.2 Drive ; 2x120Gb HyperX FURY SSD's 500r/500w ; Vortex case
Praxxus
 
Posts: 75
Joined: Sat Mar 02, 2013 12:19 am
Location: EGHH
Callsign: Porcius, G-BMTH
IRC name: Porcius
Version: 2020.4.3
OS: Winderz 10 x64

Next

Return to Flying

Who is online

Users browsing this forum: No registered users and 1 guest