Page 1 of 5

Metar URL in binary??!! What a rookie mistake!

Posted: Wed Jul 13, 2016 6:49 pm
by KL-666
How on earth can someone bake a metar URL in an exe? What if the site changes it's structure? Go and make a new fg release? This is such a beginners mistake!

There is now an issue with the used URL:
http://weather.noaa.gov/pub/data/observ ... s/LFLP.TXT

I can get at the same with:
ftp://tgftp.nws.noaa.gov/data/observati ... s/LFLP.TXT

But i can not change it in the exe. This URL should have been in a configuration file. Data belongs outside executable binaries. The latter should only contain logic. Should i really take people that do not know how to adhere to simple coding principles as serious programmers?

To the brilliant and ever superior core developers: Please make a new fg release with the working metar URL in it, within an hour or so. Or better: A release with executables cleared from data.

Kind regards, Vincent

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Wed Jul 13, 2016 8:07 pm
by legoboyvdlp
seems to be working right now, at least with the URL.
Have not checked FG.
But yes, there was no METAR.

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Wed Jul 13, 2016 8:37 pm
by IAHM-COL
A METAR transferred as binary? Makes no sense to me...

Regardless of it works right now.

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Wed Jul 13, 2016 8:56 pm
by KL-666
No, the url where fg gets metar from is compiled into a binary of fg. A url is data, and belongs in a config file or a database.

Kind regards, Vincent

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Thu Jul 14, 2016 3:21 am
by Octal450
I don't think that is right. It can't be binary.

Really stupid if they did that.

Josh

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Sat Aug 06, 2016 12:35 am
by KL-666
Well, they did just that. The url is baked into my fgfs.exe, instead of being in a settings file where data should be.

Kind regards, Vincent

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Sat Aug 06, 2016 1:05 am
by Octal450
Yup. no weather for me.

Fuck

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Mon Aug 08, 2016 10:55 pm
by KL-666
Ok, i hex-edited my fgfs.exe file, as per:

https://forum.flightgear.org/viewtopic.php?f=25&t=30136#p291851

It works for now. Have to fly a bit more with it. Anyone who fears hex-editing can download my fgfs.exe.

Be aware that it is:
1) A windows exe
2) Fg version 2016.1.1, 2016.1.2 or 2016.2.1

If you do not match that, you do not need to try.

2016.1.1 http://iveze.nl/data/fgfs1.zip
2016.1.2 http://iveze.nl/data/fgfs12.zip
2016.2.1 http://iveze.nl/data/fgfs.zip

Kind regards, Vincent

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Tue Aug 09, 2016 1:05 am
by IAHM-COL
interesting alternative. I'm on linux, and with a git version. I'll pull and recompile... and then see where I end up.

I add my voice to KL666 position that the METAR URL should be in plain text over a config file. PERIOD.
This binary thing is a bit of a brain-crack.

IH-COL

Re: Metar URL in binary??!! What a rookie mistake!

Posted: Tue Aug 09, 2016 3:13 am
by Octal450
I'll compile one for 2016.1.2 on Vindows.